1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/comms-infras/esock_params.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,130 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef ESOCK_PARAMS_H
1.20 +#define ESOCK_PARAMS_H
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <e32std.h>
1.24 +
1.25 +#include <comms-infras/metadata.h>
1.26 +#include <es_prot.h>
1.27 +
1.28 +class TConnAPPref : public Meta::SMetaDataECom
1.29 +/**
1.30 +Connection preference to specify an access point to start.
1.31 +
1.32 +However, this preference cannot be used with RConnection::Start as a TConnPref. It
1.33 +must be part of a TConnPrefList.
1.34 +
1.35 +TConnAPPref can be added to the list to chose the top level access point. For the
1.36 +KAfInet tier this type behaves in the same way as TConnSnapPref.
1.37 +
1.38 +It is recommended that at most one TConnAPPref from each tier is added to the
1.39 +TConnPrefList.
1.40 +
1.41 +If no TConnAPPref is specified, then the default access point for the KAfInet
1.42 +tier will be used for selection.
1.43 +
1.44 +@see TConnSnapPref
1.45 +@see TConnPrefList
1.46 +@see RConnection::Start
1.47 +
1.48 +@publishedAll
1.49 +@released since 9.5
1.50 +*/
1.51 + {
1.52 +public:
1.53 + inline static TConnAPPref* NewL();
1.54 + inline static TConnAPPref* NewL(TUint aAP);
1.55 +
1.56 + enum
1.57 + {
1.58 + EUid = 0x10285E27,
1.59 + ETypeId = 2
1.60 + };
1.61 +
1.62 + inline void SetAP(TUint aAP);
1.63 + inline TInt GetAP();
1.64 +
1.65 +protected:
1.66 + DATA_VTABLE
1.67 +
1.68 + TUint iAP;
1.69 + };
1.70 +
1.71 +
1.72 +class TConnAutoStartPref : public Meta::SMetaDataECom
1.73 +/** The connection preference requires that the connection waits until its selected access point is available
1.74 +before starting. The start request does not complete until the connection is fully up.
1.75 +
1.76 +Without this preference(e.g in the TConnPrefList), if the selected access point is unavailable due to contention or
1.77 +lack of coverage, the RConnection::Start is errored immediately.
1.78 +
1.79 +TConnAutoStartPref does not aid access point selection. When specified without any other preference in the
1.80 +TConnPrefList, the default access point in the KAfInet tier will be selected.
1.81 +
1.82 +@code
1.83 +RConnection conn;
1.84 +User::LeaveIfError(conn.Open(sockSvr));
1.85 +CleanupClosePushL(conn);
1.86 +
1.87 +TConnPrefList* prefs = TConnPrefList::NewL();
1.88 +CleanupStack::PushL(prefs);
1.89 +TConnAPPref* APPref = TConnAPPref::NewL(aPara->iAp);
1.90 +CleanupStack::PushL(APPref);
1.91 +TConnAutoStartPref autoPref = TConnAutoStartPref::NewL();
1.92 +CleanupStack::PushL(autoPref);
1.93 +
1.94 +prefs->AppendL(autoPref);
1.95 +prefs->AppendL(APPref);
1.96 +
1.97 +error = conn.Start(pref);
1.98 +@endcode
1.99 +
1.100 +@see RConnection::Start
1.101 +@see TConnPrefList
1.102 +
1.103 +@publishedAll
1.104 +@released since 9.5
1.105 +*/
1.106 + {
1.107 +public:
1.108 + inline static TConnAutoStartPref* NewL();
1.109 + enum
1.110 + {
1.111 + EUid = 0x10285E27,
1.112 + ETypeId = 3
1.113 + };
1.114 +
1.115 +protected:
1.116 + DATA_VTABLE
1.117 + };
1.118 +
1.119 +
1.120 +#include <comms-infras/esock_params.inl>
1.121 +
1.122 +class CESockParamaterFactory : public CBase
1.123 +/** Connection generic parameter set factory.
1.124 +
1.125 +@internalComponent
1.126 +*/
1.127 + {
1.128 +public:
1.129 + static Meta::SMetaDataECom* NewL(TAny* aConstructionParameters);
1.130 + };
1.131 +
1.132 +#endif
1.133 +