summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-12-06 02:11:46 +0100
committerJavier <dev.git@javispedro.com>2014-12-06 02:11:46 +0100
commit0a92face6b035a26aad3d4d7ffa5a72b463e4c2a (patch)
treef25ccf318415aa2b8a43a85d24919456dd118f43 /daemon
parentfaa06a9cf59ca0044a928330a63190a98e9b6bcc (diff)
forward jskit notifications
Diffstat (limited to 'daemon')
-rw-r--r--daemon/manager.cpp7
-rw-r--r--daemon/manager.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/daemon/manager.cpp b/daemon/manager.cpp
index 6fd47a4..b488432 100644
--- a/daemon/manager.cpp
+++ b/daemon/manager.cpp
@@ -59,6 +59,8 @@ Manager::Manager(Settings *settings, QObject *parent) :
connect(appmsg, &AppMsgManager::appStarted, this, &Manager::onAppOpened);
connect(appmsg, &AppMsgManager::appStopped, this, &Manager::onAppClosed);
+ connect(js, &JSKitManager::appNotification, this, &Manager::onAppNotification);
+
QDBusConnection session = QDBusConnection::sessionBus();
new WatchAdaptor(proxy);
session.registerObject("/org/pebbled/Watch", proxy);
@@ -391,6 +393,11 @@ void Manager::transliterateMessage(const QString &text)
}
}
+void Manager::onAppNotification(const QUuid &uuid, const QString &title, const QString &body)
+{
+ watch->sendSMSNotification(title, body);
+}
+
void Manager::onAppMessage(const QUuid &uuid, const QVariantMap &data)
{
emit proxy->AppMessage(uuid.toString(), data);
diff --git a/daemon/manager.h b/daemon/manager.h
index e84e982..18bd7bf 100644
--- a/daemon/manager.h
+++ b/daemon/manager.h
@@ -102,6 +102,7 @@ private slots:
void setMprisMetadata(QDBusArgument metadata);
void setMprisMetadata(QVariantMap metadata);
+ void onAppNotification(const QUuid &uuid, const QString &title, const QString &body);
void onAppMessage(const QUuid &uuid, const QVariantMap &data);
void onAppOpened(const QUuid &uuid);
void onAppClosed(const QUuid &uuid);