|  | Home |

# ServiceConfiguration Class Reference
(QMailAccountConfiguration::ServiceConfiguration)

The ServiceConfiguration class provides access to the configuration parameters of a single named service within an account. More...

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Functions

QMailAccountId | id () const
void | removeValue ( const QString & name )
QString | service () const
void | setValue ( const QString & name, const QString & value )
QString | value ( const QString & name ) const
const QMap<QString, QString> & | values () const

## Detailed Description

The ServiceConfiguration class provides access to the configuration parameters of a single named service within an account.

ServiceConfiguration provides an interface mapping the configuration parameters of the service as a set of key-value pairs, where all data is maintained in QString form.

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

        QMailAccountConfiguration config(accountId);

        if (config.id().isValid()) {
            qDebug() << "Account" << config.id() << ":";
            foreach (const QString& service, config.services()) {
                QMailAccountConfiguration::ServiceConfiguration &svcCfg(config.serviceConfiguration(service));
                qDebug() << "\tService" << service << ":";
                foreach (const QString &name, svcCfg.values().keys()) {
                    qDebug() << "\t\t" << name << ":" << svcCfg.value(name);
                }
            }
        }

See also QMailAccountConfiguration::serviceConfiguration().

## Member Function Documentation

### QMailAccountId ServiceConfiguration::id () const

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

### void ServiceConfiguration::removeValue ( const QString & name )

Removes the parameter named name from the service configuration.

### QString ServiceConfiguration::service () const

Returns the name of the service to which this configuration pertains.

### void ServiceConfiguration::setValue ( const QString & name, const QString & value )

Sets the parameter named name to contain the value value in the service configuration.

See also value().

### QString ServiceConfiguration::value ( const QString & name ) const

Returns the value of the parameter named name in the service configuration.

See also setValue().

### const QMap<QString, QString> & ServiceConfiguration::values () const

Returns the values of the service configuration parameters.