|
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 CCcSrvMsg& aMessage ); |
|
110 |
|
111 /** |
|
112 * |
|
113 */ |
|
114 void HandleRegisterObserverNtfL( |
|
115 CCcSrvMsg& aMessage ); |
|
116 |
|
117 /** |
|
118 * |
|
119 */ |
|
120 void HandleUnregisterObserverNtfL( |
|
121 CCcSrvMsg& aMessage ); |
|
122 |
|
123 /** |
|
124 * |
|
125 */ |
|
126 void HandleAddWidgetReqL( |
|
127 CCcSrvMsg& aMessage ); |
|
128 |
|
129 /** |
|
130 * |
|
131 */ |
|
132 void HandleRemoveWidgetReqL( |
|
133 CCcSrvMsg& aMessage ); |
|
134 |
|
135 /** |
|
136 * |
|
137 */ |
|
138 void HandleViewListReqL( |
|
139 CCcSrvMsg& aMessage ); |
|
140 |
|
141 /** |
|
142 * |
|
143 */ |
|
144 void HandleAddViewReqL( |
|
145 CCcSrvMsg& aMessage ); |
|
146 |
|
147 /** |
|
148 * |
|
149 */ |
|
150 void HandleRemoveViewReqL( |
|
151 CCcSrvMsg& aMessage ); |
|
152 |
|
153 /** |
|
154 * |
|
155 */ |
|
156 void HandleActivateViewReqL( |
|
157 CCcSrvMsg& aMessage ); |
|
158 |
|
159 /** |
|
160 * |
|
161 */ |
|
162 void HandleAppListReqL( |
|
163 CCcSrvMsg& aMessage ); |
|
164 |
|
165 /** |
|
166 * |
|
167 */ |
|
168 void HandleActivateAppReqL( |
|
169 CCcSrvMsg& aMessage ); |
|
170 |
|
171 /** |
|
172 * |
|
173 */ |
|
174 void HandleNotSupportedReqL( |
|
175 CCcSrvMsg& aMessage ); |
|
176 |
|
177 /** |
|
178 * |
|
179 */ |
|
180 void SendNtfL( |
|
181 TUint32 aNtf ); |
|
182 |
|
183 /** |
|
184 * |
|
185 */ |
|
186 void SendRespL( |
|
187 CCcSrvMsg& aMessage ); |
|
188 |
|
189 private: // Data |
|
190 /** |
|
191 * Session to Homescreen content control server |
|
192 */ |
|
193 RCcClientSession iSession; |
|
194 |
|
195 /** |
|
196 * Homescreen content controller interface |
|
197 */ |
|
198 MHsContentController& iController; |
|
199 |
|
200 /** |
|
201 * Registered address |
|
202 */ |
|
203 TUint32 iAddress; |
|
204 |
|
205 /** |
|
206 * Sender of Api request |
|
207 */ |
|
208 TPckgBuf<TUint32> iPckgSender; |
|
209 |
|
210 /** |
|
211 * receiver of Api request |
|
212 */ |
|
213 TPckgBuf<TUint32> iPckgReceiver; |
|
214 |
|
215 /** |
|
216 * Received API request header buffer |
|
217 */ |
|
218 HBufC8* iApiHeader; |
|
219 |
|
220 /** |
|
221 * Pointer to header buffer |
|
222 */ |
|
223 TPtr8 iApiHeaderPtr; |
|
224 |
|
225 /** |
|
226 * Received API request data buffer |
|
227 */ |
|
228 HBufC8* iApiData; |
|
229 |
|
230 /** |
|
231 * Pointer to data buffer |
|
232 */ |
|
233 TPtr8 iApiDataPtr; |
|
234 |
|
235 /** |
|
236 * Observers |
|
237 */ |
|
238 RArray<TUint32> iObservers; |
|
239 |
|
240 }; |
|
241 |
|
242 |
|
243 #endif // HSCCPROVIDERCLIENT_H |
|
244 |
|
245 // End of file |