From b8f4002115abfc7a63af023e6199284041368a62 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 10 Feb 2016 23:19:57 +0100 Subject: Add specific missed call notification and other tweaks --- daemon/manager.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'daemon/manager.cpp') diff --git a/daemon/manager.cpp b/daemon/manager.cpp index 4d6a525..55138d9 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -52,6 +52,7 @@ Manager::Manager(Settings *settings, QObject *parent) : connect(notifications, SIGNAL(error(const QString &)), SLOT(onNotifyError(const QString &))); connect(notifications, SIGNAL(emailNotify(const QString &,const QString &,const QString &)), SLOT(onEmailNotify(const QString &,const QString &,const QString &))); + connect(notifications, SIGNAL(missedCallNotify(const QString &,const QString &)), SLOT(onMissedCallNotify(const QString &,const QString &))); connect(notifications, SIGNAL(smsNotify(const QString &,const QString &)), SLOT(onSmsNotify(const QString &,const QString &))); connect(notifications, SIGNAL(twitterNotify(const QString &,const QString &)), SLOT(onTwitterNotify(const QString &,const QString &))); connect(notifications, SIGNAL(facebookNotify(const QString &,const QString &)), SLOT(onFacebookNotify(const QString &,const QString &))); @@ -139,12 +140,12 @@ void Manager::onActiveVoiceCallStatusChanged() return; } - qCDebug(l) << "handlerId:" << handler->handlerId() - << "providerId:" << handler->providerId() - << "status:" << handler->status() - << "statusText:" << handler->statusText() - << "lineId:" << handler->lineId() - << "incoming:" << handler->isIncoming(); +// qCDebug(l) << "handlerId:" << handler->handlerId() +// << "providerId:" << handler->providerId() +// << "status:" << handler->status() +// << "statusText:" << handler->statusText() +// << "lineId:" << handler->lineId() +// << "incoming:" << handler->isIncoming(); if (!watch->isConnected()) { qCDebug(l) << "Watch is not connected"; @@ -203,6 +204,15 @@ void Manager::onNotifyError(const QString &message) qWarning() << "Error:" << message; } +void Manager::onMissedCallNotify(const QString &sender, const QString &data) +{ + if (settings->property("transliterateMessage").toBool()) { + transliterateMessage(sender); + transliterateMessage(data); + } + watch->sendMissedCallNotification(sender, data); +} + void Manager::onSmsNotify(const QString &sender, const QString &data) { if (settings->property("transliterateMessage").toBool()) { -- cgit v1.2.3