void GWorkBench::PopulateSettings(QSettings& inQsettings) { // clean every data in the current group inQsettings.remove(""); inQsettings.setValue("WorkBench-Type", metaObject()->className()); inQsettings.setValue("objectName", objectName()); inQsettings.setValue("isVisible", isVisible()); // saves the GBenchDockWidget created dynamically GSerializable::SaveListAndItems<GBenchDockWidget>(inQsettings, "Dynamic-Docks", BenchDynamicDocks()); // the list of devices, devices'ID, and GBenchDock in which they appear. The 2 latter are filled in the foreach loop over every devices. QList<GDevice*> listDev = DeviceList(); QList<QString> listOfAllBenchDevicesIDs; QMap<GDevice*, QString> mapDevice_BenchDockID; foreach(GDevice* pDev, listDev) { listOfAllBenchDevicesIDs.append(pDev->UniqueSystemID()); // get if the widget in which the device is graphically embedded is one of the GBenchDockWidget. "" else. GBenchDockWidget* qWid = 0; foreach(GBenchDockWidget* pDock, BenchDynamicDocks()) { if(pDock->EmbeddedDevices().contains(pDev)) { qWid = pDock; break; } } mapDevice_BenchDockID.insert(pDev, qWid ? qWid->UniqueSystemID() : ""); }
void update_snmp (struct int6k *int6k) { static int index; struct device *list_head; struct device *d; extern struct operationsTable_entry *operationsTable_head; struct operationsTable_entry *entry; list_head = DeviceList (int6k); if (list_head == NULL) printf ("no devices found...\n"); d = list_head; while (d) { /* see if the device is already in the snmp table */ entry = table_find_device (operationsTable_head, d->mac); /* MAC address is not in table */ if (!entry) { /* find empty index */ index = table_find_empty (operationsTable_head); if (index < 0) { error (0, 0, "error: device table full!"); return; } operationsTable_createEntry (index, d); printf ("A %s\n", d->mac); } else { printf ("U %s\n", d->mac); memcpy (entry->deviceID, d->id, strlen (d->id) + 1); entry->deviceID_len = strlen (entry->deviceID); memcpy (entry->deviceFirmwareRevision, d->version, strlen (d->version) + 1); entry->deviceFirmwareRevision_len = strlen (entry->deviceFirmwareRevision); } d = d->next; } /* remove devices no longer present */ entry = operationsTable_head; while (entry) { if (list_find_device (list_head, entry->deviceMacAddress) == NULL) { printf ("R %s\n", entry->deviceMacAddress); operationsTable_remove (entry); } entry = entry->next; } printf ("---------\n"); }
QStringList AudioPA::OutputDeviceList() { return DeviceList(false); }
//Returns a device list for UI //paDeviceIndex is returned in 1st 2 char, strip for UI //Todo: Write .txt file with all device info to help with debugging QStringList AudioPA::InputDeviceList() { return DeviceList(true); }