--- a/epoc32/include/commdbconnpref.h Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/commdbconnpref.h Wed Mar 31 12:33:34 2010 +0100
@@ -1,9 +1,9 @@
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
-// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
+// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
-// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
@@ -13,50 +13,39 @@
// Description:
//
-
-
-/**
- @file
- @deprecated since v9.1. Functionality is replaced with commsdat.
-*/
-
#if !(defined COMMDBCONNPREF_H)
#define COMMDBCONNPREF_H
#include <connpref.h>
#include <cdbcols.h>
-/**
-Constant for storing Major Version Number
-@internalTechnology
-*/
-const TInt8 KMajorVersionNumber = 8;
+class TCommDbConnPref : public TConnPref
+/** Connection preferences which override the contents of the ConnectionPreferences
+tables in CommsDat. The only mandatory field is IAP.
-/**
-Constant for storing Minor Version Number
-*/
-const TInt8 KMinorVersionNumber = 0;
+An Internet Access Point(IAP) represents a IP bound bearer and a set of parameters
+on that bearer, which the device can use to make a connection to the Internet.
-/**
-Constant for storing Build Version Number
-*/
-const TInt16 KBuildVersionNumber = 1;
+A list of available IAPs and Networks can be retrieved from CommsDat using
+CommsDat::CCDIAPRecord and CCDNetworkRecord.
+@code
+RConnection conn;
+User::LeaveIfError(conn.Open(sockSvr));
+CleanupClosePushL(conn);
-/**
-@internalTechnology
-*/
-struct SCommDbConnPref
- {
- TUint32 iIapId;
- TUint32 iNetId;
- TCommDbDialogPref iDialogPref;
- TCommDbConnectionDirection iDirection;
- TUint32 iBearerSet;
- };
+TCommDbConnPref prefs;
+prefs.SetIapId(3);
+TInt error = conn.Start(prefs);
+@endcode
-class TCommDbConnPref : public TConnPref
-/**
+@see CommsDat::CCDNetworkRecord
+@see CommsDat::CCDIAPRecord
+@see TCommDbDialogPref
+@see TCommDbConnectionDirection
+@see TCommDbBearer
+@see RConnection::Start
+
@publishedAll
@released since v7.0s
*/
@@ -87,26 +76,53 @@
inline static TCommDbConnPref& Cast(const TConnPref& aPref);
-protected:
+public:
+ struct SCommDbConnPref
+ {
+ TUint32 iIapId;
+ TUint32 iNetId;
+ TCommDbDialogPref iDialogPref;
+ TCommDbConnectionDirection iDirection;
+ TUint32 iBearerSet;
+ };
inline SCommDbConnPref* PrefPtr() const;
+ const static TInt8 KMajorVersionNumber = 8;
+ const static TInt8 KMinorVersionNumber = 0;
+ const static TInt16 KBuildVersionNumber = 1;
};
-/**
-@internalTechnology
-*/
-const TInt KMaxMultiConnPrefCount = 2;
-/**
-@internalTechnology
-*/
-struct SCommDbMultiConnPref
- {
- TInt iNumAttempts;
- struct SCommDbConnPref iPrefs[KMaxMultiConnPrefCount];
- };
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.
+
+@code
+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);
+@endcode
+
+@see TCommDbConnPref
+@see RConnection::Start
+
@publishedAll
@released since v7.0s
*/
@@ -123,8 +139,17 @@
inline static TCommDbMultiConnPref& Cast(const TConnPref& aPref);
-protected:
+public:
+ const static TInt KMaxMultiConnPrefCount = 2;
+ struct SCommDbMultiConnPref
+ {
+ TInt iNumAttempts;
+ struct TCommDbConnPref::SCommDbConnPref iPrefs[KMaxMultiConnPrefCount];
+ };
inline struct SCommDbMultiConnPref* PrefPtr() const;
+ const static TInt8 KMajorVersionNumber = 8;
+ const static TInt8 KMinorVersionNumber = 0;
+ const static TInt16 KBuildVersionNumber = 1;
};
#include <commdbconnpref.inl>