Some scaffolding and implementation for cloud output device manager

This commit is contained in:
ChrisTerBeke 2018-11-19 22:24:35 +01:00
parent 228325eb89
commit 10576d1242
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
3 changed files with 41 additions and 16 deletions

View file

@ -40,6 +40,9 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
self._zero_conf = None
self._zero_conf_browser = None
# Create a cloud output device manager that abstract all cloud connection logic away.
self._cloud_output_device_manager = CloudOutputDeviceManager(self._application)
# Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
self.addDeviceSignal.connect(self._onAddDevice)
self.removeDeviceSignal.connect(self._onRemoveDevice)
@ -76,9 +79,6 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
self._service_changed_request_event = Event()
self._service_changed_request_thread = Thread(target=self._handleOnServiceChangedRequests, daemon=True)
self._service_changed_request_thread.start()
# Create a cloud output device manager that abstract all cloud connection logic away.
self._cloud_output_device_manager = CloudOutputDeviceManager(self._application)
def getDiscoveredDevices(self):
return self._discovered_devices