|
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 CNetConRequestBase.h |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #if !defined (__CNETCONREQUESTBASE_H__) |
|
26 #define __CNETCONREQUESTBASE_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <comms-infras/dialogprocessor.h> |
|
30 #include <comms-infras/dbaccess.h> |
|
31 |
|
32 class MNetConDialogProcAccess; |
|
33 class MCommsDbAccess; |
|
34 class MNetConEnv; |
|
35 class MNetworkControllerObserver; |
|
36 class MServiceChangeObserver; |
|
37 class CStoreableOverrideSettings; |
|
38 class CCommsDbAccess; |
|
39 |
|
40 class CNetConDlgProcessor; |
|
41 NONSHARABLE_CLASS(CNetConRequestBase) : public CBase, public MDialogProcessorObserver |
|
42 /** |
|
43 This class provides the functionality common to both selection and reconnection requests. |
|
44 |
|
45 @internalComponent |
|
46 */ |
|
47 { |
|
48 friend class CNetworkController; |
|
49 public: |
|
50 virtual ~CNetConRequestBase(); |
|
51 |
|
52 /** |
|
53 Start processing this request |
|
54 */ |
|
55 virtual void StartRequest() = 0; |
|
56 |
|
57 /** |
|
58 force premature completion of a request with a given error |
|
59 |
|
60 @param aError,error code for premature completion of request |
|
61 */ |
|
62 virtual void RequestComplete(TInt aError) = 0; |
|
63 /** |
|
64 Cancel processing this request |
|
65 */ |
|
66 virtual void CancelRequest(); |
|
67 |
|
68 /** |
|
69 Bearer availability |
|
70 |
|
71 @param aBearerSet, set of bearer available. |
|
72 */ |
|
73 virtual void SetAvailableBearers(TUint32 aBearerSet) = 0; |
|
74 |
|
75 /** |
|
76 Return a copy of the pointer to the CCommsDbAccess object allowing reading of CommDb |
|
77 @return CCommsDbAccess |
|
78 */ |
|
79 CCommsDbAccess* DbAccess(); |
|
80 |
|
81 CStoreableOverrideSettings* Overrides() const; |
|
82 MNetworkControllerObserver* Observer() const; |
|
83 |
|
84 protected: |
|
85 CNetConRequestBase(MNetConEnv* aController, MNetworkControllerObserver* aObserver, CStoreableOverrideSettings* aOverrides); |
|
86 void ConstructL(); |
|
87 |
|
88 TBool SelectedServiceAvailable(TUint32 aAvailableBearerSet) const; |
|
89 |
|
90 // implementation of Dialog Accessors |
|
91 void SelectConnection(const TConnectionPrefs& aPrefs); |
|
92 void SelectConnection(const TConnectionPrefs& aPrefs, TInt aLastError); |
|
93 void SelectModemAndLocation(); |
|
94 void WarnNewConnection(const TConnectionPrefs& aPrefs, const TDesC* aNewIapName, const TIspConnectionNames* aNewConnectionNames, TInt aLastError); |
|
95 void Reconnect(); |
|
96 |
|
97 private: |
|
98 TInt ConstructDialogProcessor(); |
|
99 |
|
100 protected: |
|
101 |
|
102 CCommsDbAccess* iDatabase; ///< Network controller database access |
|
103 |
|
104 MNetConEnv* const iController; ///< For upcalls from the requests |
|
105 MNetworkControllerObserver* const iObserver; ///< from a Network Controller towards NIFMAN |
|
106 CStoreableOverrideSettings* iOverrides; ///< CommDB overrides |
|
107 TConnectionSettings iSettings; ///< Connection settings of network controller towards nifman. |
|
108 TSglQueLink iLink; ///< link to next element in the queue |
|
109 MServiceChangeObserver* ipServiceChangeObserver; ///< Requests service change notification |
|
110 |
|
111 private: |
|
112 CNetConDlgProcessor *iDialogPrc; ///< Dialog processor access |
|
113 }; |
|
114 |
|
115 #endif // __CNETCONREQUESTBASE_H__ |
|
116 |