summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-12-07 00:04:36 +0100
committerJavier <dev.git@javispedro.com>2014-12-07 00:04:36 +0100
commitd7474bbe49e2d14290ca1b0cddb746e0bf5fbe63 (patch)
tree409e91f80a6af370eb9f3be5714bae1474d3c570 /daemon
parent9aeb1bf31ad9ff5979f598f5925cfd25f544ba34 (diff)
implement launcher d-bus commands
Diffstat (limited to 'daemon')
-rw-r--r--daemon/appmsgmanager.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/daemon/appmsgmanager.cpp b/daemon/appmsgmanager.cpp
index f24b8d9..eda1eb4 100644
--- a/daemon/appmsgmanager.cpp
+++ b/daemon/appmsgmanager.cpp
@@ -23,6 +23,10 @@ AppMsgManager::AppMsgManager(AppManager *apps, WatchConnector *watch, QObject *p
case WatchConnector::appmsgPUSH:
handleLauncherPushMessage(data);
break;
+ case WatchConnector::appmsgACK:
+ case WatchConnector::appmsgNACK:
+ // TODO we ignore those for now.
+ break;
}
return true;
@@ -97,12 +101,24 @@ void AppMsgManager::send(const QUuid &uuid, const QVariantMap &data)
void AppMsgManager::launchApp(const QUuid &uuid)
{
- // TODO
+ WatchConnector::Dict dict;
+ dict.insert(1, WatchConnector::launcherSTARTED);
+
+ logger()->debug() << "Sending message to launcher" << uuid << dict;
+
+ QByteArray msg = buildPushMessage(++_lastTransactionId, uuid, dict);
+ watch->sendMessage(WatchConnector::watchLAUNCHER, msg);
}
void AppMsgManager::closeApp(const QUuid &uuid)
{
- // TODO
+ WatchConnector::Dict dict;
+ dict.insert(1, WatchConnector::launcherSTOPPED);
+
+ logger()->debug() << "Sending message to launcher" << uuid << dict;
+
+ QByteArray msg = buildPushMessage(++_lastTransactionId, uuid, dict);
+ watch->sendMessage(WatchConnector::watchLAUNCHER, msg);
}
WatchConnector::Dict AppMsgManager::mapAppKeys(const QUuid &uuid, const QVariantMap &data)