diff options
| author | Javier <dev.git@javispedro.com> | 2014-11-30 17:27:08 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2014-11-30 17:37:19 +0100 |
| commit | 49f1261bf9d635d5e3d881e87a93ed4e76abfe90 (patch) | |
| tree | 4432ecd771a3aca533914d02f9947cb497493395 /daemon/manager.h | |
| parent | d55d1d472d5876f90dd95301d9f3b6bef6f4c494 (diff) | |
allow receiving responses to commands in watchconnector
* the skeleton is in place for watchconnector to allow query->response
messages. I've used call/cc style because it is impossible to make
QBluetoothSocket synchronous (waitForReadyRead() is a no-op)
* remove watchcommands, instead create musicmanager to listen for the
music endpoint. The other (simpler) endpoints are now listened in
watchconnector itself. hangupAll() slot is moved to voicecallmanager.
* instead of emitting signals for each received message, listeners
can now register for receiving messages targeted towards a given
endpoint
* when reading from bluetoothsocket, properly handle short reads
* remove useless 'watch' namespace
* create appmanager, which mantains a database of installed apps
(installed on the phone, that is; watch installed apps will come
later)
* all the *Managers are now instantiated by the main Manager itself
* introduce Unpacker helper class for decoding watch messages
* implement getAppbankStatus and getAppbankUuids messages and response
parsers
* remove file logging for now (20MB is bad for eMMC!)
* use dbus object path /org/pebbled instead of /
Diffstat (limited to 'daemon/manager.h')
| -rw-r--r-- | daemon/manager.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/daemon/manager.h b/daemon/manager.h index 5946bf0..b210700 100644 --- a/daemon/manager.h +++ b/daemon/manager.h @@ -5,8 +5,8 @@ #include "dbusconnector.h" #include "voicecallmanager.h" #include "notificationmanager.h" +#include "musicmanager.h" #include "appmanager.h" -#include "watchcommands.h" #include "settings.h" #include <QObject> @@ -35,16 +35,15 @@ class Manager : QBluetoothLocalDevice btDevice; - watch::WatchConnector *watch; + Settings *settings; + + WatchConnector *watch; DBusConnector *dbus; VoiceCallManager *voice; NotificationManager *notifications; + MusicManager *music; AppManager *apps; - WatchCommands *commands; - - Settings *settings; - MNotification notification; QContactManager *contacts; @@ -57,7 +56,8 @@ class Manager : QScopedPointer<icu::Transliterator> transliterator; public: - explicit Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallManager *voice, NotificationManager *notifications, AppManager *apps, Settings *settings); + explicit Manager(Settings *settings, QObject *parent = 0); + ~Manager(); Q_INVOKABLE QString findPersonByNumber(QString number); Q_INVOKABLE QString getCurrentProfile(); @@ -65,6 +65,8 @@ public: QVariantMap mprisMetadata; QVariantMap getMprisMetadata() { return mprisMetadata; } + Q_INVOKABLE bool uploadApp(const QUuid &uuid, int slot = -1); + protected: void transliterateMessage(const QString &text); @@ -72,10 +74,10 @@ signals: void mprisMetadataChanged(QVariantMap); public slots: - void hangupAll(); void applyProfile(); -protected slots: +private slots: + void test(); void onSettingChanged(const QString &key); void onSettingsChanged(); void onPebbleChanged(); @@ -114,6 +116,7 @@ public slots: void time() { static_cast<Manager*>(parent())->watch->time(); } void disconnect() { static_cast<Manager*>(parent())->watch->disconnect(); } void reconnect() { static_cast<Manager*>(parent())->watch->reconnect(); } + void test() { static_cast<Manager*>(parent())->test(); } }; |
