author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 0 | 061f57f2323e |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 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 |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#if !(defined __CONNPREF_H__) |
williamr@2 | 17 |
#define __CONNPREF_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#define TCommSnapPref TConnSnapPref |
williamr@2 | 20 |
#include <e32std.h> |
williamr@2 | 21 |
|
williamr@2 | 22 |
/** |
williamr@2 | 23 |
@publishedAll |
williamr@2 | 24 |
@released since v7.0s |
williamr@2 | 25 |
*/ |
williamr@2 | 26 |
const TUint KMaxConnPrefSize = 0x40; |
williamr@2 | 27 |
|
williamr@2 | 28 |
/** |
williamr@2 | 29 |
@internalTechnology |
williamr@2 | 30 |
*/ |
williamr@2 | 31 |
struct SConnPref |
williamr@2 | 32 |
{ |
williamr@2 | 33 |
TInt16 iExtensionId; ///< Extension ID |
williamr@2 | 34 |
TInt16 iSpare; |
williamr@2 | 35 |
}; |
williamr@2 | 36 |
|
williamr@2 | 37 |
class TConnPref : public TBuf8<KMaxConnPrefSize> |
williamr@2 | 38 |
/** |
williamr@2 | 39 |
Overrides the connection preferences. |
williamr@2 | 40 |
@publishedAll |
williamr@2 | 41 |
@released since v7.0s |
williamr@2 | 42 |
*/ |
williamr@2 | 43 |
{ |
williamr@2 | 44 |
public: |
williamr@2 | 45 |
enum |
williamr@2 | 46 |
{ |
williamr@2 | 47 |
EConnPrefUnknown = 0x00, ///< Unknown Connection preference |
williamr@2 | 48 |
EConnPrefCommDb = 0x01, ///< CommDb Connection preference |
williamr@2 | 49 |
EConnPrefCommDbMulti = 0x02, ///< CommDbMulti Connection preferenc |
williamr@2 | 50 |
EConnPrefSnap = 0x03, |
williamr@2 | 51 |
EConnPrefIdList = 0x04, |
williamr@2 | 52 |
EConnPrefSip = 0x05 ///< Sip Connection preference |
williamr@2 | 53 |
}; |
williamr@2 | 54 |
|
williamr@2 | 55 |
IMPORT_C TConnPref(); |
williamr@2 | 56 |
IMPORT_C TConnPref(TInt aExtensionId); |
williamr@2 | 57 |
|
williamr@2 | 58 |
IMPORT_C TInt ExtensionId() const; |
williamr@2 | 59 |
IMPORT_C TInt GetUserLen(); |
williamr@2 | 60 |
|
williamr@2 | 61 |
protected: |
williamr@2 | 62 |
IMPORT_C void SetExtensionId(TInt aExtensionId); |
williamr@2 | 63 |
IMPORT_C void SetUserLen(TInt aLen); |
williamr@2 | 64 |
inline TUint8* UserPtr() const; |
williamr@2 | 65 |
|
williamr@2 | 66 |
private: |
williamr@2 | 67 |
inline SConnPref* BasePtr() const; |
williamr@2 | 68 |
}; |
williamr@2 | 69 |
|
williamr@2 | 70 |
inline SConnPref* TConnPref::BasePtr() const |
williamr@2 | 71 |
{ |
williamr@2 | 72 |
return (SConnPref*)iBuf; |
williamr@2 | 73 |
} |
williamr@2 | 74 |
|
williamr@2 | 75 |
inline TUint8* TConnPref::UserPtr() const |
williamr@2 | 76 |
{ |
williamr@2 | 77 |
return (TUint8*)(BasePtr()+1); |
williamr@2 | 78 |
} |
williamr@2 | 79 |
|
williamr@2 | 80 |
class TConnSnapPref : public TConnPref |
williamr@2 | 81 |
/** |
williamr@2 | 82 |
An instance of the class is passed to RConnection::Start when user wants to start connection based on |
williamr@2 | 83 |
Service Network Access Point that represents a collection of AP to try out. |
williamr@2 | 84 |
|
williamr@2 | 85 |
@publishedAll |
williamr@2 | 86 |
@released since v9.1 |
williamr@2 | 87 |
@see RConnection::Start |
williamr@2 | 88 |
*/ |
williamr@2 | 89 |
{ |
williamr@2 | 90 |
public: |
williamr@2 | 91 |
IMPORT_C TConnSnapPref(); |
williamr@2 | 92 |
IMPORT_C TConnSnapPref(TUint32 aSnap); |
williamr@2 | 93 |
|
williamr@2 | 94 |
IMPORT_C void SetSnap(TUint32 aSnap); |
williamr@2 | 95 |
IMPORT_C TUint32 Snap() const; |
williamr@2 | 96 |
}; |
williamr@2 | 97 |
|
williamr@2 | 98 |
#endif // __CONNPREF_H__ |