epoc32/include/commdbconnpref.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file
    20  @deprecated since v9.1. Functionality is replaced with commsdat.
    21 */
    22 
    23 #if !(defined COMMDBCONNPREF_H)
    24 #define COMMDBCONNPREF_H
    25 
    26 #include <connpref.h>
    27 #include <cdbcols.h>
    28 
    29 /**
    30 Constant for storing Major Version Number
    31 @internalTechnology
    32 */
    33 const TInt8 KMajorVersionNumber = 8;
    34 
    35 /**
    36 Constant for storing Minor Version Number
    37 */
    38 const TInt8 KMinorVersionNumber = 0;
    39 
    40 /**
    41 Constant for storing Build Version Number
    42 */
    43 const TInt16 KBuildVersionNumber = 1;
    44 
    45 
    46 /**
    47 @internalTechnology
    48 */
    49 struct SCommDbConnPref
    50 	{
    51 	TUint32 iIapId;
    52 	TUint32 iNetId;
    53 	TCommDbDialogPref iDialogPref;
    54 	TCommDbConnectionDirection iDirection;
    55 	TUint32 iBearerSet;
    56 	};
    57 
    58 class TCommDbConnPref : public TConnPref
    59 /**
    60 @publishedAll
    61 @released since v7.0s
    62 */
    63 	{
    64 	friend class TCommDbMultiConnPref;
    65 public:
    66 	IMPORT_C TCommDbConnPref();
    67 	IMPORT_C static TVersion Version();
    68 
    69 	IMPORT_C void SetIapId(TUint32 aIapId);
    70 	IMPORT_C TUint32 IapId() const;
    71 
    72 	IMPORT_C void SetNetId(TUint32 aNetId);
    73 	IMPORT_C TUint32 NetId() const;
    74 
    75 	IMPORT_C void SetDialogPreference(TCommDbDialogPref aDialogPref);
    76 	IMPORT_C TCommDbDialogPref DialogPreference() const;
    77 
    78 	IMPORT_C void SetDirection(TCommDbConnectionDirection aDirection);
    79 	IMPORT_C TCommDbConnectionDirection Direction() const;
    80 
    81 	IMPORT_C void SetBearerSet(TUint32 aBearerSet);
    82 	IMPORT_C TUint32 BearerSet() const;
    83 
    84 	IMPORT_C virtual TInt Compare(const TCommDbConnPref& aPref) const;
    85 	inline TBool operator==(const TCommDbConnPref& aPref) const;
    86 	inline TBool operator!=(const TCommDbConnPref& aPref) const;
    87 
    88 	inline static TCommDbConnPref& Cast(const TConnPref& aPref);
    89 
    90 protected:
    91 	inline SCommDbConnPref* PrefPtr() const;
    92 	};
    93 
    94 /**
    95 @internalTechnology
    96 */
    97 const TInt KMaxMultiConnPrefCount = 2;
    98 
    99 /**
   100 @internalTechnology
   101 */
   102 struct SCommDbMultiConnPref
   103 	{
   104 	TInt iNumAttempts;
   105 	struct SCommDbConnPref iPrefs[KMaxMultiConnPrefCount];
   106 	};
   107 
   108 class TCommDbMultiConnPref : public TConnPref
   109 /**
   110 @publishedAll
   111 @released since v7.0s
   112 */
   113 	{
   114 public:
   115 	IMPORT_C TCommDbMultiConnPref();
   116 	IMPORT_C static TVersion Version();
   117 
   118 	IMPORT_C TInt SetPreference(TInt aIndex, const TCommDbConnPref& aPref);
   119 	IMPORT_C TInt GetPreference(TInt aIndex, TCommDbConnPref& aPref);
   120 
   121 	IMPORT_C void SetConnectionAttempts(TInt aNumAttempts);
   122 	IMPORT_C TInt ConnectionAttempts();
   123 
   124 	inline static TCommDbMultiConnPref& Cast(const TConnPref& aPref);
   125 
   126 protected:
   127 	inline struct SCommDbMultiConnPref* PrefPtr() const;
   128 	};
   129 
   130 #include <commdbconnpref.inl>
   131 
   132 #endif
   133 // COMMDBCONNPREF_H