Home

Messaging Framework Client Library

Overview

The Messaging Framework Client library provides a set of APIs for accessing messaging data. Interfaces are provided to create, modify, store, and retrieve messages. The library does not directly support sending or retrieving messages; these actions are currently supported via a service request mechanism.

The Client library provides unified access to the messaging data on a device including concurrent access to messaging data by multiple applications, and independence from the mechanism used to store the messaging data on the device.

For detailed class information refer to: Messaging Classes.

The library is augmented by two related, more specific libraries:

Composition and Manipulation of Messages

The Client library provides a number of classes to assist with the composition and manipulation of message data. Messages of all supported types are represented uniformly, although not all transport mechanisms are able to deliver more complex message formulations. Messages can be composed of multiple parts and constructed hierarchically. The Client library supports composition of multipart messages from individual part objects.

Classes to assist with composition and manipulation of messages:

ClassDescription
QMailMessageIdRepresents the mail store identifiers for message records.
QMailMessageMetaDataRepresents a message stored by the Messaging Framework.
QMailMessageConvenient interface for working with messages.
QMailMessagePartConvenient interface for working with message attachments.
QMailMessagePartContainerAccess to a collection of message parts.
QMailMessageBodyThe body element of a message or message part.
QMailMessageHeaderFieldEncapsulates the parsing of message header fields.
QMailMessageContentDispositionEncapsulates the parsing of the RFC 2822 'Content-Disposition' header field.
QMailMessageContentTypeEncapsulates the parsing of the RFC 2822 'Content-Type' header field.
QMailAddressInterface for manipulating message address strings.
QMailTimeStampManages message time stamps.
QMailCodecBase class for classes implementing codecs used in message composition.

Message Accounts

The Client Library provides classes for storing information about messaging accounts both outgoing and incoming.

Classes relating to messaging accounts:

ClassDescription
QMailAccountIdRepresents the mail store identifiers for account records.
QMailAccountStores attributes for a messaging account.
QMailFolderIdRepresents the mail store identifiers for folder records.
QMailFolderRepresents a folder for messages on the mail store.
QMailMessageRemovalRecordRepresents a message deleted from the local mail store.
QMailAccountConfigurationContains the configuration details for an account.

Message threads

The Client Library provides classes for storing information about message threads (a.k.a. conversations).

Classes relating to message threads:

ClassDescription
QMailThreadIdRepresents the mail store identifiers for thread records.
QMailThreadStores attributes for a message thread.

Message Listing

The Client library provides classes to assist with displaying lists of message data. These classes allow clients to display lists of messages and accounts with minimal effort, and with minimal resource consumption.

Classes to assist with listing messages:

ClassDescription
QMailAccountListModelProvides a model representing the accounts stored by the Messaging Framework.
QMailMessageListModelProvides a model representing the messages stored by the Messaging Framework.

Message Navigation

The Client library provides classes to assist with partitioning and navigating message data according to the intrinsic message properties. The classes allow clients to display a hierarchical taxonomy of message data, using standard or arbitrary categorization criteria.

Classes to assist with navigating messages:

ClassDescription
QMailMessageSetProvides a representation for a subset of the store's messages, suitable for display in a tree view.
QMailAccountMessageSetProvides a message set implementation grouping messages by their parent account ID.
QMailFolderMessageSetProvides a message set implementation grouping messages by their parent folder ID.
QMailFilterMessageSetProvides a message set implementation grouping messages by arbitrary criteria.
QMailMessageSetModelProvides a model representing arbitrary message sets in a tree arrangement.

Sorting and Searching Functionality

The Client library provides a number of sort and search functions to aid in selecting data most useful to the view requested. This reduces the burden on the application for managing the messaging data, as well as allowing better use of the underlying storage mechanism.

Sorting is accomplished by providing a sorting key, specifying the sort order, and the message property upon which to sort.

Searching is accomplished by providing a search condition, specifying a value, the message property to match, and the desired relation between the value and the message property. Search conditions can be combined to produce searches of arbitrary complexity.

Classes to assist with sorting and searching messages:

ClassDescription
QMailStoreRepresents the main interface for storage and retrieval of messages and folders on the mail store.
QMailAccountKeyDefines the parameters used for querying a subset of all available accounts from the mail store.
QMailAccountSortKeyDefines the parameters used for sorting accounts queried from the mail store.
QMailFolderKeyDefines the parameters used for querying a subset of all available mail folders from the mail store.
QMailFolderSortKeyDefines the parameters used for sorting mail folders queried from the mail store.
QMailThreadKeyDefines the parameters used for querying a subset of all available threads from the mail store.
QMailThreadSortKeyDefines the parameters used for sorting threads queried from the mail store.
QMailMessageKeyDefines the parameters used for querying a subset of all available mail messages from the mail store.
QMailMessageSortKeyDefines the parameters used for sorting messages queried from the mail store.

Message Content Management Plugins

The Client library uses a plugin system to register components that provide message content management services. Message content can be stored externally to the QMailStore that contains the message meta data; plugins can be implemented to provide the Message Library with access to this content.

Classes supporting the use of plugins for message content management:

ClassDescription
QMailContentManagerDefines the interface to objects that provide a message content management service
QMailContentManagerFactoryCreates objects implementing the QMailContentManager interface
QMailContentManagerPluginDefines a base class for implementing message content management plug-ins
QMailContentManagerPluginInterfaceDefines the interface to plug-ins that provide message content managers

Message Transport Service

The Client library provides the QMailMessageServer class, which provides an interface for a messaging client application to communicate with the system's messaging server. The messaging server provides services relating to the transmission and retrieval of messages from various sources defined by QMailAccount objects. Using QMailMessageServer, clients can communicate with the messaging server via local-process signals and slots, without having any direct contact with the server process.

The QMailServiceAction class provides a convenient abstraction above the QMailMessageServer interface, allowing clients to handle only events relating to a specific action requested from the messaging server. QMailRetrievalAction, QMailTransmitAction, QMailStorageAction, QMailSearchAction and QMailProtocolAction specialize QMailServiceAction to implement specific exchanges between a client application and the messaging server.

Concurrent Access to Messaging Data

The Client library provides a level of concurrent access to messaging data by multiple applications. The concurrent access does guarantee that data won't be corrupted by concurrent access, however does not give any guarantees as to performance of messaging data access if accessed concurrently by multiple applications.

Abstraction of Messaging Data Storage Mechanism

The Client library abstracts the storage method used to store messaging data. On a device the Client library will only read and write the primary storage mechanism and synchronizing mechanism.

Performance Characteristics

The performance of the Client library is tested using the reference messageserver implementation included with the Messaging Framework. Various tasks are performed using different amounts and sizes of message to determine the effect these parameters have on the library's performance. Placeholder: The results of these tests would be available <here>, if those results were currently exported.

Assumptions and Dependencies

The Client library requires SQL support either through the included SQLite or through some other SQL engine.

Examples

The QMF package contains some example programs that demonstrate how to use the library's functionality.

NameDescription
qtmailDemonstrates how to build a mail client application.
messagingaccountsDemonstrates how to build a stand alone accounts configuration application.
serverobserverDemonstrates how to build a stand alone application that observes actions being performed by the messageserver process.

Changes Between Versions

Historical changes in the Client library API are listed in CHANGES.qdoc.


Copyright © 2010 QtSoftware
Messaging Framework