|
1 /* |
|
2 * Copyright (c) 2004 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: UI control context implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CCNUIUICONTROLCONTEXT_H |
|
19 #define __CCNUIUICONTROLCONTEXT_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CCnUiBaseControlContext.h" |
|
23 #include "MCnUiUiControlContext.h" |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CIMPSSAPSettingsStore; |
|
28 class CIMPSSAPSettings; |
|
29 class CCnUiOpContext; |
|
30 class CCnUiSapStoreProxy; |
|
31 class CCnUiConnModeRewaker; |
|
32 class CCnUiCntrlStepDriver; |
|
33 class MCnUiClientPluginAdv; |
|
34 class MCnUiSignaller; |
|
35 class MCnUiConnModeHandler; |
|
36 class MCnUiConnectionHandler; |
|
37 class MCnUiUiFacade; |
|
38 class MCnUiUiFacade; |
|
39 class MIMPSConnProcessUi; |
|
40 class MIMPSConnProcessObserver; |
|
41 class TProcessObserverProxy; |
|
42 class CPEngNWSessionSlotID2; |
|
43 |
|
44 // CLASS DECLARATION |
|
45 /** |
|
46 * UI control context implementation. |
|
47 * |
|
48 * Extends CCnUiBaseControlContext by offering |
|
49 * UI level features. |
|
50 * |
|
51 * @since 2.1 |
|
52 */ |
|
53 NONSHARABLE_CLASS( CCnUiUiControlContext ) : public CCnUiBaseControlContext, |
|
54 public MCnUiUiControlContext |
|
55 { |
|
56 public: // Two-phased constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 * |
|
61 * @param aClient The connection client. |
|
62 * @param aSapStoreProxy SAP store proxy to use. |
|
63 * @param aAAModeReWaker The AA mode rewaker to use. |
|
64 * @param aConnHandler Connection handler to use. |
|
65 * @param aObserver Process observer to notify. Can be NULL. |
|
66 */ |
|
67 static CCnUiUiControlContext* NewLC( TIMPSConnectionClient aClient, |
|
68 CCnUiSapStoreProxy& aSapStoreProxy, |
|
69 MCnUiConnModeRewaker& aConnModeRewaker, |
|
70 MCnUiConnectionHandler& aConnHandler, |
|
71 MIMPSConnProcessObserver* aObserver ); |
|
72 |
|
73 /** |
|
74 * Destructor. |
|
75 */ |
|
76 ~CCnUiUiControlContext(); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ constructor. |
|
82 */ |
|
83 CCnUiUiControlContext( TIMPSConnectionClient aClient, |
|
84 CCnUiSapStoreProxy& aSapStoreProxy, |
|
85 MCnUiConnModeRewaker& aConnModeRewaker, |
|
86 MCnUiConnectionHandler& aConnHandler ); |
|
87 |
|
88 /** |
|
89 * Symbian OS constructor. |
|
90 */ |
|
91 void ConstructL( MIMPSConnProcessObserver* aObserver ); |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 public: // New methods |
|
97 |
|
98 /** |
|
99 * Performs login for in construction |
|
100 * given client. |
|
101 * |
|
102 * @since 2.1 |
|
103 * @param aLoginType The login type. |
|
104 * @return Login status code. |
|
105 */ |
|
106 TInt DoLoginL( TIMPSLoginType aLoginType, CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
107 CIMPSSAPSettings* aSap = NULL |
|
108 , TBool aLastLoginSap = EFalse ); |
|
109 |
|
110 |
|
111 /** |
|
112 * Performs logout for in construction |
|
113 * given client. |
|
114 * |
|
115 * @since 2.1 |
|
116 * @return Logout status code. |
|
117 */ |
|
118 TInt DoLogoutL( const CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
119 |
|
120 |
|
121 /** |
|
122 * Handles application exit according the |
|
123 * given exit type parameter. |
|
124 * |
|
125 * @since 2.1 |
|
126 * @return Disconnect status code. |
|
127 */ |
|
128 TInt DoHandleApplicationExitL( TIMPSExitType aExitType, |
|
129 const CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
130 |
|
131 |
|
132 |
|
133 public: // New methods from MCnUiUiControlContext |
|
134 |
|
135 |
|
136 /** |
|
137 * From MCnUiUiControlContext |
|
138 * @see MCnUiUiControlContext |
|
139 * @since 2.1 |
|
140 */ |
|
141 MCnUiUiFacade& Ui(); |
|
142 |
|
143 /** |
|
144 * From MCnUiUiControlContext |
|
145 * @see MCnUiUiControlContext |
|
146 * @since 2.1 |
|
147 */ |
|
148 MCnUiConnProcessObserverProxy& ProcessObserverProxy(); |
|
149 |
|
150 |
|
151 /** |
|
152 * From MCnUiUiControlContext |
|
153 * @see MCnUiUiControlContext |
|
154 * @since 2.1 |
|
155 */ |
|
156 MCnUiConnModeRewaker& ConnModeRewaker(); |
|
157 |
|
158 |
|
159 /** |
|
160 * From MCnUiUiControlContext |
|
161 * @see MCnUiUiControlContext |
|
162 * @since 2.1 |
|
163 */ |
|
164 TInt SubOpDisconnectAllL( CIMPSSAPSettings& aDisconnectedSap, |
|
165 RArray< TIMPSConnectionClient >& aDisconnectedClients, |
|
166 const CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
167 |
|
168 |
|
169 /** |
|
170 * From MCnUiUiControlContext |
|
171 * @see MCnUiUiControlContext |
|
172 * @since 2.1 |
|
173 */ |
|
174 TInt SubOpReconnectAllL( CIMPSSAPSettings& aReconnectedSap, |
|
175 CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
176 |
|
177 public: //Methods from MCnUiBaseControlContext |
|
178 |
|
179 /** |
|
180 * From MCnUiBaseControlContext |
|
181 * |
|
182 * Forwards request to CCnUiBaseControlContext |
|
183 * base class. |
|
184 * |
|
185 * @see MCnUiBaseControlContext |
|
186 * @since 2.1 |
|
187 */ |
|
188 MCnUiConnectionHandler& ConnHandler(); |
|
189 |
|
190 |
|
191 /** |
|
192 * From MCnUiBaseControlContext |
|
193 * |
|
194 * Forwards request to CCnUiBaseControlContext |
|
195 * base class. |
|
196 * |
|
197 * @see MCnUiBaseControlContext |
|
198 * @since 2.1 |
|
199 */ |
|
200 MCnUiSignaller& Signaller(); |
|
201 |
|
202 |
|
203 /** |
|
204 * From MCnUiBaseControlContext |
|
205 * |
|
206 * Forwards request to CCnUiBaseControlContext |
|
207 * base class. |
|
208 * |
|
209 * @see MCnUiBaseControlContext |
|
210 * @since 2.1 |
|
211 */ |
|
212 MCnUiConnModeHandler& ConnModeHandler(); |
|
213 |
|
214 |
|
215 /** |
|
216 * From MCnUiBaseControlContext |
|
217 * |
|
218 * Forwards request to CCnUiBaseControlContext |
|
219 * base class. |
|
220 * |
|
221 * @see MCnUiBaseControlContext |
|
222 * @since 2.1 |
|
223 */ |
|
224 TIMPSConnectionClient ControlledClient(); |
|
225 |
|
226 |
|
227 /** |
|
228 * From MCnUiBaseControlContext |
|
229 * |
|
230 * Forwards request to CCnUiBaseControlContext |
|
231 * base class. |
|
232 * |
|
233 * @see MCnUiBaseControlContext |
|
234 * @since 2.1 |
|
235 */ |
|
236 CIMPSSAPSettingsStore& SapStoreL(); |
|
237 |
|
238 |
|
239 /** |
|
240 * From MCnUiBaseControlContext |
|
241 * |
|
242 * Forwards request to CCnUiBaseControlContext |
|
243 * base class. |
|
244 * |
|
245 * @see MCnUiBaseControlContext |
|
246 * @since 2.1 |
|
247 */ |
|
248 MCnUiClientPlugin& ClientPluginL( TIMPSConnectionClient aClient, |
|
249 CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
250 TBool aRefreshPlugin = EFalse ); |
|
251 |
|
252 |
|
253 /** |
|
254 * From MCnUiBaseControlContext |
|
255 * |
|
256 * Forwards request to CCnUiBaseControlContext |
|
257 * base class. |
|
258 * |
|
259 * @see MCnUiBaseControlContext |
|
260 * @since 2.1 |
|
261 */ |
|
262 MCnUiGlobalNotificationUiFacade& GlobalNotificationUiL(); |
|
263 |
|
264 /** |
|
265 * Gets the active network session slot id |
|
266 * @param aClient the client type |
|
267 * @since 3.0 |
|
268 */ |
|
269 CPEngNWSessionSlotID2* GetActiveNWSessionSlotIDL( |
|
270 TIMPSConnectionClient /*aClient*/ ) { |
|
271 return NULL; |
|
272 }; |
|
273 |
|
274 public: // Other new functions |
|
275 |
|
276 /** |
|
277 * Displays a list query for selecting a domain ("@domain.com" etc.) |
|
278 * @param aSelectedDomain Here is copied the domain user selected. |
|
279 * @param aSap Current SAP settings, previously selected domain is |
|
280 * stored per SAP. |
|
281 * @return If user cancelled the query return 0, |
|
282 * otherwise the dialog dismiss key code |
|
283 * @since 3.1u |
|
284 */ |
|
285 static TInt DisplayDomainSelectionQueryL( TDes& aSelectedDomain, |
|
286 CIMPSSAPSettings* aSap ); |
|
287 |
|
288 private: //Local helpers |
|
289 |
|
290 |
|
291 /** |
|
292 * Private helper method to execute driver |
|
293 * |
|
294 * @since 2.1 |
|
295 * @param aDriver |
|
296 * @param aPopAndDestroyCount How many objects to |
|
297 * PopAndDestroy() after driver execution. |
|
298 @ return Return value from driver execution. |
|
299 */ |
|
300 TInt ExecuteDriverInUiLX( CCnUiCntrlStepDriver& aDriver, TInt aPopAndDestroyCount ); |
|
301 |
|
302 |
|
303 /** |
|
304 * Reads integer resource value from resources |
|
305 * @param aResourceId resource id which is read |
|
306 * @return value of wanted integer resource flag |
|
307 */ |
|
308 TInt IntResourceValueL( TInt aResourceId ); |
|
309 |
|
310 |
|
311 private: //Data |
|
312 |
|
313 //NOTE!! control context may not share operation data objects |
|
314 //as member variables between individual operations, |
|
315 //because this would mess up things in operation nesting... |
|
316 |
|
317 ///<Ui facade, owned |
|
318 MCnUiUiFacade* iUi; |
|
319 |
|
320 |
|
321 ///<Process observer proxy, owned |
|
322 TProcessObserverProxy* iProcessObserverProxy; |
|
323 |
|
324 |
|
325 ///<The conn mode rewaker to use, not owned |
|
326 MCnUiConnModeRewaker& iConnModeRewaker; |
|
327 |
|
328 }; |
|
329 |
|
330 #endif //__CCNUIUICONTROLCONTEXT_H |
|
331 // End of File |
|
332 |
|
333 |