![]() |
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 00021 #ifndef NOTIFICATION_H_ 00022 #define NOTIFICATION_H_ 00023 00024 #include "notificationparameters.h" 00025 #include <QVariant> 00026 00027 class QDataStream; 00028 class QDBusArgument; 00029 00035 class Notification 00036 { 00037 public: 00041 enum NotificationType { 00042 ApplicationEvent, 00043 SystemEvent 00044 }; 00045 00049 Notification(); 00050 00061 Notification(uint notificationId, uint groupId, uint userId, const NotificationParameters ¶meters, NotificationType type, int timeout); 00062 00066 ~Notification(); 00067 00073 uint notificationId() const; 00074 00080 uint userId() const; 00081 00087 uint groupId() const; 00088 00094 const NotificationParameters ¶meters() const; 00095 00102 void setParameters(const NotificationParameters ¶meters); 00103 00110 void updateParameters(const NotificationParameters ¶meters); 00111 00117 NotificationType type() const; 00118 00124 int timeout() const; 00125 00126 00127 friend QDataStream &operator<<(QDataStream &, const Notification &); 00128 friend QDataStream &operator>>(QDataStream &, Notification &); 00129 00130 friend QDBusArgument &operator<<(QDBusArgument &, const Notification ¬ification); 00131 friend const QDBusArgument &operator>>(const QDBusArgument &, Notification &); 00132 00133 private: 00135 uint notificationId_; 00137 uint groupId_; 00139 uint userId_; 00141 NotificationParameters parameters_; 00143 NotificationType type_; 00145 int timeout_; 00146 }; 00147 00148 Q_DECLARE_METATYPE(Notification) 00149 00150 00156 QDataStream &operator<<(QDataStream &datastream, const Notification ¬ification); 00157 00164 QDataStream &operator>>(QDataStream &datastream, Notification ¬ification); 00165 00166 00167 #endif // NOTIFICATION_H_
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |