diff options
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; }; |