|
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 HSCCAPICLIENT_H |
|
19 #define HSCCAPICLIENT_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <hscontentcontroller.h> |
|
24 |
|
25 // Forward declarations |
|
26 #include "ccclientsession.h" |
|
27 class MHsContentControl; |
|
28 |
|
29 /** |
|
30 * Home screen content control server content control api client |
|
31 * |
|
32 * |
|
33 * @code |
|
34 * |
|
35 * @endcode |
|
36 * |
|
37 * @lib hsccapiclient.lib |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 class CHsCcApiClient : public CActive, public MHsContentController |
|
41 { |
|
42 public: // Constructor and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @param aControlIf Content control observer interface |
|
47 */ |
|
48 IMPORT_C static CHsCcApiClient* NewL( |
|
49 MHsContentControl* aControlIf ); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~CHsCcApiClient(); |
|
55 |
|
56 private: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Constructor |
|
60 * @param aControlIf Content control observer interface |
|
61 */ |
|
62 CHsCcApiClient( |
|
63 MHsContentControl* aControlIf ); |
|
64 |
|
65 /** |
|
66 * Second phase constructor |
|
67 */ |
|
68 void ConstructL(); |
|
69 |
|
70 private: // From CActive |
|
71 /** |
|
72 * |
|
73 */ |
|
74 void RunL(); |
|
75 |
|
76 /** |
|
77 * |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 public: // From MHsContentController |
|
82 /** |
|
83 * |
|
84 */ |
|
85 TInt WidgetListL( CHsContentInfoArray& aArray ); |
|
86 |
|
87 /** |
|
88 * |
|
89 */ |
|
90 TInt ViewListL( CHsContentInfoArray& aArray ); |
|
91 |
|
92 /** |
|
93 * |
|
94 */ |
|
95 TInt AppListL( CHsContentInfoArray& aArray ); |
|
96 |
|
97 /** |
|
98 * |
|
99 */ |
|
100 TInt AddWidgetL( CHsContentInfo& aInfo ); |
|
101 |
|
102 /** |
|
103 * |
|
104 */ |
|
105 TInt RemoveWidgetL( CHsContentInfo& aInfo ); |
|
106 |
|
107 /** |
|
108 * |
|
109 */ |
|
110 TInt AddViewL( CHsContentInfo& aInfo ); |
|
111 |
|
112 /** |
|
113 * |
|
114 */ |
|
115 TInt RemoveViewL( CHsContentInfo& aInfo ); |
|
116 |
|
117 /** |
|
118 * |
|
119 */ |
|
120 TInt ActivateViewL( CHsContentInfo& aInfo ); |
|
121 |
|
122 /** |
|
123 * |
|
124 */ |
|
125 TInt ActivateAppL( CHsContentInfo& aInfo ); |
|
126 |
|
127 private: // Functions |
|
128 /** |
|
129 * |
|
130 */ |
|
131 void WaitForApiNtfL(); |
|
132 |
|
133 private: // Data |
|
134 /** |
|
135 * Session to Homescreen content control server |
|
136 */ |
|
137 RCcClientSession iSession; |
|
138 |
|
139 /** |
|
140 * Home screen content control API observer |
|
141 */ |
|
142 MHsContentControl* iObserver; |
|
143 |
|
144 /** |
|
145 * Registered address |
|
146 */ |
|
147 TUint32 iAddress; |
|
148 |
|
149 /** |
|
150 * Sender of Api request |
|
151 */ |
|
152 TPckgBuf<TUint32> iPckgSender; |
|
153 |
|
154 /** |
|
155 * receiver of Api request |
|
156 */ |
|
157 TPckgBuf<TUint32> iPckgReceiver; |
|
158 |
|
159 /** |
|
160 * Received API request header buffer |
|
161 */ |
|
162 HBufC8* iApiHeader; |
|
163 |
|
164 /** |
|
165 * Pointer to header buffer |
|
166 */ |
|
167 TPtr8 iApiHeaderPtr; |
|
168 |
|
169 /** |
|
170 * Received API request data buffer |
|
171 */ |
|
172 HBufC8* iApiData; |
|
173 |
|
174 /** |
|
175 * Pointer to data buffer |
|
176 */ |
|
177 TPtr8 iApiDataPtr; |
|
178 |
|
179 }; |
|
180 |
|
181 |
|
182 #endif // HSCCAPICLIENT_H |
|
183 |
|
184 // End of file |