Home

QMailMessageServiceFactory Class Reference

The QMailMessageServiceFactory class creates objects implementing the QMailMessageService interface. More...

    #include <QMailMessageServiceFactory>

Public Types

enum ServiceType { Any, Source, Sink, Storage }

Static Public Members

QMailMessageService * createService ( const QString & key, const QMailAccountId & accountId )
QMailMessageServiceConfigurator * createServiceConfigurator ( const QString & key )
QStringList keys ( ServiceType type = Any )
bool supports ( const QString & key, ServiceType type )
bool supports ( const QString & key, QMailMessage::MessageType messageType )

Detailed Description

The QMailMessageServiceFactory class creates objects implementing the QMailMessageService interface.

The QMailMessageServiceFactory class creates objects that provide messaging services to the messageserver daemon. The factory allows implementations to be loaded from plugin libraries, and to be retrieved and instantiated by name.

To create a new service that can be created via the QMailMessageServiceFactory, derive from the QMailMessageService base class, and optionally implement the QMailMessageSource and QMailMessageSink interfaces. Export your service via a subclass of the QMailMessageServicePlugin class.

See also QMailMessageService and QMailMessageServicePlugin.


Member Type Documentation

enum QMailMessageServiceFactory::ServiceType

This enum type is used to differentiate between the types of services that QMailMessageServiceFactory can manage.

ConstantValueDescription
QMailMessageServiceFactory::Any0Any type of service.
QMailMessageServiceFactory::Source1A message provision service.
QMailMessageServiceFactory::Sink2A message transmission service.
QMailMessageServiceFactory::Storage3A message content storage service.


Member Function Documentation

QMailMessageService * QMailMessageServiceFactory::createService ( const QString & key, const QMailAccountId & accountId )   [static]

Returns a new instance of the service identified by key, associating it with the account identified by accountId.

QMailMessageServiceConfigurator * QMailMessageServiceFactory::createServiceConfigurator ( const QString & key )   [static]

Returns a new instance of the configurator class for the service identified by key.

QStringList QMailMessageServiceFactory::keys ( ServiceType type = Any )   [static]

Returns a list of all message services of type type that can be instantiated by the factory.

bool QMailMessageServiceFactory::supports ( const QString & key, ServiceType type )   [static]

Returns true if the service identified by key supports the service type type.

bool QMailMessageServiceFactory::supports ( const QString & key, QMailMessage::MessageType messageType )   [static]

Returns true if the service identified by key supports the message type messageType.


Copyright © 2010 QtSoftware
Messaging Framework