|
1 // Copyright (c) 2002-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #if !defined (__CSELECTIONREQUEST_H__) |
|
17 #define __CSELECTIONREQUEST_H__ |
|
18 |
|
19 #include "CNetConRequestBase.h" |
|
20 #include <commdbconnpref.h> |
|
21 #include <comms-infras/nifif.h> |
|
22 |
|
23 class CSelectionRequest : public CNetConRequestBase |
|
24 { |
|
25 public: |
|
26 static CSelectionRequest* NewL(MNetConEnv* aController, MNetworkControllerObserver* aObserver, TConnStartType aConnStartType, const TConnPref& aPrefs, TInt aConnectionAttempt, TInt aLastConnectionError); |
|
27 virtual ~CSelectionRequest(); |
|
28 |
|
29 // start processing this request |
|
30 virtual void StartRequest(); |
|
31 |
|
32 // force premature completion of a request with a given error |
|
33 virtual void RequestComplete(TInt aError); |
|
34 |
|
35 // cancel this request |
|
36 virtual void CancelRequest(); |
|
37 |
|
38 // bearer availability |
|
39 virtual void SetAvailableBearers(TUint32 aBearerSet); |
|
40 |
|
41 // accessors |
|
42 const TDesC& AgentName() const; |
|
43 const TPckgBuf<TSoIfConnectionInfo>& AgentConnectionInfo() const; |
|
44 const TConnStartType& ConnectionStartType() const; |
|
45 const TConnPref& ConnPrefs() const; |
|
46 |
|
47 private: |
|
48 CSelectionRequest(MNetConEnv* aController, MNetworkControllerObserver* aObserver, TConnStartType aConnStartType, const TConnPref& aPrefs, TInt aConnectionAttempt, TInt aLastConnectionError); |
|
49 void ConstructL(); |
|
50 |
|
51 static TInt AsyncCb(TAny* aThisPtr); |
|
52 void AsyncCbComplete(); |
|
53 |
|
54 private: |
|
55 TConnStartType iConnStartType; |
|
56 TConnPref iConnPrefs; |
|
57 TInt iConnectionAttempt; |
|
58 TInt iLastConnectionError; |
|
59 TPckgBuf<TSoIfConnectionInfo> iAgentConnInfo; |
|
60 CAsyncCallBack* iAsyncCb; |
|
61 }; |
|
62 |
|
63 #endif // __CSELECTIONREQUEST_H__ |
|
64 |