Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Qt Extended Messaging Library

Overview

The Qt Extended Messaging library provides a set of APIs for accessing Qt Extended messaging data. Interfaces are provided to create, modify, store, retrieve and display messages. The library does not directly support sending or retrieving messages; these actions are currently supported via the QtopiaServiceRequest mechanism. For detailed class information refer to: Messaging Classes.

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

Composition and Manipulation of Messages

The Qt Extended Messaging 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 Qt Extended Messaging 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 Qt Extended Messaging library.
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 Qt Extended Messaging 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.
AccountConfigurationContains the configuration details for an account.

Message Listing

The Qt Extended Messaging 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 Qt Extended Messaging library.
QMailMessageListModelProvides a model representing the messages stored by the Qt Extended Messaging library.
QMailMessageDelegateProvides a standard visual representation of a message in a list view.

Message Navigation

The Qt Extended Messaging 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 Qt Extended Messaging 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.
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 Composer and Viewer Plugins

The Qt Extended Messaging Library uses a plugin system to register components that can compose and view messages. Although this mechanism can be accessed by applications, it is currently recommended that Services should be used to support message composing and viewing requirements.

Classes supporting the use of plugins for message composition and viewing:

ClassDescription
QMailComposerFactoryCreates objects implementing the QMailComposerInterface interface
QMailViewerFactoryCreates objects implementing the QMailViewerInterface interface
QMailComposerInterfaceDefines the interface to objects that can compose a mail message
QMailViewerInterfaceDefines the interface to objects that can display a mail message
QMailComposerPluginDefines a base class for implementing mail message composer plug-ins
QMailViewerPluginDefines a base class for implementing mail message viewer plug-ins
QMailComposerPluginInterfaceDefines the interface to plug-ins that provide mail message composers
QMailViewerPluginInterfaceDefines the interface to plug-ins that provide mail message viewers

Message Transport Service

The Qt Extended Messaging 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 and QMailSearchAction specialize QMailServiceAction to implement specific exchanges between a client application and the messaging server.

New Message Arrival Service

The Qt Extended Messaging library provides services permitting client applications to handle the event of new message arrival.

Each of QMailNewSmsHandler, QMailNewMmsHandler, QMailNewEmailHandler, QMailNewInstantMessageHandler and QMailNewSystemMessageHandler can be instantiated to permit a client application to respond to the arrival of new messages of the relevant type.

Concurrent Access to Messaging Data

The Qt Extended Messaging 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 Qt Extended Messaging library abstracts the storage method used to store messaging data. On a device the Qt Extended Messaging library will only read and write the primary storage mechanism and synchronizing mechanism.

Assumptions and Dependencies

The Qt Extended Messaging library requires SQL support either through the included SQLite or through some other SQL engine.

Examples

NameDescription
MessageViewerDemonstrates the use of QMailMessageMetaData and QMailMessageKey in finding and viewing messages.
MessageNavigatorDemonstrates the use of QMailMessageSetModel and QMailMessageListModel in presenting account, folder and message listings.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Quarterly au hasard

Logo

Écrire un périphérique personnalisé d'E/S

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web