Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMailNewMessageHandler Class Reference
[QtMessagingModule]

The QMailNewMessageHandler class provides a convenient interface for responding to new message arrival notifications emitted by the message server. More...

    #include <QMailNewMessageHandler>

This class is under development and is subject to change.

Inherits QtopiaAbstractService.

Inherited by QMailNewEmailHandler, QMailNewInstantMessageHandler, QMailNewMmsHandler, QMailNewSmsHandler, and QMailNewSystemMessageHandler.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The QMailNewMessageHandler class provides a convenient interface for responding to new message arrival notifications emitted by the message server.

Clients should instantiate handlers derived from QMailNewMessageHandler for each type of new message notification that they wish to handle.

When a new message of some type is reported by the message server, each process that has registered to handle the 'New<MessageType>Arrival' service will be raised to handle the event. If the raised process instantiates a handler derived from QMailNewMessageHandler, the handler object will process the service request and emit the newCountChanged() signal.

In response to the newCountChanged() signal, the handler process should invoke the setHandled() slot, to communicate whether or not they have handled the event to the message server. If any handler process reports the event as handled, then the count of new messages of the specified type will be reset, and those messages will have the QMailMessage::New status flag unset.

The process may invoke setHandled() asynchronously, so it is possible to wait for a user response before responding to the event.


Member Function Documentation

QMailNewMessageHandler::QMailNewMessageHandler ( const QString & service, QObject * parent )

Constructs a new handler for the service service, with the specified parent.

QMailMessage::MessageType QMailNewMessageHandler::messageType () const   [pure virtual]

Returns the type of message handled by this event handler.

void QMailNewMessageHandler::newCountChanged ( uint newCount )   [signal]

Emitted when the arrival of new messages of the type returned by messageType() causes the count of new messages to increase. The increased count of new messages is newCount.

void QMailNewMessageHandler::setHandled ( bool b )   [slot]

If b is true, responds to the message server that the new message arrival event has been handled. If the event is reported as handled, then the count of new messages of the type returned by messageType() will be reset, and those messages will have the QMailMessage::New status flag unset.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3