| 35 | } |
| 36 | |
| 37 | void GroupController::updateDeviceState(const QString &serial) |
| 38 | { |
| 39 | if (!m_devices.contains(serial)) { |
| 40 | return; |
| 41 | } |
| 42 | |
| 43 | auto device = qsc::IDeviceManage::getInstance().getDevice(serial); |
| 44 | if (!device) { |
| 45 | return; |
| 46 | } |
| 47 | |
| 48 | if (isHost(serial)) { |
| 49 | device->registerDeviceObserver(this); |
| 50 | } else { |
| 51 | device->deRegisterDeviceObserver(this); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | void GroupController::addDevice(const QString &serial) |
| 56 | { |