class CImIAPPreferences : public CBase |
Encapsulates preferences relating to IAPs for an email service.
An IAP defines all of the variable factors that determine how an Internet connection is made. These variable factors can include the bearer (CDMA, GSM or GPRS), dial-in number. network login names and passwords.
The Comms Database is capable of storing details of several IAPs, which can then be used to initiate different types of connection. The database also stores the preference order of the IAPs: this defines which IAP should be used as the first choice, and also an optional second choice to be used if the first choice is not available.
The CImIAPPreferences class associates a first choice, and optionally a second choice IAP to use with a particular email service. The preference object is stored in the service entry's message store.
For SMTP, if no object has been stored in the service, then the SMTP client will attempt to use any default Internet settings in the Comms Database, or will use the existing Internet connection if one does already exist. Note that SMTP sessions will normally fail to send any email messages if the SMTP session is not created using an IAP which the SMTP server does not accept.
Note that in Symbian OS v6.0 a single IAP was associated with an email service entry through the iMtmData1 field.
Public Member Functions | |
---|---|
~CImIAPPreferences() | |
IMPORT_C void | AddIAPL(TImIAPChoice, TInt) |
IMPORT_C TInt | FindIAPL(TUint32, TInt &) |
IMPORT_C TImIAPChoice | IAPPreference(TInt) |
IMPORT_C CImIAPPreferences * | NewLC() |
IMPORT_C TInt | NumberOfIAPs() |
IMPORT_C void | RemoveIAPL(TInt) |
IMPORT_C void | RemoveSNAP() |
IMPORT_C void | ReplaceIAPL(TInt, TImIAPChoice) |
void | Reset() |
IMPORT_C TBool | SNAPDefined() |
IMPORT_C TUint32 | SNAPPreference() |
IMPORT_C void | SetSNAPL(TUint32) |
IMPORT_C TInt | Version() |
Private Member Functions | |
---|---|
CImIAPPreferences() | |
CImIAPPreferences(CImIAPPreferences &) | |
void | ConstructL() |
void | Panic(int) |
int | operator=(CImIAPPreferences &) |
Public Member Enumerations | |
---|---|
enum | anonymous { KSanityCheckOldWins = 0xEFBEADDE, KSanityCheck = 0xDEADBEEF } |
Public Attributes | |
---|---|
const TUid | KUidMsgFileInternetAccessPreferences |
Private Attributes | |
---|---|
CArrayFixFlat< TImIAPChoice > * | iChoices |
TUint32 | iSnapId |
TInt | iVersion |
CImIAPPreferences | ( | CImIAPPreferences & | aOther | ) | [private] |
CImIAPPreferences & aOther |
IMPORT_C void | AddIAPL | ( | TImIAPChoice | aIap, |
TInt | aIndex = 0 | |||
) |
Adds the given IAP with the given preference value.
Any existing IAPs of equal or lower preference will have their preference lowered further to make way for the new IAP. For example, if an IAP of preference value 0 is already associated with the current service and another IAP of preference 0 is added, then the existing IAP will be relegated to preference value 1. Currently the number of IAPs per service is limited to two.
TImIAPChoice aIap | IAP |
TInt aIndex = 0 | Preference value for this IAP |
IMPORT_C TInt | FindIAPL | ( | TUint32 | aIAP, |
TInt & | aLocation | |||
) | const |
Finds the preference value for a specified IAP.
IMPORT_C TImIAPChoice | IAPPreference | ( | TInt | aPreference | ) | const |
Gets the IAP choice of the given preference value.
Note that preference values run from 0 to n, with 0 being the first choice. Currently the number of IAPs per service is limited to two.
TInt aPreference | Preference value |
IMPORT_C CImIAPPreferences * | NewLC | ( | ) | [static] |
Allocates and creates a new CImIAPPreferences object, leaving the object on the cleanup stack.
IMPORT_C TInt | NumberOfIAPs | ( | ) | const |
Gets the number of IAPs that are assigned to the current service entry.
IMPORT_C void | RemoveIAPL | ( | TInt | aPreferenceNumber | ) |
Removes the IAP of the given preference.
Any existing IAPs of lower preference will have their preference increased to fill the gap created by the IAP that has been removed. For example, if two IAPs are associated with the current service with the preference values 0 and 1. If the IAP of preference value 0 is later removed, then the other IAP is promoted to preference value 0. It should be noted that adding or removing an IAP from a CImIAPPreferences object does not change any global IAP settings, it only changes the behaviour associated with a particular with a particular email service.
TInt aPreferenceNumber | Preference value |
IMPORT_C void | ReplaceIAPL | ( | TInt | aPreferenceNumber, |
TImIAPChoice | aIap | |||
) |
Replaces the current IAP at a specified preference value.
A panic occurs if an IAP is not already set for the preference value.
TInt aPreferenceNumber | The preference value for which to set the IAP |
TImIAPChoice aIap | The new IAP value for the preference value |
IMPORT_C TBool | SNAPDefined | ( | ) | const |
Used to check if SNAP settings are defined for this Email account.
IMPORT_C TUint32 | SNAPPreference | ( | ) | const |
Returns the current SNAP Id for the email account.
IMPORT_C void | SetSNAPL | ( | TUint32 | aSnap | ) |
Sets the SNAP id for the email account, to the value specified in aSnap.
TUint32 aSnap | Specifies the new SNAP id to be used by this email account. |
int | operator= | ( | CImIAPPreferences & | aOther | ) | [private] |
CImIAPPreferences & aOther |
const TUid | KUidMsgFileInternetAccessPreferences | [static] |
ID of the stream used to store IAP preference information in a message store.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.