|
1 /* |
|
2 * Copyright (c) 2008 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: Task monitor engine |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TSCPSNOTIFIER_H |
|
19 #define TSCPSNOTIFIER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <liwcommon.h> |
|
23 |
|
24 class CLiwGenericParamList; |
|
25 class CLiwServiceHandler; |
|
26 class MLiwInterface; |
|
27 class CLiwDefaultMap; |
|
28 class CLiwMap; |
|
29 class CTsFswEngine; |
|
30 |
|
31 NONSHARABLE_CLASS(CTSCpsNotifier) : |
|
32 public CBase, |
|
33 private MLiwNotifyCallback |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 */ |
|
39 static CTSCpsNotifier* NewL( CTsFswEngine& aEngine ); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CTSCpsNotifier(); |
|
45 |
|
46 private: |
|
47 /** |
|
48 * Constructor. |
|
49 */ |
|
50 CTSCpsNotifier( CTsFswEngine& aEngine ); |
|
51 |
|
52 /** |
|
53 * |
|
54 */ |
|
55 void ConstructL(); |
|
56 private: |
|
57 // Form base class MLiwNotifyCallback. |
|
58 /** |
|
59 * Callback from LIW framework to process an event that was expected. |
|
60 * @see MLiwNotifyCallback::HandleNotifyL |
|
61 */ |
|
62 TInt HandleNotifyL( TInt aCmdId, |
|
63 TInt aEventId, |
|
64 CLiwGenericParamList& aEventParamList, |
|
65 const CLiwGenericParamList& aInParamList ); |
|
66 |
|
67 private: |
|
68 /** |
|
69 * Create and return map filled with widgets identifiers |
|
70 */ |
|
71 CLiwDefaultMap* WidgetFilterLC(); |
|
72 |
|
73 /** |
|
74 * Initalise CPS service interface |
|
75 */ |
|
76 void InitCpsInterfaceL(); |
|
77 |
|
78 /** |
|
79 * Request for CPS notifications abou widgets |
|
80 */ |
|
81 void ExecuteRegistrationCommandL( TUint aOption ); |
|
82 |
|
83 /** |
|
84 * Obtain widget information and |
|
85 * forward widgets data change handling to iEngine |
|
86 */ |
|
87 void HandleWidgetUpdateL( const CLiwMap& aChangeMap ); |
|
88 |
|
89 /** |
|
90 * Obtain from CPS information about widget |
|
91 */ |
|
92 void GetWidgetDataL( const TDesC& aContentId, |
|
93 TInt& aWidgetId, |
|
94 TInt& aBitmapHandle ); |
|
95 |
|
96 /** |
|
97 * Obtain from CPS information about widget from data map |
|
98 */ |
|
99 void GetWidgetDataFromDataMapL( const CLiwMap& aDataMap, |
|
100 TInt& aWidgetId, |
|
101 TInt& aBitmapHandle ); |
|
102 |
|
103 private: |
|
104 |
|
105 MLiwInterface* iCpsInterface;//own |
|
106 |
|
107 CLiwServiceHandler* iServiceHandler;//own |
|
108 |
|
109 CTsFswEngine& iEngine;//not own |
|
110 }; |
|
111 |
|
112 #endif //TSCPSNOTIFIER_H |