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