diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-24 00:31:46 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-24 00:31:46 +0200 |
commit | cba26597f1c09764d37be0d13863ec5d5c340da0 (patch) | |
tree | 5559b1274c228673e2bd519135de8de596c7e91b /libsowatch | |
parent | b414dbdb28d839c9755b1832f27f61d1ec9e7863 (diff) | |
download | sowatch-cba26597f1c09764d37be0d13863ec5d5c340da0.tar.gz sowatch-cba26597f1c09764d37be0d13863ec5d5c340da0.zip |
new partially working incoming call plugin
Diffstat (limited to 'libsowatch')
-rw-r--r-- | libsowatch/notification.h | 4 | ||||
-rw-r--r-- | libsowatch/notificationprovider.h | 4 | ||||
-rw-r--r-- | libsowatch/watch.h | 2 | ||||
-rw-r--r-- | libsowatch/watchserver.cpp | 12 | ||||
-rw-r--r-- | libsowatch/watchserver.h | 2 |
5 files changed, 22 insertions, 2 deletions
diff --git a/libsowatch/notification.h b/libsowatch/notification.h index 80d7996..7a46ab7 100644 --- a/libsowatch/notification.h +++ b/libsowatch/notification.h @@ -13,11 +13,11 @@ class SOWATCH_EXPORT Notification public: enum Type { OtherNotification = 0, - CallNotification, - EmailNotification, MissedCallNotification, SmsNotification, + MmsNotification, ImNotification, + EmailNotification, CalendarNotification, TypeCount }; diff --git a/libsowatch/notificationprovider.h b/libsowatch/notificationprovider.h index 6f31581..fe835ef 100644 --- a/libsowatch/notificationprovider.h +++ b/libsowatch/notificationprovider.h @@ -22,6 +22,10 @@ signals: void notification(const Notification& n); void unreadCountChanged(Notification::Type type); + void weatherUpdate(); + + void incomingCall(const QString& displayName); + void endIncomingCall(); }; } diff --git a/libsowatch/watch.h b/libsowatch/watch.h index fff4c15..5552a8c 100644 --- a/libsowatch/watch.h +++ b/libsowatch/watch.h @@ -41,6 +41,8 @@ signals: public slots: virtual void vibrate(bool on) = 0; virtual void showNotification(const Notification& n) = 0; + virtual void startRinging(const QString& text) = 0; + virtual void stopRinging() = 0; }; } diff --git a/libsowatch/watchserver.cpp b/libsowatch/watchserver.cpp index 8d00088..942131f 100644 --- a/libsowatch/watchserver.cpp +++ b/libsowatch/watchserver.cpp @@ -26,6 +26,8 @@ void WatchServer::addProvider(NotificationProvider *provider) connect(provider, SIGNAL(notification(Notification)), SLOT(notificationEmitted(Notification))); connect(provider, SIGNAL(unreadCountChanged(Notification::Type)), SLOT(unreadCountUpdated(Notification::Type))); + connect(provider, SIGNAL(incomingCall(QString)), SLOT(incomingCall(QString))); + connect(provider, SIGNAL(endIncomingCall()), SLOT(endIncomingCall())); _providers.append(provider); } @@ -85,3 +87,13 @@ void WatchServer::unreadCountUpdated(Notification::Type type) } _watch->updateNotificationCount(type, count); } + +void WatchServer::incomingCall(const QString &displayText) +{ + qDebug() << "Incoming call" << displayText; +} + +void WatchServer::endIncomingCall() +{ + qDebug() << "End incoming call"; +} diff --git a/libsowatch/watchserver.h b/libsowatch/watchserver.h index 0ca1f4f..27d29aa 100644 --- a/libsowatch/watchserver.h +++ b/libsowatch/watchserver.h @@ -44,6 +44,8 @@ protected slots: void watchDisconnected(); void notificationEmitted(const Notification& notification); void unreadCountUpdated(Notification::Type type); + void incomingCall(const QString& displayText); + void endIncomingCall(); friend class Watchlet; }; |