epoc32/include/connpref.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/connpref.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/connpref.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,98 @@
     1.4 -connpref.h
     1.5 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#if !(defined __CONNPREF_H__)
    1.21 +#define __CONNPREF_H__
    1.22 +
    1.23 +#define TCommSnapPref TConnSnapPref
    1.24 +#include <e32std.h>
    1.25 +
    1.26 +/**
    1.27 +@publishedAll
    1.28 +@released since v7.0s
    1.29 +*/
    1.30 +const TUint KMaxConnPrefSize = 0x40;
    1.31 +
    1.32 +/**
    1.33 +@internalTechnology
    1.34 +*/
    1.35 +struct SConnPref
    1.36 +	{
    1.37 +	TInt16 iExtensionId; ///< Extension ID
    1.38 +	TInt16 iSpare;
    1.39 +	};
    1.40 +
    1.41 +class TConnPref : public TBuf8<KMaxConnPrefSize>
    1.42 +/**
    1.43 +Overrides the connection preferences.
    1.44 +@publishedAll
    1.45 +@released since v7.0s
    1.46 +*/
    1.47 +	{
    1.48 +public:
    1.49 +	enum
    1.50 +		{
    1.51 +		EConnPrefUnknown = 0x00,     ///< Unknown Connection preference
    1.52 +		EConnPrefCommDb = 0x01,      ///< CommDb Connection preference
    1.53 +		EConnPrefCommDbMulti = 0x02, ///< CommDbMulti Connection preferenc
    1.54 +		EConnPrefSnap = 0x03,
    1.55 +		EConnPrefIdList = 0x04,
    1.56 +		EConnPrefSip = 0x05          ///< Sip Connection preference
    1.57 +		};
    1.58 +
    1.59 +	IMPORT_C TConnPref();
    1.60 +	IMPORT_C TConnPref(TInt aExtensionId);
    1.61 +	
    1.62 +	IMPORT_C TInt ExtensionId() const;
    1.63 +	IMPORT_C TInt GetUserLen();
    1.64 +
    1.65 +protected:
    1.66 +	IMPORT_C void SetExtensionId(TInt aExtensionId);
    1.67 +	IMPORT_C void SetUserLen(TInt aLen);
    1.68 +	inline TUint8* UserPtr() const;
    1.69 +
    1.70 +private:
    1.71 +	inline SConnPref* BasePtr() const;
    1.72 +	};
    1.73 +
    1.74 +inline SConnPref* TConnPref::BasePtr() const
    1.75 +	{
    1.76 +	return (SConnPref*)iBuf;
    1.77 +	}
    1.78 +
    1.79 +inline TUint8* TConnPref::UserPtr() const
    1.80 +	{
    1.81 +	return (TUint8*)(BasePtr()+1);
    1.82 +	}
    1.83 +
    1.84 +class TConnSnapPref : public TConnPref
    1.85 +/**
    1.86 +An instance of the class is passed to RConnection::Start when user wants to start connection based on
    1.87 +Service Network Access Point that represents a collection of AP to try out.
    1.88 +
    1.89 +@publishedAll
    1.90 +@released since v9.1
    1.91 +@see RConnection::Start
    1.92 +*/
    1.93 +	{
    1.94 +public:
    1.95 +	IMPORT_C TConnSnapPref();
    1.96 +	IMPORT_C TConnSnapPref(TUint32 aSnap);
    1.97 +
    1.98 +	IMPORT_C void SetSnap(TUint32 aSnap);
    1.99 +	IMPORT_C TUint32 Snap() const;
   1.100 +	};
   1.101 +
   1.102 +#endif // __CONNPREF_H__