17 |
17 |
18 |
18 |
19 #ifndef SAPIDATA_H |
19 #ifndef SAPIDATA_H |
20 #define SAPIDATA_H |
20 #define SAPIDATA_H |
21 |
21 |
22 // INCLUDE FILES |
22 // System includes |
23 #include <liwcommon.h> |
23 #include <liwcommon.h> |
24 #include <AknsItemID.h> |
24 #include <AknsItemID.h> |
25 #include <aieventhandlerextension.h> |
25 |
|
26 // User includes |
|
27 #include <hscontentpublisher.h> |
26 #include "sapidatapluginconst.h" |
28 #include "sapidatapluginconst.h" |
27 #include "aicontentpublisher.h" |
29 |
28 |
30 // Forward declarations |
29 class MLiwInterface; |
31 class MLiwInterface; |
30 class CLiwServiceHandler; |
32 class CLiwServiceHandler; |
31 class CSapiDataObserver; |
33 class CSapiDataObserver; |
32 class CSapiDataPlugin; |
34 class CSapiDataPlugin; |
33 |
35 class MAiContentObserver; |
34 |
36 |
35 class CContentItem : public CBase |
37 /** |
|
38 * @ingroup group_sapidataplugin |
|
39 * |
|
40 * Content item |
|
41 * |
|
42 * @since S60 5.0 |
|
43 */ |
|
44 NONSHARABLE_CLASS( CContentItem ) : public CBase |
36 { |
45 { |
37 public : |
46 public: |
38 |
47 |
39 /** |
48 /** |
40 * Part of the two phased constuction |
49 * Part of the two phased constuction |
41 * |
50 * |
42 * @param none |
51 * @param none |
43 * @return none |
52 * @return none |
44 */ |
53 */ |
45 static CContentItem* NewL(); |
54 static CContentItem* NewL(); |
46 |
|
47 |
55 |
48 /* |
56 /* |
49 * Destructor |
57 * Destructor |
50 */ |
58 */ |
51 ~CContentItem(); |
59 ~CContentItem(); |
52 |
60 |
53 private : |
61 private: |
54 |
62 |
55 /* |
63 /* |
56 * Constructor |
64 * Constructor |
57 */ |
65 */ |
58 CContentItem(); |
66 CContentItem(); |
59 |
67 |
60 /** |
68 /** |
61 * Part of the two phased construction |
69 * Part of the two phased construction |
62 * |
70 * |
63 * @param none |
71 * @param none |
64 * @return void |
72 * @return void |
65 */ |
73 */ |
66 void ConstructL(); |
74 void ConstructL(); |
67 |
75 |
68 public : |
76 public: |
69 |
77 |
70 TInt iId; |
78 TInt iId; |
71 /* item id */ |
79 /* item id */ |
72 HBufC* iName; |
80 HBufC* iName; |
73 /* type (image/text) */ |
81 /* type (image/text) */ |
101 * @param none |
110 * @param none |
102 * @return none |
111 * @return none |
103 */ |
112 */ |
104 ~CSapiData(); |
113 ~CSapiData(); |
105 |
114 |
106 private : |
115 private: |
107 |
116 // constructors |
108 |
117 |
109 /** |
118 /** |
110 * Constructor |
119 * Constructor |
111 * |
120 * |
112 * @param none |
121 * @param none |
113 * @return none |
122 * @return none |
114 */ |
123 */ |
115 CSapiData(); |
124 CSapiData(); |
116 |
125 |
117 |
|
118 /** |
126 /** |
119 * Part of the two phased construction |
127 * Part of the two phased construction |
120 * |
128 * |
121 * @param aPlugin reference of the plugin |
129 * @param aPlugin reference of the plugin |
122 * @return void |
130 * @return void |
123 */ |
131 */ |
124 void ConstructL(CSapiDataPlugin* aPlugin); |
132 void ConstructL(CSapiDataPlugin* aPlugin); |
125 |
133 |
|
134 // new functions |
|
135 |
|
136 /** |
|
137 * Gets the menu item from the publisher |
|
138 * |
|
139 * @param none |
|
140 * @return void |
|
141 */ |
|
142 void GetMenuItemsL(); |
|
143 |
|
144 public: |
|
145 // new functions |
|
146 |
126 /** |
147 /** |
127 * Change the publisher status |
148 * Change the publisher status |
128 * |
149 * |
129 * @param aStatus new status of the publisher |
150 * @param aStatus new status of the publisher |
130 * @return void |
151 * @return void |
131 */ |
152 */ |
132 void ChangePublisherStatusL(const TDesC& aStatus); |
153 void ChangePublisherStatusL(const TDesC& aStatus); |
133 |
|
134 /** |
|
135 * Gets the menu item from the publisher |
|
136 * |
|
137 * @param none |
|
138 * @return void |
|
139 */ |
|
140 void GetMenuItemsL(); |
|
141 |
|
142 public : |
|
143 |
154 |
144 /** |
155 /** |
145 * Configures the subscriber and data to subscribe. |
156 * Configures the subscriber and data to subscribe. |
146 * |
157 * |
147 * @param aConfigurations Information about the subscriber |
158 * @param aConfigurations Information about the subscriber |
148 * and the data to subscribe. |
159 * and the data to subscribe. |
149 * @return void |
160 * @return void |
150 */ |
161 */ |
151 void ConfigureL(RAiSettingsItemArray& aConfigurations); |
162 void ConfigureL(RAiSettingsItemArray& aConfigurations); |
152 |
163 |
|
164 /** |
|
165 * Sets content id |
|
166 * |
|
167 * @param aId Content id |
|
168 */ |
153 void SetContentIdL(const TDesC8& aId); |
169 void SetContentIdL(const TDesC8& aId); |
|
170 |
|
171 /** |
|
172 * Sets startup reason, which will be communicated to CPS client |
|
173 * in the case of late registration. |
|
174 * |
|
175 * @param aStartupReason A reason |
|
176 */ |
|
177 void SetStartupReasonL(const TDesC& aStartupReason); |
154 |
178 |
155 /** |
179 /** |
156 * Execute the command to get the data from CPS |
180 * Execute the command to get the data from CPS |
157 * |
181 * |
158 * @param aRegistry type of registry (publisher/cp_data) |
182 * @param aRegistry type of registry (publisher/cp_data) |
364 * @param aStatus update needed status (ETrue/EFalse) |
332 * @param aStatus update needed status (ETrue/EFalse) |
365 * @return void |
333 * @return void |
366 */ |
334 */ |
367 void SetUpdateNeeded(TBool aStatus); |
335 void SetUpdateNeeded(TBool aStatus); |
368 |
336 |
369 private : |
337 private: |
370 |
338 // data |
371 // Subscriber interface |
339 |
372 // own |
340 /** Subscriber interface, owned */ |
373 MLiwInterface* iInterface; |
341 MLiwInterface* iInterface; |
374 |
342 /** Data Observer to CPS content registry, owned */ |
375 // Data Observer to CPS content registry |
343 CSapiDataObserver* iContentObserver; |
376 // Own // iConObserver; |
344 /** Data Observer to CPS publisher registry, owned */ |
377 CSapiDataObserver* iContentObserver; |
|
378 |
|
379 // Data Observer to CPS publisher registry |
|
380 // Own // iConObserver; |
|
381 CSapiDataObserver* iPubObserver; |
345 CSapiDataObserver* iPubObserver; |
382 |
346 /** Service handler, owned */ |
383 // Service handler |
347 CLiwServiceHandler* iServiceHandler; |
384 // Own |
348 /** Array of configurations, owned */ |
385 CLiwServiceHandler* iServiceHandler; |
|
386 |
|
387 // Array of configurations |
|
388 // Own |
|
389 RPointerArray<CContentItem> iItemList; |
349 RPointerArray<CContentItem> iItemList; |
390 |
350 /** Number of configurations */ |
391 // Number of configurations |
351 TInt iItemCount; |
392 TInt iItemCount; |
352 /** Command name in configuration Array, owned */ |
393 |
|
394 // Command name in configuration Array |
|
395 HBufC8* iCommandName; |
353 HBufC8* iCommandName; |
396 /* publisher id */ |
354 /** publisher id, owned */ |
397 HBufC* iPublisher; |
355 HBufC* iPublisher; |
398 /* content type */ |
356 /** content type, owned */ |
399 HBufC* iContentType; |
357 HBufC* iContentType; |
400 /* content id */ |
358 /** content id, owned */ |
401 HBufC* iContentId; |
359 HBufC* iContentId; |
402 |
360 /** Startup reason, owned */ |
403 // Reference of the sapi data plugin |
361 HBufC* iStartupReason; |
404 // Not owned |
362 /** Reference of the sapi data plugin, not owned */ |
405 CSapiDataPlugin* iPlugin; |
363 CSapiDataPlugin* iPlugin; |
406 |
364 /** Menu item names, owned */ |
407 // Menu item names |
365 RPointerArray<HBufC> iMenuItems; |
408 // Own |
366 /** Trigger names for the menu items, owned */ |
409 RPointerArray<HBufC> iMenuItems; |
367 RPointerArray<HBufC8> iMenuTriggers; |
410 |
368 /** Store the status of update needed on resume */ |
411 // Trigger names for the menu items |
|
412 // Own |
|
413 RPointerArray<HBufC8> iMenuTriggers; |
|
414 |
|
415 // Store the status of update needed on resume |
|
416 TBool iUpdateNeeded; |
369 TBool iUpdateNeeded; |
417 }; |
370 }; |
418 |
371 |
419 #endif /*SAPIDATA_H*/ |
372 #endif // SAPIDATA_H |
|
373 |
|
374 // End of file |