![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef DBUSINTERFACENOTIFICATIONSINK_H_ 00021 #define DBUSINTERFACENOTIFICATIONSINK_H_ 00022 00023 #include <QSharedPointer> 00024 #include "notificationsink.h" 00025 #include "notificationgroup.h" 00026 00027 class DBusInterfaceNotificationSinkProxy; 00028 class NotificationManagerInterface; 00029 00033 class DBusInterfaceNotificationSink : public NotificationSink 00034 { 00035 Q_OBJECT 00036 00037 public: 00042 DBusInterfaceNotificationSink(NotificationManagerInterface* notificationManager); 00043 00047 virtual ~DBusInterfaceNotificationSink(); 00048 00055 void registerSink(const QString &service, const QString &path); 00056 00063 void unregisterSink(const QString &service, const QString &path); 00064 00065 private: 00067 typedef QPair<QString, QString> ProxyAddress; 00069 typedef QSharedPointer<DBusInterfaceNotificationSinkProxy> DBusInterface; 00071 typedef QHash<ProxyAddress, DBusInterface> ProxyContainer; 00072 00073 private slots: 00075 virtual void addGroup(uint groupId, const NotificationParameters ¶meters); 00076 virtual void removeGroup(uint groupId); 00077 virtual void addNotification(const Notification ¬ification); 00078 virtual void removeNotification(uint notificationId); 00080 00085 virtual void sendCurrentNotifications(const DBusInterface &proxy) const; 00086 00092 void sendGroupsToProxy(const QList<NotificationGroup> &groups, const DBusInterface &proxyInterface) const; 00093 00099 void sendNotificationsToProxy(const QList<Notification> ¬ifications, const DBusInterface &proxyInterface) const; 00100 00101 private: 00106 ProxyContainer proxies; 00107 00109 const NotificationManagerInterface *notificationManager; 00110 00111 #ifdef UNIT_TEST 00112 friend class Ut_DBusInterfaceNotificationSink; 00113 #endif 00114 }; 00115 00116 #endif /* DBUSINTERFACENOTIFICATIONSINK_H_ */
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |