1 // Copyright (c) 2003-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef ESOCK_PARAMS_H
17 #define ESOCK_PARAMS_H
22 #include <comms-infras/metadata.h>
25 class TConnAPPref : public Meta::SMetaDataECom
27 Connection preference to specify an access point to start.
29 However, this preference cannot be used with RConnection::Start as a TConnPref. It
30 must be part of a TConnPrefList.
32 TConnAPPref can be added to the list to chose the top level access point. For the
33 KAfInet tier this type behaves in the same way as TConnSnapPref.
35 It is recommended that at most one TConnAPPref from each tier is added to the
38 If no TConnAPPref is specified, then the default access point for the KAfInet
39 tier will be used for selection.
43 @see RConnection::Start
50 inline static TConnAPPref* NewL();
51 inline static TConnAPPref* NewL(TUint aAP);
59 inline void SetAP(TUint aAP);
69 class TConnAutoStartPref : public Meta::SMetaDataECom
70 /** The connection preference requires that the connection waits until its selected access point is available
71 before starting. The start request does not complete until the connection is fully up.
73 Without this preference(e.g in the TConnPrefList), if the selected access point is unavailable due to contention or
74 lack of coverage, the RConnection::Start is errored immediately.
76 TConnAutoStartPref does not aid access point selection. When specified without any other preference in the
77 TConnPrefList, the default access point in the KAfInet tier will be selected.
81 User::LeaveIfError(conn.Open(sockSvr));
82 CleanupClosePushL(conn);
84 TConnPrefList* prefs = TConnPrefList::NewL();
85 CleanupStack::PushL(prefs);
86 TConnAPPref* APPref = TConnAPPref::NewL(aPara->iAp);
87 CleanupStack::PushL(APPref);
88 TConnAutoStartPref autoPref = TConnAutoStartPref::NewL();
89 CleanupStack::PushL(autoPref);
91 prefs->AppendL(autoPref);
92 prefs->AppendL(APPref);
94 error = conn.Start(pref);
97 @see RConnection::Start
105 inline static TConnAutoStartPref* NewL();
117 #include <comms-infras/esock_params.inl>
119 class CESockParamaterFactory : public CBase
120 /** Connection generic parameter set factory.
126 static Meta::SMetaDataECom* NewL(TAny* aConstructionParameters);