|
1 /* |
|
2 * Copyright (c) 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 the License "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 * sifnotification.h - Interfaces to publish (by installers) and get notified (for clients) to an SIF operation progress |
|
16 * |
|
17 */ |
|
18 |
|
19 /** |
|
20 @file |
|
21 @released |
|
22 @publishedPartner |
|
23 */ |
|
24 |
|
25 #ifndef __SIFNOTIFICATION_H__ |
|
26 #define __SIFNOTIFICATION_H__ |
|
27 |
|
28 #include <e32std.h> |
|
29 #include <e32base.h> |
|
30 #include <s32strm.h> |
|
31 #include <usif/usiferror.h> |
|
32 #include <e32property.h> |
|
33 |
|
34 namespace Usif |
|
35 { |
|
36 // Forward declaration. |
|
37 class CSifNotifierBase; |
|
38 class CDeleteKeyTimer; |
|
39 |
|
40 //Identifies the type of operation |
|
41 enum TSifOperationPhase |
|
42 { |
|
43 EInstalling = 1, |
|
44 EUninstalling, |
|
45 EUpgrading |
|
46 }; |
|
47 |
|
48 //Identifies a stage in type of operation |
|
49 enum TSifOperationSubPhase |
|
50 { |
|
51 ENoSubPhase = 1, |
|
52 EOCSPCheck, |
|
53 EDownload, |
|
54 EFileOperation |
|
55 }; |
|
56 |
|
57 enum TSifOperation |
|
58 { |
|
59 ESifOperationStart = 1, |
|
60 ESifOperationEnd |
|
61 }; |
|
62 |
|
63 |
|
64 /* |
|
65 * This contains the basic information of package going to be installed/uninstalled (provided at the start of the operation) |
|
66 */ |
|
67 NONSHARABLE_CLASS(CSifOperationStartData) : public CBase |
|
68 { |
|
69 public: |
|
70 /** |
|
71 Creates a CSifOperationStartData object from the stream. |
|
72 |
|
73 @param aStream The stream to read the CSifOperationStartData object from. |
|
74 @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful. |
|
75 */ |
|
76 IMPORT_C static CSifOperationStartData* NewL(RReadStream& aStream); |
|
77 |
|
78 /** |
|
79 Creates a CSifOperationStartData object. |
|
80 |
|
81 @deprecated Use the overload with aOperationPhase instead. |
|
82 |
|
83 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
84 @param aComponentName The name of the software component |
|
85 @param aApplicationNames The list of applications associated with the software component, an empty array in case of no applications |
|
86 @param aApplicationIcons The list of corresponding application icon names(without path) for every application, an empty array in case of no applications |
|
87 @param aComponentSize The total size of the component in bytes |
|
88 @param aIconPath The path where all application and component icons are found |
|
89 @param aComponentIcon The name of the component icon(without path) |
|
90 @param aSoftwareType The software type name of the software component |
|
91 |
|
92 @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful. |
|
93 */ |
|
94 IMPORT_C static CSifOperationStartData* NewL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames, |
|
95 const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, |
|
96 const TDesC& aSoftwareType); |
|
97 |
|
98 /** |
|
99 Creates a CSifOperationStartData object. |
|
100 |
|
101 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
102 @param aComponentName The name of the software component |
|
103 @param aApplicationNames The list of applications associated with the software component, an empty array in case of no applications |
|
104 @param aApplicationIcons The list of corresponding application icon names(without path) for every application, an empty array in case of no applications |
|
105 @param aComponentSize The total size of the component in bytes |
|
106 @param aIconPath The path where all application and component icons are found |
|
107 @param aComponentIcon The name of the component icon(without path) |
|
108 @param aSoftwareType The software type name of the software component |
|
109 @param aOperationPhase The type of SIF operation |
|
110 |
|
111 @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful. |
|
112 */ |
|
113 IMPORT_C static CSifOperationStartData* NewL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames, |
|
114 const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, |
|
115 const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase); |
|
116 |
|
117 /** |
|
118 Creates a CSifOperationStartData object. |
|
119 |
|
120 @deprecated Use the overload with aOperationPhase instead. |
|
121 |
|
122 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
123 @param aComponentName The name of the software component |
|
124 @param aApplicationNames The list of applications associated with the software component, an empty array in case of no applications |
|
125 @param aApplicationIcons The list of corresponding application icon names(without path) for every application, an empty array in case of no applications |
|
126 @param aComponentSize The total size of the component in bytes |
|
127 @param aIconPath The path where all application and component icons are found |
|
128 @param aComponentIcon The name of the component icon(without path) |
|
129 @param aSoftwareType The software type name of the software component |
|
130 |
|
131 @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful. |
|
132 The pointer is also put onto the cleanup stack. |
|
133 */ |
|
134 IMPORT_C static CSifOperationStartData* NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames, |
|
135 const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, |
|
136 const TDesC& aSoftwareType); |
|
137 |
|
138 |
|
139 /** |
|
140 Creates a CSifOperationStartData object. |
|
141 |
|
142 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
143 @param aComponentName The name of the software component |
|
144 @param aApplicationNames The list of applications associated with the software component, an empty array in case of no applications |
|
145 @param aApplicationIcons The list of corresponding application icon names(without path) for every application, an empty array in case of no applications |
|
146 @param aComponentSize The total size of the component in bytes |
|
147 @param aIconPath The path where all application and component icons are found |
|
148 @param aComponentIcon The name of the component icon(without path) |
|
149 @param aSoftwareType The software type name of the software component |
|
150 @param aOperationPhase The type of SIF operation |
|
151 |
|
152 @return A pointer to the newly allocated CSifOperationStartData object, if creation is successful. |
|
153 The pointer is also put onto the cleanup stack. |
|
154 */ |
|
155 IMPORT_C static CSifOperationStartData* NewLC(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames, |
|
156 const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, const TDesC& aComponentIcon, |
|
157 const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase); |
|
158 |
|
159 /** |
|
160 @return The global component Id associated with the operation. |
|
161 */ |
|
162 IMPORT_C const HBufC& GlobalComponentId() const; |
|
163 |
|
164 /** |
|
165 @return The component name associated with the operation. |
|
166 */ |
|
167 IMPORT_C const HBufC& ComponentName() const; |
|
168 |
|
169 /** |
|
170 @return An array of application names. |
|
171 */ |
|
172 IMPORT_C const RPointerArray<HBufC>& ApplicationNames() const; |
|
173 |
|
174 /** |
|
175 @return An array of application icons. |
|
176 */ |
|
177 IMPORT_C const RPointerArray<HBufC>& ApplicationIcons() const; |
|
178 |
|
179 /** |
|
180 @return The size of the component in bytes. |
|
181 */ |
|
182 IMPORT_C TInt ComponentSize() const; |
|
183 |
|
184 /** |
|
185 @return The path to the application icons. |
|
186 */ |
|
187 IMPORT_C const HBufC& IconPath() const; |
|
188 |
|
189 /** |
|
190 @return The icon associated with the component. |
|
191 */ |
|
192 IMPORT_C const HBufC& ComponentIcon() const; |
|
193 |
|
194 /** |
|
195 @return The software type associated with the operation. |
|
196 */ |
|
197 IMPORT_C const HBufC& SoftwareType() const; |
|
198 |
|
199 IMPORT_C ~CSifOperationStartData(); |
|
200 |
|
201 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
202 |
|
203 /** |
|
204 @return The type of SIF operation. |
|
205 */ |
|
206 IMPORT_C TSifOperationPhase OperationPhase() const; |
|
207 |
|
208 private: |
|
209 CSifOperationStartData(); |
|
210 void ConstructL(const TDesC& aGlobalComponentId, const TDesC& aComponentName, const RPointerArray<HBufC>& aApplicationNames, |
|
211 const RPointerArray<HBufC>& aApplicationIcons, TInt aComponentSize, const TDesC& aIconPath, |
|
212 const TDesC& aComponentIcon, const TDesC& aSoftwareType, TSifOperationPhase aOperationPhase); |
|
213 void InternalizeL(RReadStream& aStream); |
|
214 |
|
215 private: |
|
216 HBufC* iGlobalComponentId; |
|
217 HBufC* iComponentName; |
|
218 HBufC* iComponentIcon; |
|
219 RPointerArray<HBufC> iApplicationNames; |
|
220 RPointerArray<HBufC> iApplicationIcons; |
|
221 TInt iComponentSize; |
|
222 HBufC* iIconPath; |
|
223 HBufC* iSoftwareType; |
|
224 TSifOperation iOperationType; |
|
225 TSifOperationPhase iOperationPhase; |
|
226 }; |
|
227 |
|
228 |
|
229 /* |
|
230 * This contains the error status information after an install/uninstall operation |
|
231 */ |
|
232 NONSHARABLE_CLASS(CSifOperationEndData) : public CBase |
|
233 { |
|
234 public: |
|
235 /** |
|
236 Creates a CSifOperationEndData object from the stream. |
|
237 |
|
238 @param aStream The stream to read the CSifOperationEndData object from. |
|
239 @return A pointer to the newly allocated CSifOperationEndData object, if creation is successful. |
|
240 */ |
|
241 IMPORT_C static CSifOperationEndData* NewL(RReadStream& aStream); |
|
242 |
|
243 /** |
|
244 Creates a CSifOperationEndData object. |
|
245 |
|
246 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
247 @param aErrCategory A SIF error category |
|
248 @param aErrCode SIF plugin (or runtime) specific error code |
|
249 @param aErrMsg SIF plugin (or runtime) specific localized error message |
|
250 @param aErrMsgDetails SIF plugin (or runtime) specific localized message details |
|
251 |
|
252 @return A pointer to the newly allocated CSifOperationEndData object, if creation is successful. |
|
253 */ |
|
254 IMPORT_C static CSifOperationEndData* NewL(const TDesC& aGlobalComponentId, TErrorCategory aErrCategory, TInt aErrCode, const TDesC& aErrMsg, const TDesC& aErrMsgDetails); |
|
255 |
|
256 /** |
|
257 Creates a CSifOperationEndData object. |
|
258 |
|
259 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
260 @param aErrCategory A SIF error category |
|
261 @param aErrCode SIF plugin (or runtime) specific error code |
|
262 @param aErrMsg SIF plugin (or runtime) specific localized error message |
|
263 @param aErrMsgDetails SIF plugin (or runtime) specific localized message details |
|
264 |
|
265 @return A pointer to the newly allocated CSifOperationEndData object, if creation is successful. |
|
266 The pointer is also put onto the cleanup stack. |
|
267 */ |
|
268 IMPORT_C static CSifOperationEndData* NewLC(const TDesC& aGlobalComponentId, TErrorCategory aErrCategory, TInt aErrCode, const TDesC& aErrMsg, const TDesC& aErrMsgDetails); |
|
269 |
|
270 /** |
|
271 @return The global component Id associated with the operation. |
|
272 */ |
|
273 IMPORT_C const HBufC& GlobalComponentId() const; |
|
274 |
|
275 /** |
|
276 @return The category to which the error belongs. |
|
277 */ |
|
278 IMPORT_C TErrorCategory ErrorCategory() const; |
|
279 |
|
280 /** |
|
281 @return An error code associated with the operation. |
|
282 */ |
|
283 IMPORT_C TInt ErrorCode() const; |
|
284 |
|
285 /** |
|
286 @return An error message. |
|
287 */ |
|
288 IMPORT_C const HBufC& ErrorMessage() const; |
|
289 |
|
290 /** |
|
291 @return More details regarding the error message. |
|
292 */ |
|
293 IMPORT_C const HBufC& ErrorMessageDetails() const; |
|
294 |
|
295 IMPORT_C ~CSifOperationEndData(); |
|
296 |
|
297 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
298 |
|
299 private: |
|
300 CSifOperationEndData(); |
|
301 void ConstructL(const TDesC& aGlobalComponentID, TErrorCategory aErrCategory, TInt aErrCode, const TDesC& aErrMsg, const TDesC& aErrMsgDetails); |
|
302 void InternalizeL(RReadStream& aStream); |
|
303 |
|
304 private: |
|
305 HBufC* iGlobalComponentId; |
|
306 HBufC* iErrMsg; |
|
307 HBufC* iErrMsgDetails; |
|
308 TErrorCategory iErrCategory; |
|
309 TInt iErrCode; |
|
310 TSifOperation iOperationType; |
|
311 }; |
|
312 |
|
313 |
|
314 /* |
|
315 * This class provides the operation progress. |
|
316 */ |
|
317 NONSHARABLE_CLASS(CSifOperationProgressData) : public CBase |
|
318 { |
|
319 public: |
|
320 /** |
|
321 Creates a CSifOperationProgressData object from the stream. |
|
322 |
|
323 @param aStream The stream to read the CSifOperationProgressData object from. |
|
324 @return A pointer to the newly allocated CSifOperationProgressData object, if creation is successful. |
|
325 */ |
|
326 IMPORT_C static CSifOperationProgressData* NewL(RReadStream& aStream); |
|
327 |
|
328 /** |
|
329 Creates a CSifOperationProgressData object. |
|
330 |
|
331 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
332 @param aPhase The type of SIF operation |
|
333 @param aSubPhase The current stage in the type of SIF operation |
|
334 @param aCurrentProgress The amount of operation which is completed in current subphase |
|
335 @param aTotal The total amount of operation required by this subphase operation |
|
336 |
|
337 @return A pointer to the newly allocated CSifOperationProgressData object, if creation is successful. |
|
338 */ |
|
339 IMPORT_C static CSifOperationProgressData* NewL(const TDesC& aGlobalcomponentId, TSifOperationPhase aPhase, TSifOperationSubPhase aSubPhase, TInt aCurrentProgress, TInt aTotal); |
|
340 |
|
341 /** |
|
342 Creates a CSifOperationProgressData object. |
|
343 |
|
344 @param aGlobalComponentId The global component id which uniquely identifies the operation |
|
345 @param aPhase The type of SIF operation |
|
346 @param aSubPhase The current stage in the type of SIF operation |
|
347 @param aCurrentProgress The amount of operation which is completed in current subphase |
|
348 @param aTotal The total amount of operation required by this subphase operation |
|
349 |
|
350 @return A pointer to the newly allocated CSifOperationProgressData object, if creation is successful. |
|
351 The pointer is also put onto the cleanup stack. |
|
352 */ |
|
353 IMPORT_C static CSifOperationProgressData* NewLC(const TDesC& aGlobalcomponentId, TSifOperationPhase aPhase, TSifOperationSubPhase aSubPhase, TInt aCurrentProgress, TInt aTotal); |
|
354 |
|
355 /** |
|
356 @return The global component id associated with the operation. |
|
357 */ |
|
358 IMPORT_C const HBufC& GlobalComponentId() const; |
|
359 |
|
360 /** |
|
361 @return The current phase of operation. |
|
362 */ |
|
363 IMPORT_C TSifOperationPhase Phase() const; |
|
364 |
|
365 /** |
|
366 @return The current sub-phase of operation. |
|
367 */ |
|
368 IMPORT_C TSifOperationSubPhase SubPhase() const; |
|
369 |
|
370 /** |
|
371 @return The current progress value. |
|
372 |
|
373 @deprecated Use CurrentProgress() instead. |
|
374 */ |
|
375 IMPORT_C TInt CurrentProgess() const; |
|
376 |
|
377 /** |
|
378 @return The current progress value. |
|
379 */ |
|
380 IMPORT_C TInt CurrentProgress() const; |
|
381 |
|
382 /** |
|
383 @return The total value to achieve completion of the subphase. |
|
384 */ |
|
385 IMPORT_C TInt Total() const; |
|
386 |
|
387 IMPORT_C ~CSifOperationProgressData(); |
|
388 |
|
389 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
390 |
|
391 private: |
|
392 CSifOperationProgressData(); |
|
393 void ConstructL(const TDesC& aGlobalcomponentId, TSifOperationPhase aPhase, TSifOperationSubPhase aSubPhase, TInt aCurrentProgress, TInt aTotal); |
|
394 void InternalizeL(RReadStream& aStream); |
|
395 |
|
396 private: |
|
397 HBufC* iGlobalComponentId; |
|
398 TSifOperationPhase iPhase; |
|
399 TSifOperationSubPhase iSubPhase; |
|
400 TInt iCurrentProgress; |
|
401 TInt iTotal; |
|
402 }; |
|
403 |
|
404 /** |
|
405 * This class will be used by installers to publish a single install/uninstall/update operation information. |
|
406 * A scheduler needs to be in started when using this class. |
|
407 */ |
|
408 NONSHARABLE_CLASS(CPublishSifOperationInfo) : public CBase |
|
409 { |
|
410 public: |
|
411 |
|
412 /** |
|
413 Creates a CPublishSifOperationInfo object. |
|
414 |
|
415 @return A pointer to the newly allocated CPublishSifOperationInfo object, if creation is successful. |
|
416 */ |
|
417 IMPORT_C static CPublishSifOperationInfo* NewL(); |
|
418 |
|
419 /** |
|
420 Creates a CPublishSifOperationInfo object. |
|
421 |
|
422 @return A pointer to the newly allocated CPublishSifOperationInfo object, if creation is successful. |
|
423 The pointer is also put onto the cleanup stack. |
|
424 */ |
|
425 IMPORT_C static CPublishSifOperationInfo* NewLC(); |
|
426 |
|
427 /** |
|
428 Publish the start of an operation. The corresponding PublishCompletionL() method should be called later |
|
429 else an opeartion place holder is always blocked for this operation which has started. |
|
430 |
|
431 @capability WriteDeviceData |
|
432 @param aStartData Start operation related information. |
|
433 @leave KErrInUse No more slots are available to publish. |
|
434 */ |
|
435 IMPORT_C void PublishStartL(CSifOperationStartData& aStartData); |
|
436 |
|
437 /** |
|
438 Publish the operation progress information |
|
439 |
|
440 @capability WriteDeviceData |
|
441 @param aProgressData Progress operation related information. |
|
442 */ |
|
443 IMPORT_C void PublishProgressL(CSifOperationProgressData& aProgressData); |
|
444 |
|
445 /** |
|
446 Publish the error status of the operation (at the end) |
|
447 |
|
448 @capability WriteDeviceData |
|
449 @param aEndData End operation related information. |
|
450 */ |
|
451 IMPORT_C void PublishCompletionL(CSifOperationEndData& aEndData); |
|
452 |
|
453 IMPORT_C ~CPublishSifOperationInfo(); |
|
454 |
|
455 private: |
|
456 void SetKeyToDelete(TUint aStartEndKey); |
|
457 void SetStartEndKey(TUint aStartEndKey); |
|
458 CPublishSifOperationInfo(); |
|
459 void ConstructL(); |
|
460 TUint AvailableKeyL(); |
|
461 TUint KeyForGlobalComponentIdL(const TDesC& aGlobalComponentId); |
|
462 |
|
463 private: |
|
464 CDeleteKeyTimer* iDeleteTimer; |
|
465 TInt iBufferSize; |
|
466 TUint iStartEndKey; |
|
467 }; |
|
468 |
|
469 /** |
|
470 * MSifOperationsHandler |
|
471 * Clients must implement this class in order to receive notifications. |
|
472 */ |
|
473 class MSifOperationsHandler |
|
474 { |
|
475 public: |
|
476 /** |
|
477 Called when a new operation is started. The client should use the SubscribeL() method |
|
478 (@see CSifOperationsNotifier) to register for progress and end notification for this operation. |
|
479 This function should return quickly as this is run as part of an active object request completion handler. |
|
480 |
|
481 @param aKey The Start End key of the operation. |
|
482 @param aStartData Start operation related information. |
|
483 */ |
|
484 virtual void StartOperationHandler(TUint aKey, const CSifOperationStartData& aStartData) = 0; |
|
485 |
|
486 /** |
|
487 Called when an operation completes. |
|
488 This function should return quickly as this is run as part of an active object request completion handler. |
|
489 |
|
490 @param aEndData End operation related information. |
|
491 */ |
|
492 virtual void EndOperationHandler(const CSifOperationEndData& aEndData) = 0; |
|
493 |
|
494 /** |
|
495 Called whenever a progress update is available. |
|
496 This function should return quickly as this is run as part of an active object request completion handler. |
|
497 |
|
498 @param aProgressData Progress operation related information. |
|
499 */ |
|
500 virtual void ProgressOperationHandler(const CSifOperationProgressData& aProgressData) = 0; |
|
501 virtual ~MSifOperationsHandler() {} |
|
502 }; |
|
503 |
|
504 /** |
|
505 * CSifOperationsNotifier |
|
506 * |
|
507 * Clients must create a CSifOperationsNotifier object by passing in the handler object. |
|
508 * |
|
509 * For every new Sif Operation, the StartOperationHandler() method of the handler would be called along |
|
510 * with some related information. The client can choose to subscribe to this operation by calling the |
|
511 * SubscribeL() method. |
|
512 * |
|
513 * A scheduler needs to be started when using this class. |
|
514 */ |
|
515 NONSHARABLE_CLASS(CSifOperationsNotifier) : public CActive |
|
516 { |
|
517 public: |
|
518 |
|
519 /** |
|
520 Creates a CSifOperationsNotifier object. |
|
521 |
|
522 @param aHandler A handle to the implementation of the MSifOperationsHandler class. |
|
523 |
|
524 @return A pointer to the newly allocated CSifOperationsNotifier object, if creation is successful. |
|
525 */ |
|
526 IMPORT_C static CSifOperationsNotifier* NewL(MSifOperationsHandler& aHandler); |
|
527 |
|
528 /** |
|
529 Creates a CSifOperationsNotifier object. |
|
530 |
|
531 @param aHandler A handle to the implementation of the MSifOperationsHandler class. |
|
532 |
|
533 @return A pointer to the newly allocated CSifOperationsNotifier object, if creation is successful. |
|
534 The pointer is also put onto the cleanup stack. |
|
535 */ |
|
536 IMPORT_C static CSifOperationsNotifier* NewLC(MSifOperationsHandler& aHandler); |
|
537 |
|
538 /** |
|
539 Subscribe for progress and end notifications or only end notification. |
|
540 |
|
541 @param aKey The StartEnd key assoicated with the operation. |
|
542 @param aSubscribeForProgressNotifications Boolean to specify optional subscription to progreess information. |
|
543 */ |
|
544 IMPORT_C void SubscribeL(TUint aKey, TBool aSubscribeForProgressNotifications = ETrue); |
|
545 |
|
546 /** |
|
547 Cancel Subscription for a specific key. |
|
548 |
|
549 @param aKey The StartEnd key assoicated with the operation. |
|
550 */ |
|
551 IMPORT_C void CancelSubscribeL(TUint aKey); |
|
552 |
|
553 /** |
|
554 Cancel all subscriptions. |
|
555 */ |
|
556 IMPORT_C void CancelSubscribeL(); |
|
557 |
|
558 IMPORT_C ~CSifOperationsNotifier(); |
|
559 |
|
560 private: |
|
561 enum TNotifierState |
|
562 { |
|
563 EFirstStart, |
|
564 EWaitForChange |
|
565 }; |
|
566 CSifOperationsNotifier(MSifOperationsHandler& aHandler); |
|
567 void GetKeysL(RArray<TUint>& aKeys); |
|
568 void ActiveOperationsNotificationL(); |
|
569 void WaitForChangeL(); |
|
570 void ConstructL(); |
|
571 void RunL(); |
|
572 void DoCancel(); |
|
573 TInt RunError(TInt aError); |
|
574 |
|
575 private: |
|
576 MSifOperationsHandler& iHandler; |
|
577 TInt iBufferSize; |
|
578 RArray<TUint> iKeyArray; |
|
579 RProperty iProperty; |
|
580 RPointerArray<CSifNotifierBase> iNotifierArray; |
|
581 TNotifierState iNotifierState; |
|
582 }; |
|
583 |
|
584 |
|
585 } // namespace |
|
586 |
|
587 #endif |