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

QMailServiceAction Class Reference
[QtMessagingModule]

The QMailServiceAction class provides the interface for requesting actions from external message services. More...

    #include <QMailServiceAction>

This class is under development and is subject to change.

Inherits QObject.

Inherited by QMailRetrievalAction, QMailSearchAction, and QMailTransmitAction.

Public Types

Public Functions

Public Slots

Signals

Protected Functions

Additional Inherited Members


Detailed Description

The QMailServiceAction class provides the interface for requesting actions from external message services.

QMailServiceAction provides the mechanisms for messaging clients to request actions from external services, and to receive information in response. The details of requests differ for each derived action, and the specific data returned is also variable. However, all actions present the same interface for communicating status, connectivity and progress information.

All actions communicate changes in their operational state by emitting the activityChanged() signal. If the execution of the action requires connectivity to an external service, then changes in connectivity state are emitted via the connectivityChanged() signal. Some actions are able to provide progress information as they execute; these changes are reported via the progressChanged() signal. If error conditions are encountered, the statusChanged() signal is emitted to report the new status.

A user may attempt to cancel an operation after it has been initiated. The cancelOperation() slot is provided for this purpose.


Member Type Documentation

enum QMailServiceAction::Activity

This enum type is used to describe the activity state of the requested action.

ConstantValueDescription
QMailServiceAction::Pending0The action has not yet begun execution.
QMailServiceAction::InProgress1The action is currently executing.
QMailServiceAction::Successful2The action has completed successfully.
QMailServiceAction::Failed3The action could not be completed successfully, and has finished execution.

enum QMailServiceAction::Connectivity

This enum type is used to describe the connectivity state of the service implementing an action.

ConstantValueDescription
QMailServiceAction::Offline0The service is offline.
QMailServiceAction::Connecting1The service is currently attempting to establish a connection.
QMailServiceAction::Connected2The service is connected.
QMailServiceAction::Disconnected3The service has been disconnected.


Member Function Documentation

Activity QMailServiceAction::activity () const

Returns the current activity state of the action.

See also activityChanged().

void QMailServiceAction::activityChanged ( QMailServiceAction::Activity a )   [signal]

This signal is emitted when the activity status of the action changes, with the new state sdescribed by a.

See also activity().

void QMailServiceAction::cancelOperation ()   [virtual slot]

Attempts to cancel the last requested operation.

Connectivity QMailServiceAction::connectivity () const

Returns the current connectivity state of the service implementing this action.

See also connectivityChanged().

void QMailServiceAction::connectivityChanged ( QMailServiceAction::Connectivity c )   [signal]

This signal is emitted when the connectivity status of the service performing the action changes, with the new state described by c.

See also connectivity().

QPair<uint, uint> QMailServiceAction::progress () const

Returns the current progress of the service action.

See also progressChanged().

void QMailServiceAction::progressChanged ( uint value, uint total )   [signal]

This signal is emitted when the progress of the action changes, with the new state described by value and total.

See also progress().

void QMailServiceAction::setStatus ( Status::ErrorCode c, const QString & t = QString() )   [protected]

Set the current status so that QMailServiceAction::Status::errorCode errorCode is set to c and QMailServiceAction::Status::text text is set to t.

See also status().

void QMailServiceAction::setStatus ( Status::ErrorCode c, const QString & t, const QMailAccountId & a, const QMailFolderId & f = QMailFolderId(), const QMailMessageId & m = QMailMessageId() )   [protected]

This is an overloaded member function, provided for convenience.

Set the current status so that QMailServiceAction::Status::errorCode errorCode is set to c, QMailServiceAction::Status::text text is set to t, QMailServiceAction::Status::accountId accountId is set to a, QMailServiceAction::Status::folderId folderId is set to f and QMailServiceAction::Status::messageId messageId is set to m.

const Status QMailServiceAction::status () const

Returns the current status of the service action.

See also setStatus() and statusChanged().

void QMailServiceAction::statusChanged ( const QMailServiceAction::Status & s )   [signal]

This signal is emitted when the error status of the action changes, with the new status described by s.

See also status().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3