1 /* |
|
2 * Copyright (c) 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: Content Publisher server client |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPCLIENT_H |
|
20 #define CPCLIENT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "cpclientsession.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 #ifdef CONTENT_PUBLISHER_DEBUG |
|
27 class CCPDebug; |
|
28 #endif |
|
29 class CLiwGenericParamList; |
|
30 class CCPActiveNotifier; |
|
31 class CCPLiwMap; |
|
32 class MLiwNotifyCallback; |
|
33 class CLiwDefaultMap; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Client-side interface to Content Publisher |
|
39 * |
|
40 * This class provides the client-side interface to the Content Publisher |
|
41 * server. |
|
42 * |
|
43 * @lib cpclient.dll |
|
44 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
45 */ |
|
46 class CCPClient : public CBase |
|
47 { |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CCPClient* NewL(); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CCPClient* NewLC(); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CCPClient(); |
|
64 |
|
65 /** |
|
66 * Send command to server to GetList of data from Content Publisher Database |
|
67 * |
|
68 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
69 * @param aInParamList input parameter list (filter) |
|
70 * @param aOutParamList output parameter list (iterable of maps) |
|
71 */ |
|
72 void GetListL( const CLiwGenericParamList& aInParamList, |
|
73 CLiwGenericParamList& aOutParamList ); |
|
74 |
|
75 /** |
|
76 * Send command to server to Add data to Content Publisher Database |
|
77 * |
|
78 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
79 * @param aInParamList input parameter list (data to add) |
|
80 * @param aOutParamList output parameter list (id of data or error code) |
|
81 */ |
|
82 void AddL( const CLiwGenericParamList& aInParamList, |
|
83 CLiwGenericParamList& aOutParamList ); |
|
84 |
|
85 /** |
|
86 * Send command to server to Delete data from Content Publisher Database |
|
87 * |
|
88 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
89 * @param aInParamList input parameter list (filter) |
|
90 */ |
|
91 void DeleteL( const CLiwGenericParamList& aInParamList ); |
|
92 |
|
93 /** |
|
94 * Send command to server to Register observer for notifications |
|
95 * |
|
96 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
97 * @param aObserver |
|
98 */ |
|
99 void RegisterObserverL( MLiwNotifyCallback* aObserver, |
|
100 const CLiwGenericParamList& aInParamList, TInt32 aTransactionId ); |
|
101 |
|
102 /** |
|
103 * Unregister observer if Transaction Id provided or all observers if not |
|
104 * |
|
105 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
106 * @param aInParamList input parameter list (transactionId) |
|
107 */ |
|
108 void UnregisterObserversL( const CLiwGenericParamList& aInParamList ); |
|
109 |
|
110 /** |
|
111 * Send command to server to ExecuteAction |
|
112 * |
|
113 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
114 * @param aInParamList input parameter list (filter) |
|
115 * @param aOutParamList output action_map |
|
116 */ |
|
117 void ExecuteActionL( const CLiwGenericParamList& aInParamList ); |
|
118 |
|
119 /** |
|
120 * Check second param from IDataSource interface |
|
121 * |
|
122 * @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier |
|
123 * @param aInParamList input parameter list |
|
124 * @param aKey key with map |
|
125 */ |
|
126 void CheckMapL( const CLiwGenericParamList& aInParamList, |
|
127 const TDesC8& aKey ); |
|
128 |
|
129 private: |
|
130 |
|
131 /** |
|
132 * C++ default constructor. |
|
133 */ |
|
134 CCPClient(); |
|
135 |
|
136 /** |
|
137 * Perform the second phase construction of a CCPClient object. |
|
138 */ |
|
139 void ConstructL(); |
|
140 |
|
141 private: |
|
142 //data |
|
143 |
|
144 /** |
|
145 * Client-server session |
|
146 */ |
|
147 RCPServerClient iServerClient; |
|
148 /** |
|
149 * Pointer to an active object |
|
150 * Own. |
|
151 */ |
|
152 CCPActiveNotifier * iActiveNotifier; |
|
153 |
|
154 #ifdef CONTENT_PUBLISHER_DEBUG |
|
155 CCPDebug* iDebug; |
|
156 #endif |
|
157 |
|
158 }; |
|
159 |
|
160 #endif // CPCLIENT_H |
|
161 |
|
162 // End of File |
|