Home · All Namespaces · All Classes

NotificationSink Class Reference

#include <notificationsink.h>

Inheritance diagram for NotificationSink:
Inheritance graph
[legend]
Collaboration diagram for NotificationSink:
Collaboration graph
[legend]

List of all members.

Public Slots

virtual void addNotification (const Notification &notification)=0
virtual void removeNotification (uint notificationId)=0
virtual void addGroup (uint groupId, const NotificationParameters &parameters)
virtual void removeGroup (uint groupId)

Signals

void notificationRemovalRequested (uint notificationId)
void notificationGroupClearingRequested (uint groupId)

Public Member Functions

 NotificationSink ()
bool applicationEventsEnabled ()
 Returns whether the the sink should process notifications with ApplicationEvent type.
void setApplicationEventsEnabled (bool enabled)

Protected Member Functions

bool canAddNotification (const Notification &notification)

Detailed Description

Notification sink is an abstract interface for classes that can present notifications. Concrete notification sinks are responsible for presenting notifications and possibly notifying the NotificationManagerInterface if the notification was dismissed.

Definition at line 31 of file notificationsink.h.


Constructor & Destructor Documentation

NotificationSink::NotificationSink (  ) 

Definition at line 22 of file notificationsink.cpp.

00022                                    : appEventsEnabled(true)
00023 {
00024 }


Member Function Documentation

void NotificationSink::addGroup ( uint  groupId,
const NotificationParameters parameters 
) [virtual, slot]

Creates a notification group.

Parameters:
groupId the ID of the group
parameters NotificationParameters for the group

Definition at line 26 of file notificationsink.cpp.

00027 {
00028     Q_UNUSED(groupId)
00029     Q_UNUSED(parameters)
00030 }

virtual void NotificationSink::addNotification ( const Notification notification  )  [pure virtual, slot]

Adds a notification to be presented.

Parameters:
notification the data of the notification

Implemented in UnlockNotificationSink.

bool NotificationSink::applicationEventsEnabled (  ) 

Returns whether the the sink should process notifications with ApplicationEvent type.

Definition at line 37 of file notificationsink.cpp.

00038 {
00039     return appEventsEnabled;
00040 }

bool NotificationSink::canAddNotification ( const Notification notification  )  [protected]

Returns whether the sink should add the given notification

Parameters:
notification the notification

Reimplemented in UnlockNotificationSink.

Definition at line 47 of file notificationsink.cpp.

00048 {
00049     return appEventsEnabled || notification.type() == Notification::SystemEvent;
00050 }

Here is the call graph for this function:

void NotificationSink::notificationGroupClearingRequested ( uint  groupId  )  [signal]

Requests removal of notifications in a group.

Parameters:
groupId Id of the group to be cleared.
void NotificationSink::notificationRemovalRequested ( uint  notificationId  )  [signal]

Requests removal of a notification from the notification system. This can be connected to the associated NotificationManagerInterface::removeNotification().

Parameters:
notificationId Id of the notification to be removed from the system.
void NotificationSink::removeGroup ( uint  groupId  )  [virtual, slot]

Removes a notification group.

Parameters:
groupId the ID of the group

Definition at line 32 of file notificationsink.cpp.

00033 {
00034     Q_UNUSED(groupId)
00035 }

virtual void NotificationSink::removeNotification ( uint  notificationId  )  [pure virtual, slot]

Removes a notification.

Parameters:
notificationId the ID of the notification to be removed

Implemented in UnlockNotificationSink.

void NotificationSink::setApplicationEventsEnabled ( bool  enabled  ) 

Sets whether the the sink should process notifications with ApplicationEvent type

Parameters:
enabled the new status

Definition at line 42 of file notificationsink.cpp.

00043 {
00044     appEventsEnabled = enabled;
00045 }


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

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