|
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: Basic control context. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CCNUIBASECONTROLCONTEXT_H |
|
19 #define __CCNUIBASECONTROLCONTEXT_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Base.h> |
|
23 #include "MCnUiBaseControlContext.h" |
|
24 |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CIMPSSAPSettingsStore; |
|
29 class CIMPSSAPSettings; |
|
30 class CCnUiOpContext; |
|
31 class CCnUiSapStoreProxy; |
|
32 class CCnUiCntrlStepDriver; |
|
33 class MCnUiClientPluginAdv; |
|
34 class MCnUiSignaller; |
|
35 class MCnUiConnectionHandler; |
|
36 class MCnUiConnModeHandler; |
|
37 class MCnUiGlobalNotificationUiFacade; |
|
38 class CPEngNWSessionSlotID2; |
|
39 class CPEngNWSessionSlot2; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 /** |
|
43 * Basic control context. |
|
44 * |
|
45 * @since 2.1 |
|
46 */ |
|
47 NONSHARABLE_CLASS( CCnUiBaseControlContext ) : public CBase, |
|
48 public MCnUiBaseControlContext |
|
49 { |
|
50 public: // Two-phased constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CCnUiBaseControlContext* NewLC( TIMPSConnectionClient aClient, |
|
56 CCnUiSapStoreProxy& aSapStoreProxy, |
|
57 MCnUiConnectionHandler& aConnHandler ); |
|
58 |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CCnUiBaseControlContext(); |
|
64 |
|
65 protected: //Protected constructors to allow derivation |
|
66 |
|
67 /** |
|
68 * C++ constructor. |
|
69 */ |
|
70 CCnUiBaseControlContext( TIMPSConnectionClient aClient, |
|
71 CCnUiSapStoreProxy& aSapStoreProxy, |
|
72 MCnUiConnectionHandler& aConnHandler ); |
|
73 |
|
74 /** |
|
75 * Symbian OS constructor. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 |
|
80 public: // New public methods |
|
81 |
|
82 /** |
|
83 * Executes the AA login operation. |
|
84 * |
|
85 * @param aShowDetailedError Should we show error note to user |
|
86 * in case an error occurs during login. |
|
87 * @return AA login status. |
|
88 * One of following: |
|
89 */ |
|
90 TInt DoAALoginL( TBool aShowDetailedError ); |
|
91 |
|
92 |
|
93 /** |
|
94 * Executes the AA logout operation. |
|
95 * |
|
96 * @param aIsScheduled Tells if this is a normal scheduled |
|
97 * scheduled logout (Need to ask confirmation from user) |
|
98 * @return AA login status. |
|
99 * One of following: |
|
100 */ |
|
101 TInt DoAALogoutL( TBool aIsScheduled ); |
|
102 |
|
103 |
|
104 |
|
105 protected: // New methods from MCnUiBaseControlContext |
|
106 |
|
107 /** |
|
108 * From MCnUiBaseControlContext |
|
109 * @see MCnUiBaseControlContext |
|
110 * @since 2.1 |
|
111 */ |
|
112 MCnUiConnectionHandler& ConnHandler(); |
|
113 |
|
114 |
|
115 /** |
|
116 * From MCnUiBaseControlContext |
|
117 * @see MCnUiBaseControlContext |
|
118 * @since 2.1 |
|
119 */ |
|
120 MCnUiSignaller& Signaller(); |
|
121 |
|
122 |
|
123 /** |
|
124 * From MCnUiBaseControlContext |
|
125 * @see MCnUiBaseControlContext |
|
126 * @since 2.1 |
|
127 */ |
|
128 MCnUiConnModeHandler& ConnModeHandler(); |
|
129 |
|
130 |
|
131 /** |
|
132 * From MCnUiBaseControlContext |
|
133 * @see MCnUiBaseControlContext |
|
134 * @since 2.1 |
|
135 */ |
|
136 TIMPSConnectionClient ControlledClient(); |
|
137 |
|
138 |
|
139 /** |
|
140 * From MCnUiBaseControlContext |
|
141 * @see MCnUiBaseControlContext |
|
142 * @since 2.1 |
|
143 */ |
|
144 CIMPSSAPSettingsStore& SapStoreL(); |
|
145 |
|
146 |
|
147 /** |
|
148 * From MCnUiBaseControlContext |
|
149 * @see MCnUiBaseControlContext |
|
150 * @since 2.1 |
|
151 */ |
|
152 MCnUiClientPlugin& ClientPluginL( TIMPSConnectionClient aClient, |
|
153 CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
154 TBool aRefreshPlugin = EFalse ); |
|
155 |
|
156 |
|
157 /** |
|
158 * From MCnUiBaseControlContext |
|
159 * @see MCnUiBaseControlContext |
|
160 * @since 2.1 |
|
161 */ |
|
162 MCnUiGlobalNotificationUiFacade& GlobalNotificationUiL(); |
|
163 |
|
164 /** |
|
165 * Gets the active network session slot id |
|
166 * @param aClient the client type |
|
167 * @since 3.0 |
|
168 */ |
|
169 CPEngNWSessionSlotID2* GetActiveNWSessionSlotIDL( TIMPSConnectionClient aClient ); |
|
170 |
|
171 private: |
|
172 |
|
173 /** |
|
174 * Calls ResetAndDestroy to given array |
|
175 * @since 3.0 |
|
176 * @param aObject Array (RPointerArray<CPEngNWSessionSlotID2>) |
|
177 */ |
|
178 static void DestroyCloseModelArray( TAny* aObject ); |
|
179 |
|
180 private: //Data |
|
181 |
|
182 //NOTE!! control context may not share operation data objects |
|
183 //as member variables between individual operations, |
|
184 //because this would mess up things in operation nesting... |
|
185 |
|
186 |
|
187 ///<Controlled client, owned |
|
188 TIMPSConnectionClient iControlledClient; |
|
189 |
|
190 ///<Proxy to access SAP Store, not owned |
|
191 CCnUiSapStoreProxy& iSapStoreProxy; |
|
192 |
|
193 ///<Connection handler, owned |
|
194 MCnUiConnectionHandler& iConnHandler; |
|
195 |
|
196 ///<Signaller, owned |
|
197 MCnUiSignaller* iSignaller; |
|
198 |
|
199 ///<Connection mode handler, owned |
|
200 MCnUiConnModeHandler* iConnModeHandler; |
|
201 |
|
202 ///<PEC Client plug-in, lazy initialized, owned |
|
203 MCnUiClientPlugin* iPluginPEC; |
|
204 |
|
205 ///<IM Client plug-in, lazy initialized, owned |
|
206 MCnUiClientPlugin* iPluginIM; |
|
207 |
|
208 ///<Global notification UI, lazy initialized, owned |
|
209 MCnUiGlobalNotificationUiFacade* iGNUI; |
|
210 |
|
211 // Owns: network session slot ID for Always online connections |
|
212 CPEngNWSessionSlotID2* iAASessionSlotID; |
|
213 |
|
214 // Owns: network session slot for Always online connections |
|
215 CPEngNWSessionSlot2* iAASessionSlot; |
|
216 }; |
|
217 |
|
218 #endif //__CCNUIBASECONTROLCONTEXT_H |
|
219 // End of File |
|
220 |
|
221 |