CEmailAccounts Class Reference

class CEmailAccounts : public CBase

Creates, loads, saves and deletes email (IMAP, POP, and SMTP) accounts.

An account encapsulates:

The class has a family of functions for each protocol to create, get, and delete accounts:

  • Create<protocol>AccountL

  • Get<protocol>AccountL

  • Get<protocol>AccountsL

  • Delete<protocol>AccountL

where <protocol> is either POP, IMAP, or SMTP. The Create and Get functions don't directly return settings objects, but only account identifiers.

Account identifiers are passed to the following functions to save and load the service and IAP settings for that account:

  • Load<protocol>SettingsL

  • Save<protocol>SettingsL

  • Load<protocol>IapSettingsL

  • Save<protocol>IapSettingsL

For SMTP only, there is a concept of a default account (as a client program may want to send an email, and not care which account is used.) SetDefaultSmtpAccountL() , DefaultSmtpAccountL() and DeleteDefaultSmtpAccountL() are used to handle this.

Note that an account is associated with a service entry in the message store, but account information itself is stored in the central repository.

Inherits from

Public Member Functions
~CEmailAccounts ()
IMPORT_C TImapAccount CreateImapAccountL (const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, TBool )
IMPORT_C TImapAccount CreateImapAccountL (const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules &, TBool )
IMPORT_C TPopAccount CreatePopAccountL (const TDesC &, const CImPop3Settings &, const CImIAPPreferences &, TBool )
IMPORT_C TSmtpAccount CreateSmtpAccountL ( TPopAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TBool )
IMPORT_C TSmtpAccount CreateSmtpAccountL ( TImapAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TBool )
IMPORT_C TSmtpAccount CreateSmtpAccountL (const TDesC &, const CImSmtpSettings &, const CImIAPPreferences &, TBool )
IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL (const TDesC &, const RArrayIAP &, const TSmtpAccount &, const CImSmtpMobilitySettings &, TBool )
IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL (const TDesC &, const RArrayIAP &, const TSmtpAccount &, const TSmtpAccount &, TBool )
IMPORT_C TInt DefaultSmtpAccountL ( TSmtpAccount &)
IMPORT_C void DeleteDefaultSmtpAccountL ()
IMPORT_C void DeleteImapAccountL (const TImapAccount &)
IMPORT_C void DeleteImapTransportBufferSizesL ()
IMPORT_C void DeletePopAccountL (const TPopAccount &)
IMPORT_C void DeleteSmtpAccountL (const TSmtpAccount &)
IMPORT_C void DeleteSmtpMobilityAccountL (const TSmtpMobilityAccount &)
IMPORT_C void GetImapAccountL ( TMsvId , TImapAccount &)
IMPORT_C void GetImapAccountsL ( RArray < TImapAccount > &)
IMPORT_C void GetPopAccountL ( TMsvId , TPopAccount &)
IMPORT_C void GetPopAccountsL ( RArray < TPopAccount > &)
IMPORT_C void GetSmtpAccountL ( TMsvId , TSmtpAccount &)
IMPORT_C void GetSmtpAccountL ( TSmtpAccountId , TSmtpAccount &)
IMPORT_C void GetSmtpAccountsL ( RArray < TSmtpAccount > &)
IMPORT_C void GetSmtpMobilityAccountsL (const TSmtpAccount &, RArray < TSmtpMobilityAccount > &)
IMPORT_C void GetSmtpMobilityAccountsL ( RArray < TSmtpMobilityAccount > &)
IMPORT_C TBool IsAccountReadOnlyL (const TPopAccount &)
IMPORT_C TBool IsAccountReadOnlyL (const TImapAccount &)
IMPORT_C TBool IsAccountReadOnlyL (const TSmtpAccount &)
IMPORT_C TBool IsAccountReadOnlyL (const TSmtpMobilityAccount &)
IMPORT_C void LoadImapIapSettingsL (const TImapAccount &, CImIAPPreferences &)
IMPORT_C void LoadImapSettingsL (const TImapAccount &, CImImap4Settings &)
IMPORT_C void LoadImapSyncDownloadRulesL (const TImapAccount &, CImapSyncDownloadRules &)
IMPORT_C void LoadImapTransportBufferSizesL ( CImapTransportBufferSizes &)
IMPORT_C void LoadPopIapSettingsL (const TPopAccount &, CImIAPPreferences &)
IMPORT_C void LoadPopSettingsL (const TPopAccount &, CImPop3Settings &)
IMPORT_C void LoadSmtpIapSettingsL (const TSmtpAccount &, CImIAPPreferences &)
IMPORT_C void LoadSmtpMobilityAccountIapListL (const TSmtpMobilityAccount &, RArrayIAP &)
IMPORT_C void LoadSmtpMobilitySettingsL (const TSmtpMobilityAccount &, CImSmtpMobilitySettings &)
IMPORT_C TBool LoadSmtpMobilitySettingsL ( TSmtpAccountId &, TUint32 , CImSmtpMobilitySettings &)
IMPORT_C void LoadSmtpSettingsL (const TSmtpAccount &, CImSmtpSettings &)
IMPORT_C CEmailAccounts * NewL ()
IMPORT_C CEmailAccounts * NewLC ()
IMPORT_C void PopulateDefaultImapSettingsL ( CImImap4Settings &, CImIAPPreferences &)
IMPORT_C void PopulateDefaultPopSettingsL ( CImPop3Settings &, CImIAPPreferences &)
IMPORT_C void PopulateDefaultSmtpMobilitySettingsL ( CImSmtpMobilitySettings &)
IMPORT_C void PopulateDefaultSmtpSettingsL ( CImSmtpSettings &, CImIAPPreferences &)
IMPORT_C void SaveImapIapSettingsL (const TImapAccount &, const CImIAPPreferences &)
IMPORT_C void SaveImapSettingsL (const TImapAccount &, const CImImap4Settings &)
IMPORT_C void SaveImapSyncDownloadRulesL (const TImapAccount &, const CImapSyncDownloadRules &)
IMPORT_C void SaveImapTransportBufferSizesL (const CImapTransportBufferSizes &)
IMPORT_C void SavePopIapSettingsL (const TPopAccount &, const CImIAPPreferences &)
IMPORT_C void SavePopSettingsL (const TPopAccount &, const CImPop3Settings &)
IMPORT_C void SaveSmtpIapSettingsL (const TSmtpAccount &, const CImIAPPreferences &)
IMPORT_C void SaveSmtpMobilityAccountIapListL (const TSmtpMobilityAccount &, const RArrayIAP &)
IMPORT_C void SaveSmtpMobilitySettingsL (const TSmtpMobilityAccount &, const CImSmtpMobilitySettings &)
IMPORT_C void SaveSmtpSettingsL (const TSmtpAccount &, const CImSmtpSettings &)
IMPORT_C void SetDefaultSmtpAccountL (const TSmtpAccount &)
Private Member Functions
CEmailAccounts ()
void AddLinkToMobilityAccountL ( TSmtpAccountId , TUint32 , CRepository &)
void AddMobilityAccountToSmtpAccountL (const TSmtpAccount &, const RArrayIAP &, TUint32 , CRepository &)
TMsvId CreateEmailServiceL ( CMsvEntry &, const TDesC &, TUid , TBool )
TImapAccount CreateImapAccountL (const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules *, TBool )
void DeleteAllLinkedMobilityAccountsL ( TUint32 , CRepository &)
void DeleteAllOwnedMobilityAccountsL ( TUint32 , CRepository &)
void DeleteIAPPrefSettingsL ( TUint32 , CRepository &)
void DeleteImapSettings ( TUint32 , CRepository &)
void DeleteImapSyncDownloadRulesL ( TUint32 , CRepository &)
void DeletePopSettings ( TUint32 , CRepository &)
void DeleteServiceEntryL ( CMsvEntry &, TMsvId )
void DeleteSmtpMobilityAccountFromLinkedSmtpAccountL ( TUint32 , CRepository &)
void DeleteSmtpMobilityAccountListEntryL ( TUint32 , CRepository &, TUint32 )
void DeleteSmtpSettings ( TUint32 , CRepository &)
TUint32 DoCreateImapAccountL (const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules *, TMsvId , TMsvId , TBool )
TUint32 DoCreatePopAccountL (const TDesC &, const CImPop3Settings &, const CImIAPPreferences &, TMsvId , TMsvId , TBool )
TUint32 DoCreateSmtpAccountL ( TPopAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId , CMsvEntry &, TUint32 &, TBool )
TUint32 DoCreateSmtpAccountL ( TImapAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId , CMsvEntry &, TUint32 &, TBool )
TUint32 DoCreateSmtpAccountL (const TDesC &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId , TMsvId , TBool )
TSmtpMobilityAccount DoCreateSmtpMobilityAccountL (const TDesC &, const RArrayIAP &, const CImSmtpMobilitySettings &, const TSmtpAccount &, TSmtpAccountId , TBool )
void DoLoadImapSettingsL ( TUint32 , CImImap4Settings &)
void DoLoadPopSettingsL ( TUint32 , CImPop3Settings &)
void DoLoadSmtpSettingsL ( TUint32 , CImSmtpSettings &)
void DoSaveImapSettingsL ( TUint32 , const CImImap4Settings &)
void DoSaveImapSyncDownloadRulesL ( TUint32 , const CImapSyncDownloadRules &, CRepository &)
void DoSavePopSettingsL ( TUint32 , const CImPop3Settings &)
void DoSaveSmtpSettingsL ( TUint32 , const CImSmtpSettings &)
TInt FindAccountIdInSmtpMobilityAccountListL ( TUint32 , CRepository &, TUint32 , TInt )
TUint32 FindEmailAccountL ( TMsvId , CRepository &)
TInt FindIapListEntryInSmtpMobilityAccountListL (const RArrayIAP &, CRepository &, TUint32 , TInt , TInt )
void GetEmailServicesL ( CMsvEntrySelection &, TUid , CMsvEntry &)
TUint GetNextEmptyAccountSlotL ( CRepository &)
void GetSmtpAccountInfoForMobilityAccountL ( TUint32 , CRepository &, TUint32 &, TInt &)
void HandleSessionEventL (TMsvSessionEvent, TAny *, TAny *, TAny *)
CRepository & ImapRepositoryL ()
TBool IsAsciiPrintable (const TDesC16 &)
TBool IsAsciiPrintable (const TDesC8 &)
TBool IsSmtpMobilityAccount ( CRepository &, TUint32 )
TBool IsSmtpTypeAccountReadOnlyL ( TUint32 )
TBool IsUnicodePrintable (const TDesC16 &)
void LoadIAPPrefSettingsL ( TUint32 , CImIAPPreferences &, CRepository &)
CRepository & PopRepositoryL ()
void SaveIAPPrefSettingsL ( TUint32 , const CImIAPPreferences &, CRepository &)
CMsvSession & SessionL ()
void SetEntryDetailsL ( TMsvId , const TDesC &)
void SetRelatedIdL ( CMsvEntry &, TMsvId , TMsvId )
CRepository & SmtpRepositoryL ()
void UnSetInPreparationFlagsL ( CMsvEntry &, TMsvId , TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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
enum TEmailSettingTypes { EServiceSettingType  = 0x00000000, EIAPPrefSettingType  = 0x00010000, EAccountMask  = 0x800FFFFF }
enum TIAPPreferencesCenRepId { EIAPPrefVersion  = 0x00010000, EIAPChoicesCount  = 0x00010001, EIAPListIDs  = 0x00011000, EIAPListDialogPrefs  = 0x00012000, EIAPSnapId  = 0x00014000 }
enum TIMAPServiceSettingsCenRepId {
EIMAPServiceId  = 0x00000000, EIMAPAccountNameId  = 0x00000001, EIMAPRelatedSMTPServiceId  = 0x00000002, EIMAPSettingsVersionId  = 0x00000003, EIMAPServerAddressId  = 0x00000004, EIMAPPortNumberId  = 0x00000005, EIMAPFlagsId  = 0x00000006, EIMAPLoginNameId  = 0x00000007, EIMAPPasswordId  = 0x00000008, EIMAPFolderPathId  = 0x00000009, EIMAPPathSeparatorId  = 0x0000000A, EIMAPSynchronisationStrategyId  = 0x0000000B, EIMAPSubscriptionStrategyId  = 0x0000000C, EIMAPMaxEmailSizeId  = 0x0000000D, EIMAPGetMailOptionsId  = 0x0000000E, EIMAPInboxSynchronisationLimitId  = 0x0000000F, EIMAPMailboxSynchronisationLimitId  = 0x00000010, EIMAPTlsSslDomainId  = 0x00000012, EIMAPSyncRateId  = 0x00000020, EIMAPFetchSizeId  = 0x00000030, EIMAPIdleTimeoutId  = 0x00000040, EPartialMailOptionsId  = 0x00000050, EBodyTextSizeLimitId  = 0x00000060, EAttachmentSizeLimitId  = 0x00000070, EIMAPSearchStringId  = 0x00000080, EIMAPReadOnlyAccountId  = 0x00000090
}
enum TIMAPSyncDownloadRulesCenRepInfo {
EIMAPSyncDownloadRulesVersionId  = 0x00001000, EIMAPNumInboxSyncDownloadRulesId  = 0x00001001, EIMAPNumFolderSyncDownloadRulesId  = 0x00001002, EIMAPInboxSyncDownloadRulesBearerTypesId  = 0x00001010, EIMAPInboxSyncDownloadRulesMailOptionsId  = 0x00001011, EIMAPInboxSyncDownloadRulesTotalSizeLimitId  = 0x00001012, EIMAPInboxSyncDownloadRulesBodyTextSizeLimitId  = 0x00001013, EIMAPInboxSyncDownloadRulesAttachmentSizeLimitId  = 0x00001014, EIMAPInboxSyncDownloadRulesGetMailBodyPartsId  = 0x00001015, EIMAPInboxSyncDownloadRulesMaxEmailSizeId  = 0x00001016, EIMAPFolderSyncDownloadRulesBearerTypesId  = 0x00001030, EIMAPFolderSyncDownloadRulesMailOptionsId  = 0x00001031, EIMAPFolderSyncDownloadRulesTotalSizeLimitId  = 0x00001032, EIMAPFolderSyncDownloadRulesBodyTextSizeLimitId  = 0x00001033, EIMAPFolderSyncDownloadRulesAttachmentSizeLimitId  = 0x00001034, EIMAPFolderSyncDownloadRulesGetMailBodyPartsId  = 0x00001035, EIMAPFolderSyncDownloadRulesMaxEmailSizeId  = 0x00001036, EIMAPSyncDownloadRulesOffset  = 0x40
}
enum TIMAPTransportBufferSizesCenRepInfo {
EIMAPTransportBufferSizesVersionId  = 0x80000100, EIMAPNumTransportBufferSizesId  = 0x80000101, EIMAPTransportBufferSizesBearerTypesId  = 0x80000110, EIMAPTransportBufferSizesFetchRequestSizeId  = 0x80000111, EIMAPTransportBufferSizesMaxOutstandingFetchResponsesId  = 0x80000112, EIMAPTransportBufferSizesOffset  = 0x20
}
enum TPOPServiceSettingsCenRepId {
EPOPServiceId  = 0x00000000, EPOPAccountNameId  = 0x00000001, EPOPRelatedSMTPServiceId  = 0x00000002, EPOPSettingsVersionId  = 0x00000003, EPOPServerAddressId  = 0x00000004, EPOPPortNumberId  = 0x00000005, EPOPFlagsId  = 0x00000006, EPOPLoginNameId  = 0x00000007, EPOPPasswordId  = 0x00000008, EPOPMaxEmailSizeId  = 0x00000009, EPOPGetEmailOptionsId  = 0x0000000A, EPOPInboxSynchronisationLimitId  = 0x0000000B, EPOPPopulationLimitId  = 0x0000000C, EPOPReadOnlyAccountId  = 0x0000000D, EPOPTlsSslDomainId  = 0x0000000F
}
enum TSMTPLinkedMobilityAccountListCenRepInfo { ESMTPLinkedMobilityAccountListVersionId  = 0x00015000, ESMTPLinkedMobilityAccountListNumEntriesId  = 0x00015001, ESMTPLinkedMobilityAccountListEntryId  = 0x00015010, ESMTPLinkedMobilityAccountListMaxEntries  = 2048 }
enum TSMTPMobilityAccountListCenRepInfo {
ESMTPMobilityAccountListVersionId  = 0x00016000, ESMTPMobilityAccountListNumEntriesId  = 0x00016001, ESMTPMobilityAccountListAccountId  = 0x00016010, ESMTPMobilityAccountListNumIapsId  = 0x00016011, ESMTPMobilityAccountListIapId  = 0x00016020, ESMTPMobilityAccountListOffset  = 0x40, ESMTPMobilityAccountMaxEntries  = 32
}
enum TSMTPServiceSettingsCenRepId {
ESMTPServiceId  = 0x00000000, ESMTPAccountNameId  = 0x00000001, ESMTPSettingsVersionId  = 0x00000002, ESMTPServerAddressId  = 0x00000003, ESMTPPortNumberId  = 0x00000004, ESMTPFlagsId  = 0x00000005, ESMTPEmailAliasId  = 0x00000006, ESMTPEmailAddressId  = 0x00000007, ESMTPReplyToAddressId  = 0x00000008, ESMTPReceiptAddressId  = 0x00000009, ESMTPBodyEncodingId  = 0x0000000A, ESMTPDefaultMsgCharSetId  = 0x0000000B, ESMTPSendCopyToSelfId  = 0x0000000C, ESMTPSendMessageOptionId  = 0x0000000D, ESMTPLoginNameId  = 0x0000000E, ESMTPPasswordId  = 0x0000000F, ESMTPRelatedServiceId  = 0x00000010, ESMTPIncludeToCcId  = 0x00000011, ESMTPReadOnlyAccountId  = 0x00000012, ESMTPParentAccountId  = 0x00000013, ESMTPTlsSslDomainId  = 0x00000014, ESMTPLinkedAccountId  = 0x00000015
}
Private Attributes
CRepository * iIMAPRepository
CMsvSession * iMsvSession
CRepository * iPOPRepository
CRepository * iSMTPRepository

Constructor & Destructor Documentation

CEmailAccounts()

CEmailAccounts ( ) [private]

Constructor.

~CEmailAccounts()

IMPORT_C ~CEmailAccounts ( ) [virtual]

Destructor.

Member Functions Documentation

AddLinkToMobilityAccountL(TSmtpAccountId, TUint32, CRepository &)

void AddLinkToMobilityAccountL ( TSmtpAccountId aLinkedSmtpAccountId,
TUint32 aMobAccRepId,
CRepository & aRepository
) [private]

Add a link from a SMTP account to a linked SMTP mobility account

leave
KErrOverflow Maximum number of linked accounts already provisioned

Parameters

TSmtpAccountId aLinkedSmtpAccountId
TUint32 aMobAccRepId
CRepository & aRepository

AddMobilityAccountToSmtpAccountL(const TSmtpAccount &, const RArrayIAP &, TUint32, CRepository &)

void AddMobilityAccountToSmtpAccountL ( const TSmtpAccount & aSmtpAccount,
const RArrayIAP & aIapList,
TUint32 aMobAccRepId,
CRepository & aRepository
) [private]

Adds a SMTP mobility account to a SMTP account

Parameters

const TSmtpAccount & aSmtpAccount SMTP account
const RArrayIAP & aIapList IAP list associated with SMTP mobility account
TUint32 aMobAccRepId SMTP mobility account repository ID
CRepository & aRepository SMTP repository

CreateEmailServiceL(CMsvEntry &, const TDesC &, TUid, TBool)

TMsvId CreateEmailServiceL ( CMsvEntry & aMsvEntry,
const TDesC & aAccountName,
TUid aMTMType,
TBool aVisible
) [private]

Parameters

CMsvEntry & aMsvEntry
const TDesC & aAccountName
TUid aMTMType
TBool aVisible

CreateImapAccountL(const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, TBool)

IMPORT_C TImapAccount CreateImapAccountL ( const TDesC & aAccountName,
const CImImap4Settings & aImapSettings,
const CImIAPPreferences & aImapIAP,
TBool aReadOnly
)

Creates an IMAP Account:

1. Creates an IMAP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Returns an IMAP account ID

leave
KErrOverflow if the account name is longer than 256 characters. KErrArgument if settings fields contained non-ascii printable characters.

Parameters

const TDesC & aAccountName Account Name
const CImImap4Settings & aImapSettings IMAP Service Settings
const CImIAPPreferences & aImapIAP IMAP IAP preferences
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreateImapAccountL(const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules &, TBool)

IMPORT_C TImapAccount CreateImapAccountL ( const TDesC & aAccountName,
const CImImap4Settings & aImapSettings,
const CImIAPPreferences & aImapIAP,
const CImapSyncDownloadRules & aSyncDownloadRules,
TBool aReadOnly
)

Creates an IMAP Account:

1. Creates an IMAP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Returns an IMAP account ID

Parameters

const TDesC & aAccountName Account Name
const CImImap4Settings & aImapSettings IMAP Service Settings
const CImIAPPreferences & aImapIAP IMAP IAP preferences
const CImapSyncDownloadRules & aSyncDownloadRules IMAP synchronisation download rules
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreateImapAccountL(const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules *, TBool)

TImapAccount CreateImapAccountL ( const TDesC & aAccountName,
const CImImap4Settings & aImapSettings,
const CImIAPPreferences & aImapIAP,
const CImapSyncDownloadRules * aSyncDownloadRules,
TBool aReadOnly
) [private]

Creates an IMAP Account:

1. Creates an IMAP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Returns an IMAP account ID

Parameters

const TDesC & aAccountName Account Name
const CImImap4Settings & aImapSettings IMAP Service Settings
const CImIAPPreferences & aImapIAP IMAP IAP preferences
const CImapSyncDownloadRules * aSyncDownloadRules Synchronisation download rules (can be NULL)
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreatePopAccountL(const TDesC &, const CImPop3Settings &, const CImIAPPreferences &, TBool)

IMPORT_C TPopAccount CreatePopAccountL ( const TDesC & aAccountName,
const CImPop3Settings & aPopSettings,
const CImIAPPreferences & aPopIAP,
TBool aReadOnly
)

Creates a POP Account:

1. Creates a POP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Returns a POP account ID

leave
KErrOverflow if the account name is longer than 256 characters. KErrArgument if settings fields contained non-ascii printable characters.

Parameters

const TDesC & aAccountName Account Name
const CImPop3Settings & aPopSettings POP Service Settings
const CImIAPPreferences & aPopIAP POP IAP preferences
TBool aReadOnly Specify ETrue if it is a read-only account. Note: Read-only accounts should not be modified, however we don't enforce it.

CreateSmtpAccountL(TPopAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TBool)

IMPORT_C TSmtpAccount CreateSmtpAccountL ( TPopAccount & aPopAccount,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TBool aReadOnly
)

Creates a SMTP Account:

1. Creates a SMTP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Relates this account with the supplied POP account

4. Returns a SMTP account ID

leave
KErrArgument if settings fields contained non-ascii printable characters.

Parameters

TPopAccount & aPopAccount POP Account Id
const CImSmtpSettings & aSmtpSettings SMTP Service Settings
const CImIAPPreferences & aSmtpIAP SMTP IAP preferences
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreateSmtpAccountL(TImapAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TBool)

IMPORT_C TSmtpAccount CreateSmtpAccountL ( TImapAccount & aImapAccount,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TBool aReadOnly
)

Creates a SMTP Account:

1. Creates a SMTP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Relates this account with the supplied IMAP account

4. Returns a SMTP account ID

leave
KErrArgument if settings fields contained non-ascii printable characters.

Parameters

TImapAccount & aImapAccount IMAP account ID
const CImSmtpSettings & aSmtpSettings SMTP Service Settings
const CImIAPPreferences & aSmtpIAP SMTP IAP preferences
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreateSmtpAccountL(const TDesC &, const CImSmtpSettings &, const CImIAPPreferences &, TBool)

IMPORT_C TSmtpAccount CreateSmtpAccountL ( const TDesC & aAccountName,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TBool aReadOnly
)

Creates an SMTP Account:

1. Creates an SMTP service entry in the message store

2. Creates settings in CenRep with values from the supplied objects

3. Returns an SMTP account ID

leave
KErrOverflow if the account name is longer than 256 characters. KErrArgument if settings fields contained non-ascii printable characters.

Parameters

const TDesC & aAccountName Account Name
const CImSmtpSettings & aSmtpSettings SMTP Service Setting
const CImIAPPreferences & aSmtpIAP SMTP IAP preferences
TBool aReadOnly Specify ETrue if it is a read-only account Note: Read-only accounts should not be modified, however we don't enforce it.

CreateSmtpMobilityAccountL(const TDesC &, const RArrayIAP &, const TSmtpAccount &, const CImSmtpMobilitySettings &, TBool)

IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL ( const TDesC & aAccountName,
const RArrayIAP & aIapList,
const TSmtpAccount & aSmtpAccount,
const CImSmtpMobilitySettings & aSettings,
TBool aReadOnly
)

Creates a SMTP mobility account.

An SMTP mobility account allows different send settings to be used by SMTP accounts depending on what access point is being used by the SMTP connection. When using this API to create a SMTP mobility account, a list of IAPs and a set of settings are specified. The SMTP account which owns the SMTP mobility account is also specified. A SMTP account can own multiple SMTP mobility accounts. When a connection is made for a SMTP account, its associated list of SMTP mobility accounts is examined to see if any of them have an IAP list which contains the IAP that the connection is using. If so, the settings for that SMTP mobility account will be used to send emails. If an SMTP account has no associated SMTP mobility accounts, or there is no SMTP mobility account with a matching IAP, then the settings for the SMTP account are used when sending emails.

Parameters

const TDesC & aAccountName Account name
const RArrayIAP & aIapList List of IAPs that will use the account settings
const TSmtpAccount & aSmtpAccount The SMTP account to add the mobility account to
const CImSmtpMobilitySettings & aSettings Settings to use for the account
TBool aReadOnly Flag to indicate if account is read only. Note that while read only accounts should not be modified, we do not enforce this.

CreateSmtpMobilityAccountL(const TDesC &, const RArrayIAP &, const TSmtpAccount &, const TSmtpAccount &, TBool)

IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL ( const TDesC & aAccountName,
const RArrayIAP & aIapList,
const TSmtpAccount & aSmtpAccount,
const TSmtpAccount & aLinkedSmtpAccount,
TBool aReadOnly
)

Creates a SMTP mobility account using settings from an SMTP account.

An SMTP mobility account allows different send settings to be used by SMTP accounts depending on what access point is being used by the SMTP connection. When using this API to create a SMTP mobility account, a list of IAPs and a linked SMTP account are specified. The settings for the SMTP mobility account are then taken from that linked SMTP account. The SMTP account which owns the SMTP mobility account is also specified. A SMTP account can own multiple SMTP mobility accounts. When a connection is made for a SMTP account, its associated list of SMTP mobility accounts is examined to see if any of them have an IAP list which contains the IAP that the connection is using. If so, the settings for that SMTP mobility account will be used to send emails. If an SMTP account has no associated SMTP mobility accounts, or there is no SMTP mobility account with a matching IAP, then the settings for the SMTP account are used when sending emails. Note that a SMTP mobility account created in this way will always have the same settings as the linked SMTP account. If the settings for the linked SMTP account change then the settings for the SMTP mobility account also change to match them. It is not possible to update the settings for a SMTP mobility account created in this way other than through changing the settings for the linked SMTP account.

leave
KErrArgument Attempted to add to an SMTP account which is the same as the linked SMTP account

Parameters

const TDesC & aAccountName Account name
const RArrayIAP & aIapList List of IAPs that will use the account settings
const TSmtpAccount & aSmtpAccount The SMTP account to add the mobility account to
const TSmtpAccount & aLinkedSmtpAccount SMTP account to get settings from
TBool aReadOnly Flag to indicate if account is read only. Note that while read only accounts should not be modified, we do not enforce this.

DefaultSmtpAccountL(TSmtpAccount &)

IMPORT_C TInt DefaultSmtpAccountL ( TSmtpAccount & aAccount )

Returns the default SMTP account.

Parameters

TSmtpAccount & aAccount Default account ID

DeleteAllLinkedMobilityAccountsL(TUint32, CRepository &)

void DeleteAllLinkedMobilityAccountsL ( TUint32 aLinkedSmtpAccRepId,
CRepository & aRepository
) [private]

Deletes all the SMTP mobility accounts that are linked to a given SMTP account

Parameters

TUint32 aLinkedSmtpAccRepId
CRepository & aRepository SMTP repository

DeleteAllOwnedMobilityAccountsL(TUint32, CRepository &)

void DeleteAllOwnedMobilityAccountsL ( TUint32 aSmtpAccRepId,
CRepository & aRepository
) [private]

Deletes all the SMTP mobility accounts that are owned by a given SMTP account

Parameters

TUint32 aSmtpAccRepId SMTP account repository ID
CRepository & aRepository SMTP repository

DeleteDefaultSmtpAccountL()

IMPORT_C void DeleteDefaultSmtpAccountL ( )

Deletes the default SMTP account information from repository.

DeleteIAPPrefSettingsL(TUint32, CRepository &)

void DeleteIAPPrefSettingsL ( TUint32 aAccountId,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
CRepository & aRepository

DeleteImapAccountL(const TImapAccount &)

IMPORT_C void DeleteImapAccountL ( const TImapAccount & aAccount )

Deletes the specified IMAP account.

Parameters

const TImapAccount & aAccount IMAP account ID

DeleteImapSettings(TUint32, CRepository &)

void DeleteImapSettings ( TUint32 aAccountId,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
CRepository & aRepository

DeleteImapSyncDownloadRulesL(TUint32, CRepository &)

void DeleteImapSyncDownloadRulesL ( TUint32 aAccountId,
CRepository & aRepository
) [private]

Deletes IMAP synchronisation download rules

Parameters

TUint32 aAccountId IMAP account ID
CRepository & aRepository IMAP repository

DeleteImapTransportBufferSizesL()

IMPORT_C void DeleteImapTransportBufferSizesL ( )

Deletes all the IMAP transport buffer sizes

DeletePopAccountL(const TPopAccount &)

IMPORT_C void DeletePopAccountL ( const TPopAccount & aAccount )

Deletes the specified POP account.

Parameters

const TPopAccount & aAccount POP account ID

DeletePopSettings(TUint32, CRepository &)

void DeletePopSettings ( TUint32 aAccountId,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
CRepository & aRepository

DeleteServiceEntryL(CMsvEntry &, TMsvId)

void DeleteServiceEntryL ( CMsvEntry & aMsvEntry,
TMsvId aId
) [private]

Parameters

CMsvEntry & aMsvEntry
TMsvId aId

DeleteSmtpAccountL(const TSmtpAccount &)

IMPORT_C void DeleteSmtpAccountL ( const TSmtpAccount & aAccount )

Deletes the specified SMTP account.

leave
KErrNotFound Account specified is a SMTP mobility account

Parameters

const TSmtpAccount & aAccount SMTP account ID

DeleteSmtpMobilityAccountFromLinkedSmtpAccountL(TUint32, CRepository &)

void DeleteSmtpMobilityAccountFromLinkedSmtpAccountL ( TUint32 aMobAccRepId,
CRepository & aRepository
) [private]

If this mobility account is linked to a SMTP account, remove it from the list of linked accounts.

Parameters

TUint32 aMobAccRepId SMTP mobility account repository ID
CRepository & aRepository SMTP repository

DeleteSmtpMobilityAccountL(const TSmtpMobilityAccount &)

IMPORT_C void DeleteSmtpMobilityAccountL ( const TSmtpMobilityAccount & aAccount )

Deletes the specified SMTP bearer mobility account

leave
KErrNotFound Specified account is not a SMTP mobility account

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account

DeleteSmtpMobilityAccountListEntryL(TUint32, CRepository &, TUint32)

void DeleteSmtpMobilityAccountListEntryL ( TUint32 aMobAccRepId,
CRepository & aRepository,
TUint32 aSmtpAccRepId
) [private]

Deletes a SMTP mobility account entry from a SMTP account

Parameters

TUint32 aMobAccRepId SMTP mobility account repository ID
CRepository & aRepository SMTP repository
TUint32 aSmtpAccRepId SMTP account repository ID

DeleteSmtpSettings(TUint32, CRepository &)

void DeleteSmtpSettings ( TUint32 aAccountId,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
CRepository & aRepository

DoCreateImapAccountL(const TDesC &, const CImImap4Settings &, const CImIAPPreferences &, const CImapSyncDownloadRules *, TMsvId, TMsvId, TBool)

TUint32 DoCreateImapAccountL ( const TDesC & aAccountName,
const CImImap4Settings & aImapSettings,
const CImIAPPreferences & aImapIAP,
const CImapSyncDownloadRules * aSyncDownloadRules,
TMsvId aImapService,
TMsvId aRelatedService,
TBool aReadOnly
) [private]

Parameters

const TDesC & aAccountName
const CImImap4Settings & aImapSettings
const CImIAPPreferences & aImapIAP
const CImapSyncDownloadRules * aSyncDownloadRules
TMsvId aImapService
TMsvId aRelatedService
TBool aReadOnly

DoCreatePopAccountL(const TDesC &, const CImPop3Settings &, const CImIAPPreferences &, TMsvId, TMsvId, TBool)

TUint32 DoCreatePopAccountL ( const TDesC & aAccountName,
const CImPop3Settings & aPopSettings,
const CImIAPPreferences & aPopIAP,
TMsvId aPopService,
TMsvId aRelatedService,
TBool aReadOnly
) [private]

Parameters

const TDesC & aAccountName
const CImPop3Settings & aPopSettings
const CImIAPPreferences & aPopIAP
TMsvId aPopService
TMsvId aRelatedService
TBool aReadOnly

DoCreateSmtpAccountL(TPopAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId, CMsvEntry &, TUint32 &, TBool)

TUint32 DoCreateSmtpAccountL ( TPopAccount & aPopAccount,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TMsvId aSmtpService,
CMsvEntry & aMsvEntry,
TUint32 & aPopAccountId,
TBool aReadOnly
) [private]

Parameters

TPopAccount & aPopAccount
const CImSmtpSettings & aSmtpSettings
const CImIAPPreferences & aSmtpIAP
TMsvId aSmtpService
CMsvEntry & aMsvEntry
TUint32 & aPopAccountId
TBool aReadOnly

DoCreateSmtpAccountL(TImapAccount &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId, CMsvEntry &, TUint32 &, TBool)

TUint32 DoCreateSmtpAccountL ( TImapAccount & aImapAccount,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TMsvId aSmtpService,
CMsvEntry & aMsvEntry,
TUint32 & aImapAccountId,
TBool aReadOnly
) [private]

Parameters

TImapAccount & aImapAccount
const CImSmtpSettings & aSmtpSettings
const CImIAPPreferences & aSmtpIAP
TMsvId aSmtpService
CMsvEntry & aMsvEntry
TUint32 & aImapAccountId
TBool aReadOnly

DoCreateSmtpAccountL(const TDesC &, const CImSmtpSettings &, const CImIAPPreferences &, TMsvId, TMsvId, TBool)

TUint32 DoCreateSmtpAccountL ( const TDesC & aAccountName,
const CImSmtpSettings & aSmtpSettings,
const CImIAPPreferences & aSmtpIAP,
TMsvId aSmtpService,
TMsvId aRelatedService,
TBool aReadOnly
) [private]

Parameters

const TDesC & aAccountName
const CImSmtpSettings & aSmtpSettings
const CImIAPPreferences & aSmtpIAP
TMsvId aSmtpService
TMsvId aRelatedService
TBool aReadOnly

DoCreateSmtpMobilityAccountL(const TDesC &, const RArrayIAP &, const CImSmtpMobilitySettings &, const TSmtpAccount &, TSmtpAccountId, TBool)

TSmtpMobilityAccount DoCreateSmtpMobilityAccountL ( const TDesC & aAccountName,
const RArrayIAP & aIapList,
const CImSmtpMobilitySettings & aSettings,
const TSmtpAccount & aSmtpAccount,
TSmtpAccountId aLinkedSmtpAccountId,
TBool aReadOnly
) [private]

Creates a SMTP mobility account

leave
KErrArgument Account name too long

Parameters

const TDesC & aAccountName Account name
const RArrayIAP & aIapList List of IAPs that will use the account settings
const CImSmtpMobilitySettings & aSettings Settings to use for the account
const TSmtpAccount & aSmtpAccount The SMTP account to add the mobility account to
TSmtpAccountId aLinkedSmtpAccountId Linked SMTP account ID
TBool aReadOnly Flag to indicate if account is read only. Note that while read only accounts should not be modified, we do not enforce this.

DoLoadImapSettingsL(TUint32, CImImap4Settings &)

void DoLoadImapSettingsL ( TUint32 aAccountId,
CImImap4Settings & aImapSettings
) [private]

Parameters

TUint32 aAccountId
CImImap4Settings & aImapSettings

DoLoadPopSettingsL(TUint32, CImPop3Settings &)

void DoLoadPopSettingsL ( TUint32 aAccountId,
CImPop3Settings & aPopSettings
) [private]

Parameters

TUint32 aAccountId
CImPop3Settings & aPopSettings

DoLoadSmtpSettingsL(TUint32, CImSmtpSettings &)

void DoLoadSmtpSettingsL ( TUint32 aAccountId,
CImSmtpSettings & aSmtpSettings
) [private]

Parameters

TUint32 aAccountId
CImSmtpSettings & aSmtpSettings

DoSaveImapSettingsL(TUint32, const CImImap4Settings &)

void DoSaveImapSettingsL ( TUint32 aAccountId,
const CImImap4Settings & aImapSettings
) [private]

Parameters

TUint32 aAccountId
const CImImap4Settings & aImapSettings

DoSaveImapSyncDownloadRulesL(TUint32, const CImapSyncDownloadRules &, CRepository &)

void DoSaveImapSyncDownloadRulesL ( TUint32 aAccountId,
const CImapSyncDownloadRules & aRules,
CRepository & aRepository
) [private]

Saves the IMAP sync download rules

Parameters

TUint32 aAccountId IMAP account ID
const CImapSyncDownloadRules & aRules Rules to save
CRepository & aRepository IMAP repository

DoSavePopSettingsL(TUint32, const CImPop3Settings &)

void DoSavePopSettingsL ( TUint32 aAccountId,
const CImPop3Settings & aPopSettings
) [private]

Parameters

TUint32 aAccountId
const CImPop3Settings & aPopSettings

DoSaveSmtpSettingsL(TUint32, const CImSmtpSettings &)

void DoSaveSmtpSettingsL ( TUint32 aAccountId,
const CImSmtpSettings & aSmtpSettings
) [private]

Parameters

TUint32 aAccountId
const CImSmtpSettings & aSmtpSettings

FindAccountIdInSmtpMobilityAccountListL(TUint32, CRepository &, TUint32, TInt)

TInt FindAccountIdInSmtpMobilityAccountListL ( TUint32 aMobAccRepId,
CRepository & aRepository,
TUint32 aSmtpAccRepId,
TInt aNumEntries
) [private]

Finds a SMTP mobility account ID in the SMTP mobility account list for a SMTP account

Parameters

TUint32 aMobAccRepId SMTP mobility account repository ID
CRepository & aRepository SMTP repository
TUint32 aSmtpAccRepId SMTP account repository ID
TInt aNumEntries Number of entries in SMTP mobility account list

FindEmailAccountL(TMsvId, CRepository &)

TUint32 FindEmailAccountL ( TMsvId aService,
CRepository & aRepository
) [private]

Parameters

TMsvId aService
CRepository & aRepository

FindIapListEntryInSmtpMobilityAccountListL(const RArrayIAP &, CRepository &, TUint32, TInt, TInt)

TInt FindIapListEntryInSmtpMobilityAccountListL ( const RArrayIAP & aIapList,
CRepository & aRepository,
TUint32 aSmtpAccRepId,
TInt aNumEntries,
TInt aIgnorePos
) [private]

Finds an entry in a SMTP account's mobility account list which has an IAP that matches one of the passed IAPs

Parameters

const RArrayIAP & aIapList List of IAPs to try to match
CRepository & aRepository SMTP repository
TUint32 aSmtpAccRepId SMTP account repository ID
TInt aNumEntries Number of entries in mobility account list
TInt aIgnorePos Position of entry to ignore during the search.

GetEmailServicesL(CMsvEntrySelection &, TUid, CMsvEntry &)

void GetEmailServicesL ( CMsvEntrySelection & aServices,
TUid aMTMType,
CMsvEntry & aMsvEntry
) [private]

Parameters

CMsvEntrySelection & aServices
TUid aMTMType
CMsvEntry & aMsvEntry

GetImapAccountL(TMsvId, TImapAccount &)

IMPORT_C void GetImapAccountL ( TMsvId aServiceId,
TImapAccount & aAccount
)

Gets a IMAP account ID for the specified service.

Parameters

TMsvId aServiceId Service ID
TImapAccount & aAccount IMAP account ID

GetImapAccountsL(RArray< TImapAccount > &)

IMPORT_C void GetImapAccountsL ( RArray < TImapAccount > & aAccounts )

Gets a list of IMAP account IDs that exists in the current message store.

Parameters

RArray < TImapAccount > & aAccounts On return, an array of IMAP account IDs

GetNextEmptyAccountSlotL(CRepository &)

TUint GetNextEmptyAccountSlotL ( CRepository & aRepository ) [private]

Parameters

CRepository & aRepository

GetPopAccountL(TMsvId, TPopAccount &)

IMPORT_C void GetPopAccountL ( TMsvId aServiceId,
TPopAccount & aAccount
)

Gets a POP account ID for the specified service.

Parameters

TMsvId aServiceId Service ID
TPopAccount & aAccount POP account ID

GetPopAccountsL(RArray< TPopAccount > &)

IMPORT_C void GetPopAccountsL ( RArray < TPopAccount > & aAccounts )

Gets a list of POP account IDs that exists in the current message store.

Parameters

RArray < TPopAccount > & aAccounts On return, an array of POP account IDs

GetSmtpAccountInfoForMobilityAccountL(TUint32, CRepository &, TUint32 &, TInt &)

void GetSmtpAccountInfoForMobilityAccountL ( TUint32 aMobAccRepId,
CRepository & aRepository,
TUint32 & aSmtpAccRepId,
TInt & aPos
) [private]

Gets SMTP Account information for a SMTP mobility account

leave
KErrNotFound SMTP mobility account not found in list

Parameters

TUint32 aMobAccRepId SMTP mobility account repository ID
CRepository & aRepository SMTP repository
TUint32 & aSmtpAccRepId SMTP account repository ID
TInt & aPos On return holds the position of the SMTP mobility account in the SMTP account's mobility account list.

GetSmtpAccountL(TMsvId, TSmtpAccount &)

IMPORT_C void GetSmtpAccountL ( TMsvId aServiceId,
TSmtpAccount & aAccount
)

Gets a SMTP account ID for the specified service.

Parameters

TMsvId aServiceId Service ID
TSmtpAccount & aAccount SMTP account ID

GetSmtpAccountL(TSmtpAccountId, TSmtpAccount &)

IMPORT_C void GetSmtpAccountL ( TSmtpAccountId aAccountId,
TSmtpAccount & aAccount
)

Gets a SMTP account for the specified account ID.

leave
KErrNotFound Account ID specifies a SMTP mobility account

Parameters

TSmtpAccountId aAccountId Account ID
TSmtpAccount & aAccount Stores account details

GetSmtpAccountsL(RArray< TSmtpAccount > &)

IMPORT_C void GetSmtpAccountsL ( RArray < TSmtpAccount > & aAccounts )

Gets a list of SMTP account IDs that exists in the current message store.

Parameters

RArray < TSmtpAccount > & aAccounts On return, an array of SMTP account IDs

GetSmtpMobilityAccountsL(const TSmtpAccount &, RArray< TSmtpMobilityAccount > &)

IMPORT_C void GetSmtpMobilityAccountsL ( const TSmtpAccount & aSmtpAccount,
RArray < TSmtpMobilityAccount > & aAccounts
)

Get a list of SMTP mobility accounts for a given SMTP account

Parameters

const TSmtpAccount & aSmtpAccount SMTP account
RArray < TSmtpMobilityAccount > & aAccounts Stores the list of SMTP mobility accounts

GetSmtpMobilityAccountsL(RArray< TSmtpMobilityAccount > &)

IMPORT_C void GetSmtpMobilityAccountsL ( RArray < TSmtpMobilityAccount > & aAccounts )

Get a list of all SMTP mobility accounts in the repository

Parameters

RArray < TSmtpMobilityAccount > & aAccounts Stores the list of SMTP mobility accounts

HandleSessionEventL(TMsvSessionEvent, TAny *, TAny *, TAny *)

void HandleSessionEventL ( TMsvSessionEvent ,
TAny * ,
TAny * ,
TAny *
) [private]

Parameters

TMsvSessionEvent
TAny *
TAny *
TAny *

ImapRepositoryL()

CRepository & ImapRepositoryL ( ) [private]

IsAccountReadOnlyL(const TPopAccount &)

IMPORT_C TBool IsAccountReadOnlyL ( const TPopAccount & aAccount )

Checks if the account is read-only

Parameters

const TPopAccount & aAccount POP account Id

IsAccountReadOnlyL(const TImapAccount &)

IMPORT_C TBool IsAccountReadOnlyL ( const TImapAccount & aAccount )

Checks if the account is read-only

Parameters

const TImapAccount & aAccount IMAP account Id

IsAccountReadOnlyL(const TSmtpAccount &)

IMPORT_C TBool IsAccountReadOnlyL ( const TSmtpAccount & aAccount )

Checks if the account is read-only

Parameters

const TSmtpAccount & aAccount SMTP account Id

IsAccountReadOnlyL(const TSmtpMobilityAccount &)

IMPORT_C TBool IsAccountReadOnlyL ( const TSmtpMobilityAccount & aAccount )

Checks if SMTP mobility account is read only

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account

IsAsciiPrintable(const TDesC16 &)

TBool IsAsciiPrintable ( const TDesC16 & aText ) [private]

Tests whether all of the characters in the specified text can be represented in 7-bit ASCII.

Parameters

const TDesC16 & aText Text to be tested.

IsAsciiPrintable(const TDesC8 &)

TBool IsAsciiPrintable ( const TDesC8 & aText ) [private]

Tests whether all of the characters in the specified text can be represented in 7-bit ASCII.

Parameters

const TDesC8 & aText Text to be tested.

IsSmtpMobilityAccount(CRepository &, TUint32)

TBool IsSmtpMobilityAccount ( CRepository & aRepository,
TUint32 aAccRepId
) [private]

Checks if the account is a SMTP mobility account

Parameters

CRepository & aRepository SMTP repository
TUint32 aAccRepId

IsSmtpTypeAccountReadOnlyL(TUint32)

TBool IsSmtpTypeAccountReadOnlyL ( TUint32 aAccRepId ) [private]

Checks if an SMTP account or SMTP mobility account is read only

Parameters

TUint32 aAccRepId SMTP account / SMTP mobility account ID

IsUnicodePrintable(const TDesC16 &)

TBool IsUnicodePrintable ( const TDesC16 & aText ) [private]

Tests whether all of the characters in the specified text are printable UniCode.

Parameters

const TDesC16 & aText Text to be tested.

LoadIAPPrefSettingsL(TUint32, CImIAPPreferences &, CRepository &)

void LoadIAPPrefSettingsL ( TUint32 aAccountId,
CImIAPPreferences & aIAP,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
CImIAPPreferences & aIAP
CRepository & aRepository

LoadImapIapSettingsL(const TImapAccount &, CImIAPPreferences &)

IMPORT_C void LoadImapIapSettingsL ( const TImapAccount & aAccount,
CImIAPPreferences & aIAP
)

Loads IMAP IAP settings for the specified account.

Parameters

const TImapAccount & aAccount IMAP account ID
CImIAPPreferences & aIAP IMAP IAP Pref settings

LoadImapSettingsL(const TImapAccount &, CImImap4Settings &)

IMPORT_C void LoadImapSettingsL ( const TImapAccount & aAccount,
CImImap4Settings & aImapSettings
)

Loads IMAP service settings for the specified account.

Parameters

const TImapAccount & aAccount IMAP account ID
CImImap4Settings & aImapSettings IMAP service settings

LoadImapSyncDownloadRulesL(const TImapAccount &, CImapSyncDownloadRules &)

IMPORT_C void LoadImapSyncDownloadRulesL ( const TImapAccount & aAccount,
CImapSyncDownloadRules & aRules
)

Loads IMAP synchronisation download rules

Parameters

const TImapAccount & aAccount IMAP account ID
CImapSyncDownloadRules & aRules Synchronisation download rules

LoadImapTransportBufferSizesL(CImapTransportBufferSizes &)

IMPORT_C void LoadImapTransportBufferSizesL ( CImapTransportBufferSizes & aBufferSizes )

Loads IMAP transport buffer sizes

Parameters

CImapTransportBufferSizes & aBufferSizes Transport buffer sizes

LoadPopIapSettingsL(const TPopAccount &, CImIAPPreferences &)

IMPORT_C void LoadPopIapSettingsL ( const TPopAccount & aAccount,
CImIAPPreferences & aIAP
)

Loads POP IAP settings for the specified account.

Parameters

const TPopAccount & aAccount POP account ID
CImIAPPreferences & aIAP POP IAP Pref settings

LoadPopSettingsL(const TPopAccount &, CImPop3Settings &)

IMPORT_C void LoadPopSettingsL ( const TPopAccount & aAccount,
CImPop3Settings & aPopSettings
)

Loads POP service settings for the specified account.

Parameters

const TPopAccount & aAccount POP account ID
CImPop3Settings & aPopSettings POP service settings

LoadSmtpIapSettingsL(const TSmtpAccount &, CImIAPPreferences &)

IMPORT_C void LoadSmtpIapSettingsL ( const TSmtpAccount & aAccount,
CImIAPPreferences & aIAP
)

Loads SMTP IAP settings for the specified account.

Parameters

const TSmtpAccount & aAccount SMTP account ID
CImIAPPreferences & aIAP SMTP IAP Pref settings

LoadSmtpMobilityAccountIapListL(const TSmtpMobilityAccount &, RArrayIAP &)

IMPORT_C void LoadSmtpMobilityAccountIapListL ( const TSmtpMobilityAccount & aAccount,
RArrayIAP & aIapList
)

Loads the IAP list associated with a specified SMTP mobility account

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account
RArrayIAP & aIapList Stores the IAP list

LoadSmtpMobilitySettingsL(const TSmtpMobilityAccount &, CImSmtpMobilitySettings &)

IMPORT_C void LoadSmtpMobilitySettingsL ( const TSmtpMobilityAccount & aAccount,
CImSmtpMobilitySettings & aSettings
)

Loads SMTP mobility account settings

leave
KErrNotFound Specified account is not a SMTP mobility account

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account
CImSmtpMobilitySettings & aSettings SMTP mobility account settings

LoadSmtpMobilitySettingsL(TSmtpAccountId &, TUint32, CImSmtpMobilitySettings &)

IMPORT_C TBool LoadSmtpMobilitySettingsL ( TSmtpAccountId & aSmtpAccountId,
TUint32 aIap,
CImSmtpMobilitySettings & aSettings
)

Loads SMTP mobility account settings for a given SMTP account and IAP

Parameters

TSmtpAccountId & aSmtpAccountId SMTP account ID
TUint32 aIap IAP
CImSmtpMobilitySettings & aSettings SMTP mobility account settings

LoadSmtpSettingsL(const TSmtpAccount &, CImSmtpSettings &)

IMPORT_C void LoadSmtpSettingsL ( const TSmtpAccount & aAccount,
CImSmtpSettings & aSmtpSettings
)

Loads SMTP service settings for the specified account.

leave
KErrNotFound Account specified is a SMTP mobility account

Parameters

const TSmtpAccount & aAccount SMTP account ID
CImSmtpSettings & aSmtpSettings SMTP service settings

NewL()

IMPORT_C CEmailAccounts * NewL ( ) [static]

Allocates and constructs an Email accounts object.

Initialises all member data to their default values.

NewLC()

IMPORT_C CEmailAccounts * NewLC ( ) [static]

Allocates and constructs an Email accounts object.

Initialises all member data to their default values.

PopRepositoryL()

CRepository & PopRepositoryL ( ) [private]

PopulateDefaultImapSettingsL(CImImap4Settings &, CImIAPPreferences &)

IMPORT_C void PopulateDefaultImapSettingsL ( CImImap4Settings & aImapSettings,
CImIAPPreferences & aImapIap
)

Populates the supplied setting objects with default values.

Parameters

CImImap4Settings & aImapSettings IMAP Service Setting
CImIAPPreferences & aImapIap IMAP IAP preferences

PopulateDefaultPopSettingsL(CImPop3Settings &, CImIAPPreferences &)

IMPORT_C void PopulateDefaultPopSettingsL ( CImPop3Settings & aPopSettings,
CImIAPPreferences & aPopIap
)

Populates the supplied setting objects with default values.

Parameters

CImPop3Settings & aPopSettings POP Service Setting
CImIAPPreferences & aPopIap POP IAP preferences

PopulateDefaultSmtpMobilitySettingsL(CImSmtpMobilitySettings &)

IMPORT_C void PopulateDefaultSmtpMobilitySettingsL ( CImSmtpMobilitySettings & aSettings )

Populates the supplied settings object with default values

Parameters

CImSmtpMobilitySettings & aSettings SMTP mobility account settings

PopulateDefaultSmtpSettingsL(CImSmtpSettings &, CImIAPPreferences &)

IMPORT_C void PopulateDefaultSmtpSettingsL ( CImSmtpSettings & aSmtpSettings,
CImIAPPreferences & aSmtpIap
)

Populates the supplied setting objects with default values.

Parameters

CImSmtpSettings & aSmtpSettings SMTP Service Settings
CImIAPPreferences & aSmtpIap SMTP IAP preferences

SaveIAPPrefSettingsL(TUint32, const CImIAPPreferences &, CRepository &)

void SaveIAPPrefSettingsL ( TUint32 aAccountId,
const CImIAPPreferences & aIAP,
CRepository & aRepository
) [private]

Parameters

TUint32 aAccountId
const CImIAPPreferences & aIAP
CRepository & aRepository

SaveImapIapSettingsL(const TImapAccount &, const CImIAPPreferences &)

IMPORT_C void SaveImapIapSettingsL ( const TImapAccount & aAccount,
const CImIAPPreferences & aIAP
)

Saves IMAP IAP settings for the specified account.

Parameters

const TImapAccount & aAccount IMAP account ID, if the account name is zero-length, the account name is not updated
const CImIAPPreferences & aIAP IMAP IAP Pref settings

SaveImapSettingsL(const TImapAccount &, const CImImap4Settings &)

IMPORT_C void SaveImapSettingsL ( const TImapAccount & aAccount,
const CImImap4Settings & aImapSettings
)

Saves IMAP service settings for the specified account.

Parameters

const TImapAccount & aAccount IMAP account ID, if the account name is zero-length, the account name is not updated
const CImImap4Settings & aImapSettings IMAP service settings

SaveImapSyncDownloadRulesL(const TImapAccount &, const CImapSyncDownloadRules &)

IMPORT_C void SaveImapSyncDownloadRulesL ( const TImapAccount & aAccount,
const CImapSyncDownloadRules & aRules
)

Saves IMAP synchronisation download rules

Parameters

const TImapAccount & aAccount IMAP account ID
const CImapSyncDownloadRules & aRules Synchronisation download rules

SaveImapTransportBufferSizesL(const CImapTransportBufferSizes &)

IMPORT_C void SaveImapTransportBufferSizesL ( const CImapTransportBufferSizes & aBufferSizes )

Saves IMAP transport buffer sizes

Parameters

const CImapTransportBufferSizes & aBufferSizes Transport buffer sizes

SavePopIapSettingsL(const TPopAccount &, const CImIAPPreferences &)

IMPORT_C void SavePopIapSettingsL ( const TPopAccount & aAccount,
const CImIAPPreferences & aIAP
)

Saves POP IAP settings for the specified account.

Parameters

const TPopAccount & aAccount POP account ID, if the account name is zero-length, the account name is not updated
const CImIAPPreferences & aIAP POP IAP Pref settings

SavePopSettingsL(const TPopAccount &, const CImPop3Settings &)

IMPORT_C void SavePopSettingsL ( const TPopAccount & aAccount,
const CImPop3Settings & aPopSettings
)

Saves POP service settings for the specified account.

Parameters

const TPopAccount & aAccount POP account ID, if the account name is zero-length, the account name is not updated
const CImPop3Settings & aPopSettings POP service settings

SaveSmtpIapSettingsL(const TSmtpAccount &, const CImIAPPreferences &)

IMPORT_C void SaveSmtpIapSettingsL ( const TSmtpAccount & aAccount,
const CImIAPPreferences & aIAP
)

Saves SMTP IAP settings for the specified account.

Parameters

const TSmtpAccount & aAccount SMTP account ID, if the account name is zero-length, the account name is not updated
const CImIAPPreferences & aIAP SMTP IAP Pref settings

SaveSmtpMobilityAccountIapListL(const TSmtpMobilityAccount &, const RArrayIAP &)

IMPORT_C void SaveSmtpMobilityAccountIapListL ( const TSmtpMobilityAccount & aAccount,
const RArrayIAP & aIapList
)

Sets the IAP list for a SMTP mobility account

leave
KErrArgument No entries or too many entries in the IAP list

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account
const RArrayIAP & aIapList IAP list to save

SaveSmtpMobilitySettingsL(const TSmtpMobilityAccount &, const CImSmtpMobilitySettings &)

IMPORT_C void SaveSmtpMobilitySettingsL ( const TSmtpMobilityAccount & aAccount,
const CImSmtpMobilitySettings & aSettings
)

Saves the settings for a SMTP mobility account

leave
KErrNotFound Specified account is not a SMTP mobility account
leave
KErrNotSupported SMTP mobility account uses settings of a linked SMTP account and changing the settings is not supported

Parameters

const TSmtpMobilityAccount & aAccount SMTP mobility account
const CImSmtpMobilitySettings & aSettings Settings to save

SaveSmtpSettingsL(const TSmtpAccount &, const CImSmtpSettings &)

IMPORT_C void SaveSmtpSettingsL ( const TSmtpAccount & aAccount,
const CImSmtpSettings & aSmtpSettings
)

Saves SMTP service settings for the specified account.

Parameters

const TSmtpAccount & aAccount SMTP account ID, if the account name is zero-length, the account name is not updated
const CImSmtpSettings & aSmtpSettings SMTP service settings

SessionL()

CMsvSession & SessionL ( ) [private]

SetDefaultSmtpAccountL(const TSmtpAccount &)

IMPORT_C void SetDefaultSmtpAccountL ( const TSmtpAccount & aAccount )

Sets the default smtp account.

Parameters

const TSmtpAccount & aAccount Account ID to set as default

SetEntryDetailsL(TMsvId, const TDesC &)

void SetEntryDetailsL ( TMsvId aId,
const TDesC & aAccountName
) [private]

Parameters

TMsvId aId
const TDesC & aAccountName

SetRelatedIdL(CMsvEntry &, TMsvId, TMsvId)

void SetRelatedIdL ( CMsvEntry & aMsvEntry,
TMsvId aId,
TMsvId aRelatedId
) [private]

Parameters

CMsvEntry & aMsvEntry
TMsvId aId
TMsvId aRelatedId

SmtpRepositoryL()

CRepository & SmtpRepositoryL ( ) [private]

UnSetInPreparationFlagsL(CMsvEntry &, TMsvId, TInt)

void UnSetInPreparationFlagsL ( CMsvEntry & aMsvEntry,
TMsvId aId,
TInt aAccountId
) [private]

Parameters

CMsvEntry & aMsvEntry
TMsvId aId
TInt aAccountId

Member Enumerations Documentation

Enum TEmailSettingTypes

Enumerators

EServiceSettingType = 0x00000000
EIAPPrefSettingType = 0x00010000
EAccountMask = 0x800FFFFF

Enum TIAPPreferencesCenRepId

Enumerators

EIAPPrefVersion = 0x00010000
EIAPChoicesCount = 0x00010001
EIAPListIDs = 0x00011000
EIAPListDialogPrefs = 0x00012000
EIAPSnapId = 0x00014000

Enum TIMAPServiceSettingsCenRepId

Enumerators

EIMAPServiceId = 0x00000000
EIMAPAccountNameId = 0x00000001
EIMAPRelatedSMTPServiceId = 0x00000002
EIMAPSettingsVersionId = 0x00000003
EIMAPServerAddressId = 0x00000004
EIMAPPortNumberId = 0x00000005
EIMAPFlagsId = 0x00000006
EIMAPLoginNameId = 0x00000007
EIMAPPasswordId = 0x00000008
EIMAPFolderPathId = 0x00000009
EIMAPPathSeparatorId = 0x0000000A
EIMAPSynchronisationStrategyId = 0x0000000B
EIMAPSubscriptionStrategyId = 0x0000000C
EIMAPMaxEmailSizeId = 0x0000000D
EIMAPGetMailOptionsId = 0x0000000E
EIMAPInboxSynchronisationLimitId = 0x0000000F
EIMAPMailboxSynchronisationLimitId = 0x00000010
EIMAPTlsSslDomainId = 0x00000012
EIMAPSyncRateId = 0x00000020
EIMAPFetchSizeId = 0x00000030
EIMAPIdleTimeoutId = 0x00000040
EPartialMailOptionsId = 0x00000050
EBodyTextSizeLimitId = 0x00000060
EAttachmentSizeLimitId = 0x00000070
EIMAPSearchStringId = 0x00000080
EIMAPReadOnlyAccountId = 0x00000090

Enum TIMAPSyncDownloadRulesCenRepInfo

Enumerators

EIMAPSyncDownloadRulesVersionId = 0x00001000
EIMAPNumInboxSyncDownloadRulesId = 0x00001001
EIMAPNumFolderSyncDownloadRulesId = 0x00001002
EIMAPInboxSyncDownloadRulesBearerTypesId = 0x00001010
EIMAPInboxSyncDownloadRulesMailOptionsId = 0x00001011
EIMAPInboxSyncDownloadRulesTotalSizeLimitId = 0x00001012
EIMAPInboxSyncDownloadRulesBodyTextSizeLimitId = 0x00001013
EIMAPInboxSyncDownloadRulesAttachmentSizeLimitId = 0x00001014
EIMAPInboxSyncDownloadRulesGetMailBodyPartsId = 0x00001015
EIMAPInboxSyncDownloadRulesMaxEmailSizeId = 0x00001016
EIMAPFolderSyncDownloadRulesBearerTypesId = 0x00001030
EIMAPFolderSyncDownloadRulesMailOptionsId = 0x00001031
EIMAPFolderSyncDownloadRulesTotalSizeLimitId = 0x00001032
EIMAPFolderSyncDownloadRulesBodyTextSizeLimitId = 0x00001033
EIMAPFolderSyncDownloadRulesAttachmentSizeLimitId = 0x00001034
EIMAPFolderSyncDownloadRulesGetMailBodyPartsId = 0x00001035
EIMAPFolderSyncDownloadRulesMaxEmailSizeId = 0x00001036
EIMAPSyncDownloadRulesOffset = 0x40

Enum TIMAPTransportBufferSizesCenRepInfo

Enumerators

EIMAPTransportBufferSizesVersionId = 0x80000100
EIMAPNumTransportBufferSizesId = 0x80000101
EIMAPTransportBufferSizesBearerTypesId = 0x80000110
EIMAPTransportBufferSizesFetchRequestSizeId = 0x80000111
EIMAPTransportBufferSizesMaxOutstandingFetchResponsesId = 0x80000112
EIMAPTransportBufferSizesOffset = 0x20

Enum TPOPServiceSettingsCenRepId

Enumerators

EPOPServiceId = 0x00000000
EPOPAccountNameId = 0x00000001
EPOPRelatedSMTPServiceId = 0x00000002
EPOPSettingsVersionId = 0x00000003
EPOPServerAddressId = 0x00000004
EPOPPortNumberId = 0x00000005
EPOPFlagsId = 0x00000006
EPOPLoginNameId = 0x00000007
EPOPPasswordId = 0x00000008
EPOPMaxEmailSizeId = 0x00000009
EPOPGetEmailOptionsId = 0x0000000A
EPOPInboxSynchronisationLimitId = 0x0000000B
EPOPPopulationLimitId = 0x0000000C
EPOPReadOnlyAccountId = 0x0000000D
EPOPTlsSslDomainId = 0x0000000F

Enum TSMTPLinkedMobilityAccountListCenRepInfo

Enumerators

ESMTPLinkedMobilityAccountListVersionId = 0x00015000
ESMTPLinkedMobilityAccountListNumEntriesId = 0x00015001
ESMTPLinkedMobilityAccountListEntryId = 0x00015010
ESMTPLinkedMobilityAccountListMaxEntries = 2048

Enum TSMTPMobilityAccountListCenRepInfo

Enumerators

ESMTPMobilityAccountListVersionId = 0x00016000
ESMTPMobilityAccountListNumEntriesId = 0x00016001
ESMTPMobilityAccountListAccountId = 0x00016010
ESMTPMobilityAccountListNumIapsId = 0x00016011
ESMTPMobilityAccountListIapId = 0x00016020
ESMTPMobilityAccountListOffset = 0x40
ESMTPMobilityAccountMaxEntries = 32

Enum TSMTPServiceSettingsCenRepId

Enumerators

ESMTPServiceId = 0x00000000
ESMTPAccountNameId = 0x00000001
ESMTPSettingsVersionId = 0x00000002
ESMTPServerAddressId = 0x00000003
ESMTPPortNumberId = 0x00000004
ESMTPFlagsId = 0x00000005
ESMTPEmailAliasId = 0x00000006
ESMTPEmailAddressId = 0x00000007
ESMTPReplyToAddressId = 0x00000008
ESMTPReceiptAddressId = 0x00000009
ESMTPBodyEncodingId = 0x0000000A
ESMTPDefaultMsgCharSetId = 0x0000000B
ESMTPSendCopyToSelfId = 0x0000000C
ESMTPSendMessageOptionId = 0x0000000D
ESMTPLoginNameId = 0x0000000E
ESMTPPasswordId = 0x0000000F
ESMTPRelatedServiceId = 0x00000010
ESMTPIncludeToCcId = 0x00000011
ESMTPReadOnlyAccountId = 0x00000012
ESMTPParentAccountId = 0x00000013
ESMTPTlsSslDomainId = 0x00000014
ESMTPLinkedAccountId = 0x00000015

Member Data Documentation

CRepository * iIMAPRepository

CRepository * iIMAPRepository [private]

CMsvSession * iMsvSession

CMsvSession * iMsvSession [private]

CRepository * iPOPRepository

CRepository * iPOPRepository [private]

CRepository * iSMTPRepository

CRepository * iSMTPRepository [private]