114
|
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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef HSCCPROVIDERCLIENT_H
|
|
19 |
#define HSCCPROVIDERCLIENT_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <hscontentcontrol.h>
|
|
24 |
|
|
25 |
// Forward declarations
|
|
26 |
#include "ccclientsession.h"
|
|
27 |
class MHsContentController;
|
|
28 |
class CCcSrvMsg;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Home screen content control server content provider client
|
|
32 |
*
|
|
33 |
*
|
|
34 |
* @code
|
|
35 |
*
|
|
36 |
* @endcode
|
|
37 |
*
|
|
38 |
* @lib hsccsrv.lib
|
|
39 |
* @since S60 v5.0
|
|
40 |
*/
|
|
41 |
class CHsCcProviderClient : public CActive, public MHsContentControl
|
|
42 |
{
|
|
43 |
public: // Constructor and destructor
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Two-phased constructor.
|
|
47 |
* @param aController Controller interface
|
|
48 |
*/
|
|
49 |
IMPORT_C static CHsCcProviderClient* NewL(
|
|
50 |
MHsContentController& aController );
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Destructor
|
|
54 |
*/
|
|
55 |
~CHsCcProviderClient();
|
|
56 |
|
|
57 |
private: // Constructors and destructor
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Constructor
|
|
61 |
*/
|
|
62 |
CHsCcProviderClient(
|
|
63 |
MHsContentController& aController );
|
|
64 |
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Second phase constructor
|
|
68 |
*/
|
|
69 |
void ConstructL();
|
|
70 |
|
|
71 |
private: // From CActive
|
|
72 |
/**
|
|
73 |
*
|
|
74 |
*/
|
|
75 |
void RunL();
|
|
76 |
|
|
77 |
/**
|
|
78 |
*
|
|
79 |
*/
|
|
80 |
void DoCancel();
|
|
81 |
|
|
82 |
public: // From MHsContentControl
|
|
83 |
|
|
84 |
/**
|
|
85 |
*
|
|
86 |
*/
|
|
87 |
void NotifyWidgetListChanged();
|
|
88 |
|
|
89 |
/**
|
|
90 |
*
|
|
91 |
*/
|
|
92 |
void NotifyViewListChanged();
|
|
93 |
|
|
94 |
/**
|
|
95 |
*
|
|
96 |
*/
|
|
97 |
void NotifyAppListChanged();
|
|
98 |
|
|
99 |
private: // Functions
|
|
100 |
/**
|
|
101 |
*
|
|
102 |
*/
|
|
103 |
void WaitForApiReqL();
|
|
104 |
|
|
105 |
/**
|
|
106 |
*
|
|
107 |
*/
|
|
108 |
void HandleWidgetListReqL(
|
|
109 |
TUint32 aSender,
|
|
110 |
TUint32 aReceiver,
|
|
111 |
CCcSrvMsg& aMessage );
|
|
112 |
|
|
113 |
/**
|
|
114 |
*
|
|
115 |
*/
|
|
116 |
void HandleRegisterObserverNtfL(
|
|
117 |
TUint32 aSender,
|
|
118 |
TUint32 aReceiver,
|
|
119 |
CCcSrvMsg& aMessage );
|
|
120 |
|
|
121 |
/**
|
|
122 |
*
|
|
123 |
*/
|
|
124 |
void HandleUnregisterObserverNtfL(
|
|
125 |
TUint32 aSender,
|
|
126 |
TUint32 aReceiver,
|
|
127 |
CCcSrvMsg& aMessage );
|
|
128 |
|
|
129 |
/**
|
|
130 |
*
|
|
131 |
*/
|
|
132 |
void HandleAddWidgetReqL(
|
|
133 |
TUint32 aSender,
|
|
134 |
TUint32 aReceiver,
|
|
135 |
CCcSrvMsg& aMessage );
|
|
136 |
|
|
137 |
/**
|
|
138 |
*
|
|
139 |
*/
|
|
140 |
void HandleRemoveWidgetReqL(
|
|
141 |
TUint32 aSender,
|
|
142 |
TUint32 aReceiver,
|
|
143 |
CCcSrvMsg& aMessage );
|
|
144 |
|
|
145 |
/**
|
|
146 |
*
|
|
147 |
*/
|
|
148 |
void HandleViewListReqL(
|
|
149 |
TUint32 aSender,
|
|
150 |
TUint32 aReceiver,
|
|
151 |
CCcSrvMsg& aMessage );
|
|
152 |
|
|
153 |
/**
|
|
154 |
*
|
|
155 |
*/
|
|
156 |
void HandleAddViewReqL(
|
|
157 |
TUint32 aSender,
|
|
158 |
TUint32 aReceiver,
|
|
159 |
CCcSrvMsg& aMessage );
|
|
160 |
|
|
161 |
/**
|
|
162 |
*
|
|
163 |
*/
|
|
164 |
void HandleRemoveViewReqL(
|
|
165 |
TUint32 aSender,
|
|
166 |
TUint32 aReceiver,
|
|
167 |
CCcSrvMsg& aMessage );
|
|
168 |
|
|
169 |
/**
|
|
170 |
*
|
|
171 |
*/
|
|
172 |
void HandleActivateViewReqL(
|
|
173 |
TUint32 aSender,
|
|
174 |
TUint32 aReceiver,
|
|
175 |
CCcSrvMsg& aMessage );
|
|
176 |
|
|
177 |
/**
|
|
178 |
*
|
|
179 |
*/
|
|
180 |
void HandleActiveViewReqL(
|
|
181 |
TUint32 aSender,
|
|
182 |
TUint32 aReceiver,
|
|
183 |
CCcSrvMsg& aMessage );
|
|
184 |
|
|
185 |
/**
|
|
186 |
*
|
|
187 |
*/
|
|
188 |
void HandleAppListReqL(
|
|
189 |
TUint32 aSender,
|
|
190 |
TUint32 aReceiver,
|
|
191 |
CCcSrvMsg& aMessage );
|
|
192 |
|
|
193 |
/**
|
|
194 |
*
|
|
195 |
*/
|
|
196 |
void HandleActivateAppReqL(
|
|
197 |
TUint32 aSender,
|
|
198 |
TUint32 aReceiver,
|
|
199 |
CCcSrvMsg& aMessage );
|
|
200 |
|
|
201 |
/**
|
|
202 |
*
|
|
203 |
*/
|
|
204 |
void HandleActiveAppReqL(
|
|
205 |
TUint32 aSender,
|
|
206 |
TUint32 aReceiver,
|
|
207 |
CCcSrvMsg& aMessage );
|
|
208 |
|
|
209 |
/**
|
|
210 |
*
|
|
211 |
*/
|
|
212 |
void HandleNotSupportedReqL(
|
|
213 |
TUint32 aSender,
|
|
214 |
TUint32 aReceiver,
|
|
215 |
CCcSrvMsg& aMessage );
|
|
216 |
|
|
217 |
/**
|
|
218 |
*
|
|
219 |
*/
|
|
220 |
void SendNtfL(
|
|
221 |
TUint32 aNtf );
|
|
222 |
|
|
223 |
/**
|
|
224 |
*
|
|
225 |
*/
|
|
226 |
void SendRespL(
|
|
227 |
TUint32 aSender,
|
|
228 |
TUint32 aReceiver,
|
|
229 |
CCcSrvMsg& aMessage );
|
|
230 |
|
|
231 |
private: // Data
|
|
232 |
/**
|
|
233 |
* Session to Homescreen content control server
|
|
234 |
*/
|
|
235 |
RCcClientSession iSession;
|
|
236 |
|
|
237 |
/**
|
|
238 |
* Homescreen content controller interface
|
|
239 |
*/
|
|
240 |
MHsContentController& iController;
|
|
241 |
|
|
242 |
/**
|
|
243 |
* Registered address
|
|
244 |
*/
|
|
245 |
TUint32 iAddress;
|
|
246 |
|
|
247 |
/**
|
|
248 |
* Sender of Api request
|
|
249 |
*/
|
|
250 |
TPckgBuf<TUint32> iPckgSender;
|
|
251 |
|
|
252 |
/**
|
|
253 |
* receiver of Api request
|
|
254 |
*/
|
|
255 |
TPckgBuf<TUint32> iPckgReceiver;
|
|
256 |
|
|
257 |
/**
|
|
258 |
* Received API request header buffer
|
|
259 |
*/
|
|
260 |
HBufC8* iApiHeader;
|
|
261 |
|
|
262 |
/**
|
|
263 |
* Pointer to header buffer
|
|
264 |
*/
|
|
265 |
TPtr8 iApiHeaderPtr;
|
|
266 |
|
|
267 |
/**
|
|
268 |
* Received API request data buffer
|
|
269 |
*/
|
|
270 |
HBufC8* iApiData;
|
|
271 |
|
|
272 |
/**
|
|
273 |
* Pointer to data buffer
|
|
274 |
*/
|
|
275 |
TPtr8 iApiDataPtr;
|
|
276 |
|
|
277 |
/**
|
|
278 |
* Observers
|
|
279 |
*/
|
|
280 |
RArray<TUint32> iObservers;
|
|
281 |
|
|
282 |
};
|
|
283 |
|
|
284 |
|
|
285 |
#endif // HSCCPROVIDERCLIENT_H
|
|
286 |
|
|
287 |
// End of file
|