![]() |
Home · All Namespaces · All Classes |
A class for storing notification information. More...
#include <notification.h>

Public Types | |
| enum | NotificationType { ApplicationEvent, SystemEvent } |
Public Member Functions | |
| Notification () | |
| Notification (uint notificationId, uint groupId, uint userId, const NotificationParameters ¶meters, NotificationType type, int timeout) | |
| ~Notification () | |
| uint | notificationId () const |
| uint | userId () const |
| uint | groupId () const |
| const NotificationParameters & | parameters () const |
| void | setParameters (const NotificationParameters ¶meters) |
| void | updateParameters (const NotificationParameters ¶meters) |
| NotificationType | type () const |
| int | timeout () const |
Friends | |
| QDataStream & | operator<< (QDataStream &, const Notification &) |
| QDataStream & | operator>> (QDataStream &, Notification &) |
| QDBusArgument & | operator<< (QDBusArgument &, const Notification ¬ification) |
| const QDBusArgument & | operator>> (const QDBusArgument &, Notification &) |
A class for storing notification information.
The information can also be serialized in and out of a QDataStream.
Definition at line 35 of file notification.h.
Notification types.
Definition at line 41 of file notification.h.
{
ApplicationEvent,
SystemEvent
};
| Notification::Notification | ( | ) |
Empty constructor. Initializes the values to defaults.
Definition at line 25 of file notification.cpp.
:
notificationId_(0),
groupId_(0),
userId_(0),
parameters_(),
type_(ApplicationEvent),
timeout_(0)
{
}
| Notification::Notification | ( | uint | notificationId, | |
| uint | groupId, | |||
| uint | userId, | |||
| const NotificationParameters & | parameters, | |||
| NotificationType | type, | |||
| int | timeout | |||
| ) |
Constructor.
| notificationId | the ID of this notification | |
| groupId | the group ID of this notification | |
| userId | the user ID associated to this notification | |
| parameters | parameters for the notification to be presented | |
| type | the type of the notification to be presented. |
| timeout | The number of milliseconds to present the notification for |
Definition at line 35 of file notification.cpp.
:
notificationId_(notificationId),
groupId_(groupId),
userId_(userId),
parameters_(parameters),
type_(type),
timeout_(timeout)
{
}
| Notification::~Notification | ( | ) |
| uint Notification::groupId | ( | ) | const |
Returns the group ID of this notification.
Definition at line 54 of file notification.cpp.
{
return groupId_;
}
| uint Notification::notificationId | ( | ) | const |
Returns the ID of this notification.
Definition at line 49 of file notification.cpp.
{
return notificationId_;
}
| const NotificationParameters & Notification::parameters | ( | ) | const |
Returns the parameters list for this notification.
Definition at line 64 of file notification.cpp.
{
return parameters_;
}
| void Notification::setParameters | ( | const NotificationParameters & | parameters | ) |
Sets the parameters list for this notification.
| parameters | parameters for this notification |
Definition at line 69 of file notification.cpp.
{
parameters_ = parameters;
}
| int Notification::timeout | ( | ) | const |
Returns the timeout of this notification.
Definition at line 84 of file notification.cpp.
{
return timeout_;
}
| Notification::NotificationType Notification::type | ( | ) | const |
Returns the type of this notification.
Definition at line 79 of file notification.cpp.
{
return type_;
}
| void Notification::updateParameters | ( | const NotificationParameters & | parameters | ) |
Updates the parameters of this notification. The existing parameters in the notification remain as they are. Only new values from the argument are appended/updated.
| parameters | the parameters that will be updated |
Definition at line 74 of file notification.cpp.
{
parameters_.update(parameters);
}

| uint Notification::userId | ( | ) | const |
Returns the user ID associated with this notification.
Definition at line 59 of file notification.cpp.
{
return userId_;
}
| QDataStream& operator<< | ( | QDataStream & | , | |
| const Notification & | ||||
| ) | [friend] |
Serializes the given Notification to a QDataStream
| datastream | QDataStream to write to | |
| notification | Notification object to serialize |
Definition at line 90 of file notification.cpp.
{
datastream << notification.notificationId_;
datastream << qint32(notification.type_);
datastream << notification.groupId_;
datastream << notification.userId_;
datastream << notification.timeout_;
datastream << notification.parameters_;
return datastream;
}
| QDBusArgument& operator<< | ( | QDBusArgument & | argument, | |
| const Notification & | notification | |||
| ) | [friend] |
Definition at line 116 of file notification.cpp.
{
argument.beginStructure();
argument << notification.notificationId_;
argument << qint32(notification.type_);
argument << notification.groupId_;
argument << notification.userId_;
argument << notification.timeout_;
argument << notification.parameters_;
argument.endStructure();
return argument;
}
| const QDBusArgument& operator>> | ( | const QDBusArgument & | argument, | |
| Notification & | notification | |||
| ) | [friend] |
Definition at line 130 of file notification.cpp.
{
argument.beginStructure();
argument >> notification.notificationId_;
qint32 s;
argument >> s;
notification.type_ = static_cast<Notification::NotificationType>(s);
argument >> notification.groupId_;
argument >> notification.userId_;
argument >> notification.timeout_;
argument >> notification.parameters_;
argument.endStructure();
return argument;
}
| QDataStream& operator>> | ( | QDataStream & | , | |
| Notification & | ||||
| ) | [friend] |
Deserializes a Notification from a QDataStream
| datastream | QDataStream to read from | |
| notification | the target Notification object, its previous state will be reset |
Definition at line 101 of file notification.cpp.
{
datastream >> notification.notificationId_;
qint32 s;
datastream >> s;
notification.type_ = static_cast<Notification::NotificationType>(s);
datastream >> notification.groupId_;
datastream >> notification.userId_;
datastream >> notification.timeout_;
datastream >> notification.parameters_;
return datastream;
}
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:19:35 Doxygen 1.7.1 |
MeeGo Touch |