|  | Home |

# QMailServiceConfiguration Class Reference

The QMailServiceConfiguration class provides a simple framework for creating wrappers classes that simplify service configuration management. More...

        #include <QMailServiceConfiguration>

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Types

enum | ServiceType { Unknown, Source, Sink, SourceAndSink, Storage }

## Public Functions

| QMailServiceConfiguration ( QMailAccountConfiguration * config, const QString & service )
| QMailServiceConfiguration ( const QMailAccountConfiguration & config, const QString & service )
| QMailServiceConfiguration ( const QMailAccountConfiguration::ServiceConfiguration & svcCfg )
QMailAccountId | id () const
bool | isEmpty () const
bool | isValid () const
QString | service () const
void | setType ( ServiceType type )
void | setValue ( const QString & name, const QString & value )
void | setVersion ( int version )
ServiceType | type () const
QString | value ( const QString & name, const QString & defaultValue = QString() ) const
int | version () const

## Static Protected Members

QString | decodeValue ( const QString & value )
QString | encodeValue ( const QString & value )

## Detailed Description

The QMailServiceConfiguration class provides a simple framework for creating wrappers classes that simplify service configuration management.

QMailServiceConfiguration provides a simple interface for manipulating the configuration parameters of a single service within an account configuration. For each specific service implemented, a configuration class derived from QMailServiceConfiguration should be implemented to make the configuration easily accessible.

See also QMailAccountConfiguration::ServiceConfiguration.

## Member Type Documentation

### enum QMailServiceConfiguration::ServiceType

This enum type is used to describe the type of a service

Constant | Value | Description
--- | --- | ---
`QMailServiceConfiguration::Unknown` | `0` | The type of the service is unknown.
`QMailServiceConfiguration::Source` | `1` | The service is a message source.
`QMailServiceConfiguration::Sink` | `2` | The service is a message sink.
`QMailServiceConfiguration::SourceAndSink` | `3` | The service is both a message source and a message sink.
`QMailServiceConfiguration::Storage` | `4` | The service is a content manager.

See also QMailMessageSource and QMailMessageSink.

## Member Function Documentation

### QMailServiceConfiguration::QMailServiceConfiguration ( QMailAccountConfiguration * config, const QString & service )

Creates a configuration object accessing the parameters of the service service within the account configuration object config.

### QMailServiceConfiguration::QMailServiceConfiguration ( const QMailAccountConfiguration & config, const QString & service )

Creates a configuration object accessing the parameters of the service service within the account configuration object config.

### QMailServiceConfiguration::QMailServiceConfiguration ( const QMailAccountConfiguration::ServiceConfiguration & svcCfg )

Creates a configuration object accessing the service configuration parameters described by svcCfg.

### QString QMailServiceConfiguration::decodeValue ( const QString & value ) `[static protected]`

Returns the string value decoded from base-64 encoded form.

### QString QMailServiceConfiguration::encodeValue ( const QString & value ) `[static protected]`

Returns the string value encoded into base-64 encoded form.

### QMailAccountId QMailServiceConfiguration::id () const

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

### bool QMailServiceConfiguration::isEmpty () const

Returns true if no configuration parameters are recorded for the service.

### bool QMailServiceConfiguration::isValid () const

Returns true if the service is present in the account configuration.

### QString QMailServiceConfiguration::service () const

Returns the service that this configuration pertains to.

### void QMailServiceConfiguration::setType ( ServiceType type )

Sets the type of the service to type.

See also type().

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

Sets the configuration parameter name to have the value value.

See also value().

### void QMailServiceConfiguration::setVersion ( int version )

Sets the version of the service configuration to version.

See also version().

### ServiceType QMailServiceConfiguration::type () const

Returns the type of the service.

See also setType().

### QString QMailServiceConfiguration::value ( const QString & name, const QString & defaultValue = QString() ) const

Returns the value of the configuration parameter name, if present. Otherwise returns defaultValue.

See also setValue().

### int QMailServiceConfiguration::version () const

Returns the version of the service configuration.

See also setVersion().