diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-13 05:14:11 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-13 05:14:11 +0200 |
| commit | 09d98ef6e6d32e73a6b3c74679adc8a49b0dee7e (patch) | |
| tree | d4e5682b1b534c6b475c6279fdd1652c3c8e4b74 /daemon/manager.cpp | |
| parent | e99e0f6d456e86be244ed3baa022088ec859944a (diff) | |
Moved processing watch commands to separate object
Diffstat (limited to 'daemon/manager.cpp')
| -rw-r--r-- | daemon/manager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/manager.cpp b/daemon/manager.cpp index 228c466..be3946e 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -6,7 +6,7 @@ #include <QtContacts/QContactPhoneNumber> Manager::Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallManager *voice) : - QObject(0), watch(watch), dbus(dbus), voice(voice), + QObject(0), watch(watch), dbus(dbus), voice(voice), commands(new WatchCommands(watch, this)), notification(MNotification::DeviceEvent) { // We don't need to handle presence changes, so report them separately and ignore them @@ -24,9 +24,11 @@ Manager::Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallMan connect(voice, SIGNAL(activeVoiceCallChanged()), SLOT(onActiveVoiceCallChanged())); connect(voice, SIGNAL(error(const QString &)), SLOT(onVoiceError(const QString &))); - connect(watch, SIGNAL(hangup()), SLOT(hangupAll())); connect(watch, SIGNAL(connectedChanged()), SLOT(onConnectedChanged())); + connect(watch, SIGNAL(messageDecoded(uint,uint,QByteArray)), commands, SLOT(processMessage(uint,uint,QByteArray))); + connect(commands, SIGNAL(hangup()), SLOT(hangupAll())); + // Set BT icon for notification notification.setImage("icon-system-bluetooth-device"); |
