|  | Home |

# QMailAccountConfiguration Class Reference

The QMailAccountConfiguration class contains the configuration parameters of an account. More...

        #include <QMailAccountConfiguration>

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Types

class | ServiceConfiguration `(preliminary)`

## Public Functions

| QMailAccountConfiguration ()
| QMailAccountConfiguration ( const QMailAccountId & id )
bool | addServiceConfiguration ( const QString & service )
QMailAccountId | id () const
bool | removeServiceConfiguration ( const QString & service )
ServiceConfiguration & | serviceConfiguration ( const QString & service )
const ServiceConfiguration & | serviceConfiguration ( const QString & service ) const
QStringList | services () const
void | setId ( const QMailAccountId & id )

## Detailed Description

The QMailAccountConfiguration class contains the configuration parameters of an account.

QMailAccountConfiguration provides the configuration information for a single account, as retrieved from the mail store. The configuration is stored as key-value pairs, grouped into services, where each service within the account has a different name. A service typically corresponds to a protocol used to implement the account.

To modify the configuration details, the ServiceConfiguration class must be used. ServiceConfiguration groupings may be added to and removed from the account configuration, but a service configuration may not be modified until it has been added. A service is not stored in the mail store until it has member parameters.

ServiceConfiguration objects are allocated by, and retained within the QMailAccountConfiguration object.

A ServiceConfiguration object cannot be directly constructed, but can be acquired from the containing account's QMailAccountConfiguration object.

See also QMailAccountConfiguration::serviceConfiguration().

## Member Function Documentation

### QMailAccountConfiguration::QMailAccountConfiguration ()

Creates an empty configuration object which is not associated with any account.

### QMailAccountConfiguration::QMailAccountConfiguration ( const QMailAccountId & id )

Creates a configuration object which contains the configuration details of the account identified by id.

### bool QMailAccountConfiguration::addServiceConfiguration ( const QString & service )

Adds a configuration for the service named service within the account configuration. Returns true if successful; otherwise returns false;

### QMailAccountId QMailAccountConfiguration::id () const

Returns the identifier of the account that this configuration pertains to.

See also setId().

### bool QMailAccountConfiguration::removeServiceConfiguration ( const QString & service )

Removes the configuration for the service named service within the account configuration. Returns true if successful; otherwise returns false;

### ServiceConfiguration & QMailAccountConfiguration::serviceConfiguration ( const QString & service )

Returns the configuration for the service service, which must be present within the account configuration.

ServiceConfiguration instances are allocated by, and retained within the QMailAccountConfiguration object.

### const ServiceConfiguration & QMailAccountConfiguration::serviceConfiguration ( const QString & service ) const

Returns the configuration for the service service, which must be present within the account configuration.

ServiceConfiguration instances are allocated by, and retained within the QMailAccountConfiguration object.

See also QMailAccountConfiguration::serviceConfiguration().

### QStringList QMailAccountConfiguration::services () const

Returns a list of the services whose configurations are contained within the account configuration.

### void QMailAccountConfiguration::setId ( const QMailAccountId & id )

Sets the configuration to pertain to the account identified by id.

See also id().