|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Plug-in main class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef WRTDATAOBSERVER_H |
|
20 #define WRTDATAOBSERVER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <LiwCommon.h> |
|
24 |
|
25 class CWrtData; |
|
26 |
|
27 /** |
|
28 * @ingroup group_wrtdataplugin |
|
29 * |
|
30 * Wrt data observer |
|
31 * |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class CWrtDataObserver : public CBase, public MLiwNotifyCallback |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Part of the two phased constuction |
|
40 * |
|
41 * @param aInterface reference of the interface |
|
42 * @param aData reference of the wrt data object |
|
43 * @return none |
|
44 */ |
|
45 static CWrtDataObserver* NewL( MLiwInterface* aInterface, CWrtData* aData ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 * |
|
50 * @param none |
|
51 * @return none |
|
52 */ |
|
53 ~CWrtDataObserver(); |
|
54 |
|
55 private : |
|
56 |
|
57 /** |
|
58 * Constructor |
|
59 * |
|
60 * @param none |
|
61 * @return none |
|
62 */ |
|
63 CWrtDataObserver(); |
|
64 |
|
65 /** |
|
66 * Part of the two phased construction |
|
67 * |
|
68 * @param aInterface reference of the interface |
|
69 * @param aData reference of the wrt data object |
|
70 * @return void |
|
71 */ |
|
72 void ConstructL( MLiwInterface* aInterface, CWrtData* aData ); |
|
73 |
|
74 public: //from MLiwNotifyCallbackc |
|
75 |
|
76 /** |
|
77 * Handles notifications caused by an asynchronous Execute*CmdL call |
|
78 * or an event. |
|
79 * |
|
80 * @param aCmdId The service command associated to the event. |
|
81 * @param aEventId occurred event, see LiwCommon.hrh. |
|
82 * @param aEventParamList Event parameters, if any, as defined per |
|
83 * each event. |
|
84 * @param aInParamList Input parameters, if any, given in the |
|
85 * related HandleCommmandL. |
|
86 * @return Error code for the call back. |
|
87 */ |
|
88 virtual TInt HandleNotifyL( |
|
89 TInt aCmdId, |
|
90 TInt /*aEventId*/, |
|
91 CLiwGenericParamList& aEventParamList, |
|
92 const CLiwGenericParamList& /*aInParamList*/); |
|
93 |
|
94 public: |
|
95 |
|
96 /** |
|
97 * Registers to CPS for add, delete , update and execute notifications |
|
98 * @aFilter - filter for input parameter list |
|
99 * @return void. |
|
100 */ |
|
101 void RegisterL( CLiwDefaultMap* aFilter ); |
|
102 |
|
103 /** |
|
104 * Cancel all the registered notifications. |
|
105 * @return void. |
|
106 */ |
|
107 void ReleaseL(); |
|
108 |
|
109 private: |
|
110 |
|
111 // Reference of |
|
112 // Not owned |
|
113 MLiwInterface* iInterface; |
|
114 |
|
115 // Reference of the wrt data |
|
116 // Not owned |
|
117 CWrtData* iData; |
|
118 |
|
119 // Call back error code |
|
120 TInt iError; |
|
121 |
|
122 }; |
|
123 |
|
124 #endif /*WRTDATAOBSERVER_H*/ |