CMmsAccounts Class Reference

class CMmsAccounts : public CActive

Stores MMS settings.

Inherits from

Public Member Functions
~CMmsAccounts()
IMPORT_C voidAddObserverL(MMmsSettingsObserver &)
IMPORT_C TMmsAccountIdCreateMMSAccountL(const TDesC &, const CMmsSettings &)
IMPORT_C TMmsAccountIdDefaultMMSAccountL()
IMPORT_C voidDeleteMMSAccountL(const TMmsAccountId &)
IMPORT_C voidGetMMSAccountsL(RArray< TMmsAccountId > &)
IMPORT_C voidLoadSettingsL(const TMmsAccountId &, CMmsSettings &)
IMPORT_C TIntMaxMMSAccounts()
IMPORT_C CMmsAccounts *NewL()
IMPORT_C CMmsAccounts *NewLC()
IMPORT_C voidPopulateDefaultSettingsL(CMmsSettings &)
IMPORT_C voidRemoveObserver(MMmsSettingsObserver &)
IMPORT_C voidSaveSettingsL(const TMmsAccountId &, const CMmsSettings &)
IMPORT_C voidSetDefaultMMSAccountL(const TMmsAccountId &)
Private Member Functions
CMmsAccounts()
voidConstructL()
voidDoCancel()
voidDoLoadSettingsL(TUint32, CMmsSettings &)
voidDoSaveSettingsL(TUint32, const CMmsSettings &, const TDesC &)
TUint GetNextEmptyAccountSlotL()
voidRunL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
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)
CBase::~CBase()
Private Member Enumerations
enumTMmsSettingsCenRepId {
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
CActive:TPriority
Private Attributes
RPointerArray< MMmsSettingsObserver >iObservers
CRepository *iRepository
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CMmsAccounts()

CMmsAccounts()[private]

Constructor.

~CMmsAccounts()

IMPORT_C~CMmsAccounts()[virtual]

Destructor.

Member Functions Documentation

AddObserverL(MMmsSettingsObserver &)

IMPORT_C voidAddObserverL(MMmsSettingsObserver &aObserver)

Registers a new MMS Settings observer.

Parameters

MMmsSettingsObserver & aObserverA reference to an observer to be registered for events

ConstructL()

voidConstructL()[private]

Second phase construction.

CreateMMSAccountL(const TDesC &, const CMmsSettings &)

IMPORT_C TMmsAccountIdCreateMMSAccountL(const TDesC &aAccountName,
const CMmsSettings &aSettings
)

Creates a MMS Account.

MMS Account Id

Parameters

const TDesC & aAccountNameMMS account Name
const CMmsSettings & aSettingsMMS Settings

DefaultMMSAccountL()

IMPORT_C TMmsAccountIdDefaultMMSAccountL()const

Gets the default MMS account.

The default account

leave

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 voidDeleteMMSAccountL(const TMmsAccountId &aAccountId)

Deletes the specified MMS account.

Parameters

const TMmsAccountId & aAccountIdMMS account Id

DoCancel()

voidDoCancel()[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().

CActive::Cancel

DoLoadSettingsL(TUint32, CMmsSettings &)

voidDoLoadSettingsL(TUint32aAccountId,
CMmsSettings &aSettings
)[private]

Parameters

TUint32 aAccountId
CMmsSettings & aSettings

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

voidDoSaveSettingsL(TUint32aAccountId,
const CMmsSettings &aSettings,
const TDesC &aAccountName
)const [private]

Parameters

TUint32 aAccountId
const CMmsSettings & aSettings
const TDesC & aAccountName

GetMMSAccountsL(RArray< TMmsAccountId > &)

IMPORT_C voidGetMMSAccountsL(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.

Parameters

RArray< TMmsAccountId > & aAccountIdsA list if MMS account Ids

GetNextEmptyAccountSlotL()

TUint GetNextEmptyAccountSlotL()[private]

LoadSettingsL(const TMmsAccountId &, CMmsSettings &)

IMPORT_C voidLoadSettingsL(const TMmsAccountId &aAccountId,
CMmsSettings &aSettings
)

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

Parameters

const TMmsAccountId & aAccountIdMMS account Id
CMmsSettings & aSettingsMMS settings

MaxMMSAccounts()

IMPORT_C TIntMaxMMSAccounts()

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

The maximum number of accounts

NewL()

IMPORT_C CMmsAccounts *NewL()[static]

Allocates and constructs an MMS account object.

Initialises all member data to their default values.

The newly constructed MMS account object.

NewLC()

IMPORT_C CMmsAccounts *NewLC()[static]

Allocates and constructs an MMS account object.

Initialises all member data to their default values.

The newly constructed MMS account object.

PopulateDefaultSettingsL(CMmsSettings &)

IMPORT_C voidPopulateDefaultSettingsL(CMmsSettings &aSettings)

Populates the supplied setting object with default values.

Parameters

CMmsSettings & aSettingsMMS Setting

RemoveObserver(MMmsSettingsObserver &)

IMPORT_C voidRemoveObserver(MMmsSettingsObserver &aObserver)

Deregisters a previously registered observer.

Parameters

MMmsSettingsObserver & aObserverA reference to an observer to be unregistered for events

RunL()

voidRunL()[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 voidSaveSettingsL(const TMmsAccountId &aAccountId,
const CMmsSettings &aSettings
)const

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

Parameters

const TMmsAccountId & aAccountIdMMS account Id
const CMmsSettings & aSettingsMMS settings

SetDefaultMMSAccountL(const TMmsAccountId &)

IMPORT_C voidSetDefaultMMSAccountL(const TMmsAccountId &aAccount)

Sets the default MMS account.

Parameters

const TMmsAccountId & aAccountAccount to be set as default

Member Enumerations Documentation

Enum TMmsSettingsCenRepId

Enumerators

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]