author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:20:32 +0300 | |
branch | RCL_3 |
changeset 33 | 2989b291cac7 |
parent 28 | d38647835c2e |
permissions | -rw-r--r-- |
28 | 1 |
/* |
2 |
* Copyright (c) 2008-2010 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: Actual notifier class implementation. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_CCHUINOTIFIERIMPL_H |
|
20 |
#define C_CCHUINOTIFIERIMPL_H |
|
21 |
||
22 |
#include <cchuiobserver.h> // for dialog types |
|
23 |
#include <AknQueryDialog.h> |
|
24 |
||
25 |
#include "cchuinotifier.h" // Base class |
|
26 |
#include "cchuicommon.hrh" |
|
27 |
#include "cchuicallstateobserver.h" |
|
28 |
||
29 |
class CCchUiPluginBrandingHandler; |
|
30 |
class CCchUiCallStateListener; |
|
31 |
||
32 |
/** |
|
33 |
* Implementation class for notifier. |
|
34 |
* Implements specific notifier, extends base class functionality. |
|
35 |
* |
|
36 |
* @code |
|
37 |
* @endcode |
|
38 |
* |
|
39 |
* @lib cchuinotif.lib |
|
40 |
* @since S60 5.0 |
|
41 |
*/ |
|
42 |
NONSHARABLE_CLASS( CCCHUiNotifierImpl ): public CCCHUiNotifierBase, |
|
33
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
43 |
public MCchUiCallStateObserver |
28 | 44 |
{ |
45 |
public: |
|
46 |
||
47 |
static CCCHUiNotifierImpl* NewL(); |
|
48 |
||
49 |
/** |
|
50 |
* Destructor. |
|
51 |
*/ |
|
52 |
virtual ~CCCHUiNotifierImpl(); |
|
53 |
||
54 |
protected: |
|
55 |
||
56 |
/** |
|
57 |
* From MEikSrvNotifierBase2. |
|
58 |
* The notifier has been deactivated |
|
59 |
* so resources can be freed and outstanding messages completed. |
|
60 |
*/ |
|
61 |
void Cancel(); |
|
62 |
||
63 |
private: |
|
64 |
||
65 |
CCCHUiNotifierImpl(); |
|
66 |
||
67 |
void ConstructL(); |
|
68 |
||
69 |
/** |
|
70 |
* Shows username/password query. |
|
71 |
* |
|
72 |
* @since S60 5.0 |
|
73 |
* @param aReplySlot Reply slot. |
|
74 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
75 |
* @param aServiceId Service id to which this note related to. |
|
76 |
* @param aUserName service username. |
|
77 |
*/ |
|
78 |
void ShowUsernamePasswordQueryL( |
|
79 |
TInt aReplySlot, |
|
80 |
const RMessagePtr2& aMessage, |
|
81 |
TUint aServiceId, |
|
82 |
const TDesC& aUserName ); |
|
83 |
||
84 |
/** |
|
85 |
* Shows no connections available query |
|
86 |
* |
|
87 |
* @since S60 5.0 |
|
88 |
* @param aReplySlot Reply slot. |
|
89 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
90 |
* @param aServiceId Service id to which this note related to. |
|
91 |
* @param aNoConnectionsDefined If ETrue, no connections defined query |
|
92 |
* is used |
|
93 |
*/ |
|
94 |
void ShowNoConnectionsQueryL( |
|
95 |
TInt aReplySlot, |
|
96 |
const RMessagePtr2& aMessage, |
|
97 |
TUint aServiceId, |
|
98 |
TBool aNoConnectionsDefined ); |
|
99 |
||
100 |
/** |
|
101 |
* Shows change connection query. |
|
102 |
* |
|
103 |
* @since S60 5.0 |
|
104 |
* @param aReplySlot Reply slot. |
|
105 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
106 |
* @param aServiceId Service id to which this note related to. |
|
107 |
* @param aIapid iap id of currently used connection |
|
108 |
*/ |
|
109 |
void ShowChangeConnectionQueryL( |
|
110 |
TInt aReplySlot, |
|
111 |
const RMessagePtr2& aMessage, |
|
112 |
TUint aServiceId, |
|
113 |
TInt aIapid ); |
|
114 |
||
115 |
/** |
|
116 |
* Shows defective settings info note. |
|
117 |
* |
|
118 |
* @since S60 5.0 |
|
119 |
* @param aReplySlot Reply slot. |
|
120 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
121 |
* @param aServiceId Service id to which this note related to. |
|
122 |
*/ |
|
123 |
void ShowDefectiveSettingsL( |
|
124 |
TInt aReplySlot, |
|
125 |
const RMessagePtr2& aMessage, |
|
126 |
TUint aServiceId ); |
|
127 |
||
128 |
/** |
|
129 |
* Shows error in connection info note. |
|
130 |
* |
|
131 |
* @since S60 5.0 |
|
132 |
* @param aReplySlot Reply slot. |
|
133 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
134 |
* @param aServiceId Service id to which this note related to. |
|
135 |
*/ |
|
136 |
void ShowErrorInConnectionNoteL( |
|
137 |
TInt aReplySlot, |
|
138 |
const RMessagePtr2& aMessage, |
|
139 |
TUint aServiceId ); |
|
140 |
||
141 |
/** |
|
142 |
* Shows invalid username/password note. |
|
143 |
* |
|
144 |
* @since S60 5.0 |
|
145 |
* @param aReplySlot Reply slot. |
|
146 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
147 |
* @param aServiceId Service id to which this note related to. |
|
148 |
*/ |
|
149 |
void ShowInvalidUsernamePasswordNoteL( |
|
150 |
TInt aReplySlot, |
|
151 |
const RMessagePtr2& aMessage, |
|
152 |
TUint aServiceId ); |
|
153 |
||
154 |
/** |
|
155 |
* Shows confirmation note to change connection. |
|
156 |
* |
|
157 |
* @since S60 5.0 |
|
158 |
* @param aReplySlot Reply slot. |
|
159 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
160 |
* @param aServiceId Service id to which this note related to. |
|
161 |
* @param aIapid iap id of currently used connection. |
|
162 |
*/ |
|
163 |
void ShowConfirmChangeConnectionL( |
|
164 |
TInt aReplySlot, |
|
165 |
const RMessagePtr2& aMessage, |
|
166 |
TUint aServiceId, |
|
167 |
TInt aIapid ); |
|
168 |
||
169 |
/** |
|
170 |
* Return a handle to CCchUiPluginBrandingHandler. |
|
171 |
* |
|
172 |
* @since S60 5.0 |
|
173 |
* @return A handler to CCchUiPluginBrandingHandler. |
|
174 |
*/ |
|
175 |
CCchUiPluginBrandingHandler& BrandingHandlerL(); |
|
176 |
||
177 |
/** |
|
178 |
* Fills list items for no connections available query. aListItems will |
|
179 |
* contain shown items as text, aCommandArray will contain the corresponding |
|
180 |
* commands. When query is dismissed, item selection can be mapped to command |
|
181 |
* in aCommandArray. |
|
182 |
* |
|
183 |
* @since S60 5.0 |
|
184 |
* @param aListItems array for list items |
|
185 |
* @param aCommandArray array for commands |
|
186 |
* @param aServiceId service id |
|
187 |
*/ |
|
188 |
void FillNoConnectionsAvailableListboxL( |
|
189 |
CDesCArray& aListItems, |
|
190 |
RArray<TCchUiOperationCommand>& aCommandArray, |
|
191 |
TUint aServiceId ); |
|
192 |
||
193 |
/** |
|
194 |
* Fills list items for no connections defined query. aListItems will |
|
195 |
* contain shown items as text, aCommandArray will contain the corresponding |
|
196 |
* commands. When query is dismissed, item selection can be mapped to command |
|
197 |
* in aCommandArray. |
|
198 |
* |
|
199 |
* @since S60 5.0 |
|
200 |
* @param aListItems array for list items |
|
201 |
* @param aCommandArray array for commands |
|
202 |
*/ |
|
203 |
void FillNoConnectionsDefinedListboxL( |
|
204 |
CDesCArray& aListItems, |
|
205 |
RArray<TCchUiOperationCommand>& aCommandArray ); |
|
206 |
||
207 |
/** |
|
208 |
* Fills list items for no connections are found query. aListItems will |
|
209 |
* contain shown items as text, aCommandArray will contain the corresponding |
|
210 |
* commands. When query is dismissed, item selection can be mapped to command |
|
211 |
* in aCommandArray. |
|
212 |
* |
|
213 |
* @since S60 5.0 |
|
214 |
* @param aListItems array for list items |
|
215 |
* @param aCommandArray array for commands |
|
216 |
*/ |
|
217 |
void FillNoConnectionsFoundListboxL( |
|
218 |
CDesCArray& aListItems, |
|
219 |
RArray<TCchUiOperationCommand>& aCommandArray ); |
|
220 |
||
221 |
/** |
|
222 |
* Fills list items for change current connection query. aListItems will |
|
223 |
* contain shown items as text, aCommandArray will contain the corresponding |
|
224 |
* commands. When query is dismissed, item selection can be mapped to command |
|
225 |
* in aCommandArray. |
|
226 |
* |
|
227 |
* @since S60 5.0 |
|
228 |
* @param aListItems array for list items |
|
229 |
* @param aCommandArray array for commands |
|
230 |
*/ |
|
231 |
void FillChangeCurrentConnectionListboxL( |
|
232 |
CDesCArray& aListItems, |
|
233 |
RArray<TCchUiOperationCommand>& aCommandArray ); |
|
234 |
||
235 |
/** |
|
236 |
* Fills list items for change connection query. aListItems will |
|
237 |
* contain shown items as text, aCommandArray will contain the corresponding |
|
238 |
* commands. When query is dismissed, item selection can be mapped to command |
|
239 |
* in aCommandArray. |
|
240 |
* |
|
241 |
* @since S60 5.0 |
|
242 |
* @param aListItems array for list items |
|
243 |
* @param aCommandArray array for commands |
|
244 |
*/ |
|
245 |
void FillChangeConnectionListboxL( |
|
246 |
CDesCArray& aListItems, |
|
247 |
RArray<TCchUiOperationCommand>& aCommandArray ); |
|
248 |
||
249 |
/** |
|
250 |
* Shows custom GPRS access point selection. User can select GPRS access |
|
251 |
* point from list which is formed from access points in Internet SNAP. |
|
252 |
* |
|
253 |
* @since S60 5.0 |
|
254 |
* @param aServiceId, service id |
|
255 |
* @return Error code. |
|
256 |
*/ |
|
257 |
TInt ShowGprsSelectionL( TUint aServiceId ); |
|
258 |
||
259 |
/** |
|
260 |
* Returns ETrue if VoIP over WCDMA is allowed. |
|
261 |
* |
|
262 |
* @since S60 5.0 |
|
263 |
* @return ETrue if allowed. |
|
264 |
*/ |
|
265 |
TBool IsVoIPOverWCDMAAllowedL(); |
|
266 |
||
267 |
/** |
|
268 |
* Returns ETrue if current service SNAP is missing gprs accespoints |
|
269 |
* which are set to the internet SNAP. |
|
270 |
* |
|
271 |
* @since S60 9.2 |
|
272 |
* @return ETrue if the internet snap has gprs connection |
|
273 |
* which are not in the services snap. |
|
274 |
*/ |
|
275 |
TBool IsServiceSnapMissingInternetGprsApsL() const; |
|
276 |
||
277 |
/** |
|
278 |
* Returns internet GPRS IAP's informations which are not |
|
279 |
* in the current service snap. |
|
280 |
* |
|
281 |
* @since S60 9.2 |
|
282 |
* @param aIaps Iap names in return. |
|
283 |
* @param aIapIds IapIds in return. |
|
284 |
* @return internet SNAP ID. |
|
285 |
*/ |
|
286 |
TUint32 InternetGprsApsMissingFromServiceSnapL( |
|
287 |
CDesCArray& aIaps, RArray<TUint32>& aIapIds ) const; |
|
288 |
||
289 |
// from base class CCCHUiNotifierBase |
|
290 |
||
291 |
/** |
|
292 |
* From CCCHUiNotifierBase. |
|
293 |
* Called when a notifier is first loaded. |
|
294 |
* |
|
295 |
* @since S60 5.0 |
|
296 |
* @return A structure containing priority and channel info. |
|
297 |
*/ |
|
298 |
TNotifierInfo RegisterL(); |
|
299 |
||
300 |
/** |
|
301 |
* From CCCHUiNotifierBase. |
|
302 |
* Updates a currently active notifier. |
|
303 |
* |
|
304 |
* @since S60 5.0 |
|
305 |
* @param aBuffer The updated data. |
|
306 |
* @return A pointer to return value. |
|
307 |
*/ |
|
308 |
TPtrC8 UpdateL( const TDesC8& aBuffer ); |
|
309 |
||
310 |
/** |
|
311 |
* From CCCHUiNotifierBase. |
|
312 |
* Used in asynchronous notifier launch to |
|
313 |
* store received parameters into members variables and |
|
314 |
* make needed initializations. |
|
315 |
* |
|
316 |
* @since S60 5.0 |
|
317 |
* @param aBuffer A buffer containing received parameters |
|
318 |
* @param aReplySlot Reply slot. |
|
319 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
320 |
*/ |
|
321 |
void StartL( |
|
322 |
const TDesC8& aBuffer, |
|
323 |
TInt aReplySlot, |
|
324 |
const RMessagePtr2& aMessage ); |
|
325 |
||
326 |
/** |
|
327 |
* From CActive |
|
328 |
*/ |
|
329 |
void RunL(); |
|
330 |
||
331 |
public: |
|
332 |
||
333 |
// from base class MCchUiCallStateObserver |
|
334 |
||
335 |
/** |
|
336 |
* From MCchUiCallStateObserver. |
|
337 |
* @see MCchUiCallStateObserver. |
|
338 |
*/ |
|
339 |
void CallStateChanged( TInt aCallState ); |
|
340 |
||
341 |
private: // data |
|
342 |
||
343 |
/** |
|
344 |
* Branding handler. Lifetime of this pointer must be the same as |
|
345 |
* for icons fetched using it. |
|
346 |
* Own. |
|
347 |
*/ |
|
348 |
CCchUiPluginBrandingHandler* iBrandingHandler; |
|
349 |
||
350 |
/** |
|
351 |
* Result parameters. |
|
352 |
*/ |
|
353 |
TCCHUiNotifierParams iResultParams; |
|
354 |
||
355 |
/** |
|
356 |
* Handle to created CAknListQueryDialog. |
|
357 |
* Own. |
|
358 |
*/ |
|
359 |
CAknListQueryDialog* iListQueryDialog; |
|
360 |
||
361 |
/** |
|
362 |
* Listener for call state changes. |
|
363 |
* Own. |
|
364 |
*/ |
|
365 |
CCchUiCallStateListener* iCallStateListener; |
|
366 |
||
367 |
/** |
|
368 |
* Service ID. |
|
369 |
*/ |
|
370 |
TUint iServiceId; |
|
371 |
||
372 |
/** |
|
373 |
* Current connection IAP ID. |
|
374 |
*/ |
|
375 |
TUint iCurrentConnectionIapId; |
|
376 |
||
377 |
CCHUI_UNIT_TEST( T_CchUiNotifierImpl ) |
|
378 |
}; |
|
379 |
||
380 |
#endif // C_CCHUINOTIFIERIMPL_H |