| class TCommDbMultiConnPref : public TConnPref |
A set of TCommDbConnPrefs which the device will use to attempt to connect to the internet. The preferences at index 1 will be used first, and if this fails the preferences at index 2 will be used, and so on until connection attempts are exhausted.
The index counts from 1. There must be as many connection preferences as there are connection attempts.
RConnection conn;
User::LeaveIfError(conn.Open(sockSvr));
CleanupClosePushL(conn);
TCommDbConnPref prefsA;
prefsA.SetIapId(3);
TCommDbConnPref prefsB;
prefsB.SetIapId(5);
TCommDbMultiConnPref prefs;
prefs.SetPreference(1, prefsA);
prefs.SetPreference(2, prefsB);
prefs.SetConnectionAttempts(2);
TInt error = conn.Start(prefs);
TCommDbConnPref RConnection::Startsince v7.0s
| Public Member Functions | |
|---|---|
| TCommDbMultiConnPref () | |
| TCommDbMultiConnPref & | Cast (const TConnPref &) |
| IMPORT_C TInt | ConnectionAttempts () |
| IMPORT_C TInt | GetPreference ( TInt , TCommDbConnPref &) |
| struct SCommDbMultiConnPref * | PrefPtr () |
| IMPORT_C void | SetConnectionAttempts ( TInt ) |
| IMPORT_C TInt | SetPreference ( TInt , const TCommDbConnPref &) |
| IMPORT_C TVersion | Version () |
| Inherited Enumerations | |
|---|---|
| TConnPref:@67 | |
| Public Attributes | |
|---|---|
| const TInt16 | KBuildVersionNumber |
| const TInt8 | KMajorVersionNumber |
| const TInt | KMaxMultiConnPrefCount |
| const TInt8 | KMinorVersionNumber |
| Inherited Attributes | |
|---|---|
| TBuf8< KMaxConnPrefSize >::iBuf | |
| TDes8::__DECLARE_TEST | |
| TDes8::iMaxLength | |
| TCommDbMultiConnPref & | Cast | ( | const TConnPref & | aPref | ) | [static, inline] |
Casts the TConnPref object to TCommDbMultiConnPref
| const TConnPref & aPref | Connection preferences. |
| IMPORT_C TInt | ConnectionAttempts | ( | ) |
Retrieves the number of times to attempt the connection
| IMPORT_C TInt | GetPreference | ( | TInt | aIndex, |
| TCommDbConnPref & | aPref | |||
| ) | ||||
Retrieves a connection preference from the array
| TInt aIndex | Index of the array |
| TCommDbConnPref & aPref | On return, the connection preferences |
| IMPORT_C void | SetConnectionAttempts | ( | TInt | aNumAttempts | ) |
Sets the number of times to attempt the connection
| TInt aNumAttempts | Number of attempts to be made for a connection |
| IMPORT_C TInt | SetPreference | ( | TInt | aIndex, |
| const TCommDbConnPref & | aPref | |||
| ) | ||||
Sets a connection preference to the array
| TInt aIndex | Index of the array |
| const TCommDbConnPref & aPref | Connection preference settings |
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.