|
1 /** |
|
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file CSelectionRequest.h |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #if !defined (__CSELECTIONREQUEST_H__) |
|
26 #define __CSELECTIONREQUEST_H__ |
|
27 |
|
28 #include "CNetConRequestBase.h" |
|
29 #include <commdbconnpref.h> |
|
30 #include <comms-infras/nifif.h> |
|
31 |
|
32 NONSHARABLE_CLASS(CSelectionRequest) : public CNetConRequestBase |
|
33 /** |
|
34 The class controls the selection of connection settings such as Modem, Location and IAP. |
|
35 |
|
36 @internalComponent |
|
37 */ |
|
38 { |
|
39 public: |
|
40 static CSelectionRequest* NewL(MNetConEnv* aController, MNetworkControllerObserver* aObserver, TConnStartType aStartType, const TConnPref& aPrefs, TInt aConnectionAttempt, TInt aLastConnectionError); |
|
41 virtual ~CSelectionRequest(); |
|
42 |
|
43 /** start processing this request */ |
|
44 virtual void StartRequest(); |
|
45 |
|
46 /** force premature completion of a request with a given error */ |
|
47 virtual void RequestComplete(TInt aError); |
|
48 |
|
49 /** bearer availability */ |
|
50 virtual void SetAvailableBearers(TUint32 aBearerSet); |
|
51 |
|
52 /** override part of the MDialogProcessorObserver interface */ |
|
53 virtual void MDPOSelectComplete(TInt aError, const TConnectionSettings& aSettings); |
|
54 |
|
55 /** override part of the MDialogProcessorObserver interface */ |
|
56 virtual void MDPOWarnComplete(TInt aError, TBool aResponse); |
|
57 |
|
58 // accessors |
|
59 const TDesC& AgentName() const; |
|
60 const TPckgBuf<TSoIfConnectionInfo>& AgentConnectionInfo() const; |
|
61 const TConnStartType& ConnectionStartType() const; |
|
62 TUint32 ConnectionAttempt() const; |
|
63 const TConnPref& ConnPrefs() const; |
|
64 |
|
65 private: |
|
66 CSelectionRequest(MNetConEnv* aController, MNetworkControllerObserver* aObserver, TConnStartType aDirection, const TConnPref& aPrefs, TInt aConnectionAttempt, TInt aLastConnectionError); |
|
67 void ConstructL(); |
|
68 |
|
69 void StartSelectL(); |
|
70 CStoreableOverrideSettings* MapPrefsToOverridesL(TCommDbConnPref& aPrefs, const TConnectionSettings& aSettings); |
|
71 void SelectIAPCompleteL(const TConnectionSettings& aSettings); |
|
72 void CheckBearerAvailabilityL(); |
|
73 TBool ServiceAvailableInAlternateMode(TUint32& aBearerSet, const TUint32 aAvailableBearerSet); |
|
74 void SelectIapL(const TBool aSelectedServiceAvailable, const TUint32 aAvailableBearerSet); |
|
75 void SelectAgentL(); |
|
76 void SetAgentNameL(const TDesC& aName); |
|
77 TInt ExtractCommDbConnPref(const TConnPref& aBasePref, TCommDbConnPref& aCommDbPref); |
|
78 |
|
79 private: |
|
80 TConnStartType iConnStartType; |
|
81 TConnPref iConnPrefs; |
|
82 TInt iConnectionAttempt; |
|
83 TInt iLastConnectionError; |
|
84 HBufC* iAgentName; |
|
85 TPckgBuf<TSoIfConnectionInfo> iAgentConnInfo; |
|
86 TBool iDoBearerAvailability; |
|
87 }; |
|
88 |
|
89 #endif // __CSELECTIONREQUEST_H__ |
|
90 |