CMmsAccounts Class Reference

class CMmsAccounts : public CActive

Stores MMS settings.

Inherits from

Public Member Functions
~CMmsAccounts ()
IMPORT_C void AddObserverL ( MMmsSettingsObserver &)
IMPORT_C TMmsAccountId CreateMMSAccountL (const TDesC &, const CMmsSettings &)
IMPORT_C TMmsAccountId DefaultMMSAccountL ()
IMPORT_C void DeleteMMSAccountL (const TMmsAccountId &)
IMPORT_C void GetMMSAccountsL ( RArray < TMmsAccountId > &)
IMPORT_C void LoadSettingsL (const TMmsAccountId &, CMmsSettings &)
IMPORT_C TInt MaxMMSAccounts ()
IMPORT_C CMmsAccounts * NewL ()
IMPORT_C CMmsAccounts * NewLC ()
IMPORT_C void PopulateDefaultSettingsL ( CMmsSettings &)
IMPORT_C void RemoveObserver ( MMmsSettingsObserver &)
IMPORT_C void SaveSettingsL (const TMmsAccountId &, const CMmsSettings &)
IMPORT_C void SetDefaultMMSAccountL (const TMmsAccountId &)
Private Member Functions
CMmsAccounts ()
void ConstructL ()
void DoCancel ()
void DoLoadSettingsL ( TUint32 , CMmsSettings &)
void DoSaveSettingsL ( TUint32 , const CMmsSettings &, const TDesC &)
TUint GetNextEmptyAccountSlotL ()
void RunL ()
Inherited Functions
CActive::Extension_(TUint,TAny *&,TAny *)
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
Private Member Enumerations
enum TMmsSettingsCenRepId {
EMmsAccountName  = 0x00000000, EMmsSettingsVersion  = 0x00000001, EMmsApplicationID  = 0x00000002, EMmsAddress  = 0x00000003, EMmsCreationMode  = 0x00000004, EMmsSettingsFlags  = 0x00000005, EMmsProxyCount  = 0x00000006, EMmsNapIdCount  = 0x00000007, EMmsAutomaticDownload  = 0x00000008, EMmsValidityPeriod  = 0x00000009, EMmsMaxDownloadSize  = 0x0000000A, EMmsMaxDownloadRetries  = 0x0000000B, EMmsDownloadRetryInterval  = 0x0000000C, EMmsMaxSendMsgSize  = 0x0000000D, EMmsDeviceContentClass  = 0x0000000E, EMmsMaxImageHeight  = 0x0000000F, EMmsMaxImageWidth  = 0x00000010, EMmsProxyList  = 0x00001000, EMmsNapIdList  = 0x00002000
Inherited Enumerations
Private Attributes
RPointerArray < MMmsSettingsObserver > iObservers
CRepository * iRepository
Inherited Attributes

Constructor & Destructor Documentation


CMmsAccounts ( ) [private]



IMPORT_C ~CMmsAccounts ( ) [virtual]


Member Functions Documentation

AddObserverL(MMmsSettingsObserver &)

IMPORT_C void AddObserverL ( MMmsSettingsObserver & aObserver )

Registers a new MMS Settings observer.


MMmsSettingsObserver & aObserver A reference to an observer to be registered for events


void ConstructL ( ) [private]

Second phase construction.

CreateMMSAccountL(const TDesC &, const CMmsSettings &)

IMPORT_C TMmsAccountId CreateMMSAccountL ( const TDesC & aAccountName,
const CMmsSettings & aSettings

Creates a MMS Account.


const TDesC & aAccountName MMS account Name
const CMmsSettings & aSettings MMS Settings


IMPORT_C TMmsAccountId DefaultMMSAccountL ( ) const

Gets the default MMS account.

KErrNotFound If the default account not been set previously or if MMSSettings for the default account does not exist in the Central Repository.

DeleteMMSAccountL(const TMmsAccountId &)

IMPORT_C void DeleteMMSAccountL ( const TMmsAccountId & aAccountId )

Deletes the specified MMS account.


const TMmsAccountId & aAccountId MMS account Id


void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .


DoLoadSettingsL(TUint32, CMmsSettings &)

void DoLoadSettingsL ( TUint32 aAccountId,
CMmsSettings & aSettings
) [private]


TUint32 aAccountId
CMmsSettings & aSettings

DoSaveSettingsL(TUint32, const CMmsSettings &, const TDesC &)

void DoSaveSettingsL ( TUint32 aAccountId,
const CMmsSettings & aSettings,
const TDesC & aAccountName
) const [private]


TUint32 aAccountId
const CMmsSettings & aSettings
const TDesC & aAccountName

GetMMSAccountsL(RArray< TMmsAccountId > &)

IMPORT_C void GetMMSAccountsL ( RArray < TMmsAccountId > & aAccountIds ) const

Gets a list of MMS account IDs stored in the Central Repository.

Any existing entries in the array will be deleted.


RArray < TMmsAccountId > & aAccountIds A list if MMS account Ids


TUint GetNextEmptyAccountSlotL ( ) [private]

LoadSettingsL(const TMmsAccountId &, CMmsSettings &)

IMPORT_C void LoadSettingsL ( const TMmsAccountId & aAccountId,
CMmsSettings & aSettings

Loads MMS settings from the Central Repository for the specified account Id.


const TMmsAccountId & aAccountId MMS account Id
CMmsSettings & aSettings MMS settings


IMPORT_C TInt MaxMMSAccounts ( )

Maximum number of accounts that can be stored in the Central Repository


IMPORT_C CMmsAccounts * NewL ( ) [static]

Allocates and constructs an MMS account object.

Initialises all member data to their default values.


IMPORT_C CMmsAccounts * NewLC ( ) [static]

Allocates and constructs an MMS account object.

Initialises all member data to their default values.

PopulateDefaultSettingsL(CMmsSettings &)

IMPORT_C void PopulateDefaultSettingsL ( CMmsSettings & aSettings )

Populates the supplied setting object with default values.


CMmsSettings & aSettings MMS Setting

RemoveObserver(MMmsSettingsObserver &)

IMPORT_C void RemoveObserver ( MMmsSettingsObserver & aObserver )

Deregisters a previously registered observer.


MMmsSettingsObserver & aObserver A reference to an observer to be unregistered for events


void RunL ( ) [private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

SaveSettingsL(const TMmsAccountId &, const CMmsSettings &)

IMPORT_C void SaveSettingsL ( const TMmsAccountId & aAccountId,
const CMmsSettings & aSettings
) const

Saves MMS settings to the Central Repository for the specified account Id.


const TMmsAccountId & aAccountId MMS account Id
const CMmsSettings & aSettings MMS settings

SetDefaultMMSAccountL(const TMmsAccountId &)

IMPORT_C void SetDefaultMMSAccountL ( const TMmsAccountId & aAccount )

Sets the default MMS account.


const TMmsAccountId & aAccount Account to be set as default

Member Enumerations Documentation

Enum TMmsSettingsCenRepId


EMmsAccountName = 0x00000000
EMmsSettingsVersion = 0x00000001
EMmsApplicationID = 0x00000002
EMmsAddress = 0x00000003
EMmsCreationMode = 0x00000004
EMmsSettingsFlags = 0x00000005
EMmsProxyCount = 0x00000006
EMmsNapIdCount = 0x00000007
EMmsAutomaticDownload = 0x00000008
EMmsValidityPeriod = 0x00000009
EMmsMaxDownloadSize = 0x0000000A
EMmsMaxDownloadRetries = 0x0000000B
EMmsDownloadRetryInterval = 0x0000000C
EMmsMaxSendMsgSize = 0x0000000D
EMmsDeviceContentClass = 0x0000000E
EMmsMaxImageHeight = 0x0000000F
EMmsMaxImageWidth = 0x00000010
EMmsProxyList = 0x00001000
EMmsNapIdList = 0x00002000

Member Data Documentation

RPointerArray< MMmsSettingsObserver > iObservers

RPointerArray < MMmsSettingsObserver > iObservers [private]

CRepository * iRepository

CRepository * iRepository [private]