Home · All Namespaces · All Classes

Notification Class Reference

A class for storing notification information. More...

#include <notification.h>

Collaboration diagram for Notification:
Collaboration graph
[legend]

List of all members.

Public Types

enum  NotificationType { ApplicationEvent, SystemEvent }

Public Member Functions

 Notification ()
 Notification (uint notificationId, uint groupId, uint userId, const NotificationParameters &parameters, NotificationType type, int timeout)
 ~Notification ()
uint notificationId () const
uint userId () const
uint groupId () const
const NotificationParametersparameters () const
void setParameters (const NotificationParameters &parameters)
void updateParameters (const NotificationParameters &parameters)
NotificationType type () const
int timeout () const

Friends

QDataStream & operator<< (QDataStream &, const Notification &)
QDataStream & operator>> (QDataStream &, Notification &)
QDBusArgument & operator<< (QDBusArgument &, const Notification &notification)
const QDBusArgument & operator>> (const QDBusArgument &, Notification &)

Detailed Description

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.


Member Enumeration Documentation

Notification types.

Enumerator:
ApplicationEvent 
SystemEvent 

Definition at line 41 of file notification.h.

00041                           {
00042         ApplicationEvent,
00043         SystemEvent
00044     };


Constructor & Destructor Documentation

Notification::Notification (  ) 

Empty constructor. Initializes the values to defaults.

Definition at line 25 of file notification.cpp.

00025                            :
00026     notificationId_(0),
00027     groupId_(0),
00028     userId_(0),
00029     parameters_(),
00030     type_(ApplicationEvent),
00031     timeout_(0)
00032 {
00033 }

Notification::Notification ( uint  notificationId,
uint  groupId,
uint  userId,
const NotificationParameters parameters,
NotificationType  type,
int  timeout 
)

Constructor.

Parameters:
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.
See also:
NotificationType.
Parameters:
timeout The number of milliseconds to present the notification for

Definition at line 35 of file notification.cpp.

00035                                                                                                                                                        :
00036     notificationId_(notificationId),
00037     groupId_(groupId),
00038     userId_(userId),
00039     parameters_(parameters),
00040     type_(type),
00041     timeout_(timeout)
00042 {
00043 }

Notification::~Notification (  ) 

Destructor.

Definition at line 45 of file notification.cpp.

00046 {
00047 }


Member Function Documentation

uint Notification::groupId (  )  const

Returns the group ID of this notification.

Returns:
group ID of this notification

Definition at line 54 of file notification.cpp.

00055 {
00056     return groupId_;
00057 }

uint Notification::notificationId (  )  const

Returns the ID of this notification.

Returns:
ID of this notification

Definition at line 49 of file notification.cpp.

00050 {
00051     return notificationId_;
00052 }

const NotificationParameters & Notification::parameters (  )  const

Returns the parameters list for this notification.

Returns:
parameters list for this notification

Definition at line 64 of file notification.cpp.

00065 {
00066     return parameters_;
00067 }

void Notification::setParameters ( const NotificationParameters parameters  ) 

Sets the parameters list for this notification.

Parameters:
parameters parameters for this notification
See also:
updateParameters

Definition at line 69 of file notification.cpp.

00070 {
00071     parameters_ = parameters;
00072 }

int Notification::timeout (  )  const

Returns the timeout of this notification.

Returns:
timeout of this notification

Definition at line 84 of file notification.cpp.

00085 {
00086     return timeout_;
00087 }

Notification::NotificationType Notification::type (  )  const

Returns the type of this notification.

Returns:
type of this notification

Definition at line 79 of file notification.cpp.

00080 {
00081     return type_;
00082 }

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:
parameters the parameters that will be updated
See also:
setParameters

Definition at line 74 of file notification.cpp.

00075 {
00076     parameters_.update(parameters);
00077 }

Here is the call graph for this function:

uint Notification::userId (  )  const

Returns the user ID associated with this notification.

Returns:
user ID associated with this notification

Definition at line 59 of file notification.cpp.

00060 {
00061     return userId_;
00062 }


Friends And Related Function Documentation

QDBusArgument& operator<< ( QDBusArgument &  ,
const Notification notification 
) [friend]
QDataStream& operator<< ( QDataStream &  ,
const Notification  
) [friend]
const QDBusArgument& operator>> ( const QDBusArgument &  ,
Notification  
) [friend]
QDataStream& operator>> ( QDataStream &  ,
Notification  
) [friend]

The documentation for this class was generated from the following files:

Copyright © 2010 Nokia Corporation Generated on Wed Nov 10 16:05:08 2010
Doxygen 1.6.1
MeeGo Touch