54 { |
55 { |
55 CFbsBitmap *bitmap; |
56 CFbsBitmap *bitmap; |
56 CFbsBitmap *mask; |
57 CFbsBitmap *mask; |
57 }; |
58 }; |
58 |
59 |
59 struct TMyBufferItem |
|
60 { |
|
61 TAny* buf; |
|
62 TInt size; |
|
63 }; |
|
64 |
|
65 |
60 |
66 const TMCPDestinationItem KMCPDestinationInfo[] = |
61 const TMCPDestinationItem KMCPDestinationInfo[] = |
67 { |
62 { |
68 { EMusicWidgetImage1, L"area1_image1", "area1_image1_data", L"*" } |
63 { EMusicWidgetImage1, L"area1_image1", "area1_image1_data", "area1_image1_data_mask" } |
69 ,{ EMusicWidgetText1, L"area2_text1", "area2_text1_data", L"*" } |
64 ,{ EMusicWidgetText1, L"area2_text1", "area2_text1_data", ""} |
70 ,{ EMusicWidgetToolbarB1, L"toolbar_b1", "toolbar_b1_data", L"*" } |
65 ,{ EMusicWidgetToolbarB1, L"toolbar_b1", "toolbar_b1_data", "toolbar_b1_data_mask" } |
71 ,{ EMusicWidgetToolbarB2, L"toolbar_b2", "toolbar_b2_data", L"*" } |
66 ,{ EMusicWidgetToolbarB2, L"toolbar_b2", "toolbar_b2_data", "toolbar_b2_data_mask" } |
72 ,{ EMusicWidgetToolbarB3, L"toolbar_b3", "toolbar_b3_data", L"*" } |
67 ,{ EMusicWidgetToolbarB3, L"toolbar_b3", "toolbar_b3_data", "toolbar_b3_data_mask" } |
73 ,{ EMusicWidgetDefaultText, L"default_text", "default_text_data", L"*" } |
68 ,{ EMusicWidgetDefaultText, L"default_text", "default_text_data", "" } |
74 |
69 |
75 ,{ EMusicWidgetTrigger1, L"area1_image1", "MWTrigger1", L"*" } |
70 ,{ EMusicWidgetTrigger1, L"area1_image1", "MWTrigger1", "" } |
76 ,{ EMusicWidgetTrigger2, L"default_text", "MWTrigger2", L"*" } |
71 ,{ EMusicWidgetTrigger2, L"default_text", "MWTrigger2", "" } |
77 ,{ EMusicWidgetTB1Trigger, L"toolbar_b1", "TB1Trigger", L"*" } |
72 ,{ EMusicWidgetTB1Trigger, L"toolbar_b1", "TB1Trigger", "" } |
78 ,{ EMusicWidgetTB2Trigger, L"toolbar_b2", "TB2Trigger", L"*" } |
73 ,{ EMusicWidgetTB2Trigger, L"toolbar_b2", "TB2Trigger", "" } |
79 ,{ EMusicWidgetTB3Trigger, L"toolbar_b3", "TB3Trigger", L"*" } |
74 ,{ EMusicWidgetTB3Trigger, L"toolbar_b3", "TB3Trigger", "" } |
80 |
|
81 ,{ EMusicMenuMusicInfoImage1, L"image", "musicmenu_musicinfo_imagedata", L"musicmenu_musicinfo_image" } |
|
82 ,{ EMusicMenuMusicInfoLine1, L"text", "musicmenu_musicinfo_text1data", L"musicmenu_musicinfo_text1" } |
|
83 ,{ EMusicMenuMusicInfoLine2, L"text", "musicmenu_musicinfo_text2data", L"musicmenu_musicinfo_text2" } |
|
84 ,{ EMusicMenuMusicInfoTrigger, L"text", "MMInfoTrigger", L"musicmenu_musicinfo_text1" } |
|
85 }; |
75 }; |
86 |
76 |
87 |
77 |
88 const TMCPImageDestinationInfoItem KMCPImageDestinationInfo[] = |
78 const TMCPImageDestinationInfoItem KMCPImageDestinationInfo[] = |
89 |
79 |
90 { |
80 { |
91 {EMusicWidgetImage1, 70,70} |
81 {EMusicWidgetImage1, 70, 70} |
92 , |
82 , |
93 {EMusicWidgetToolbarB1, 41,41} |
83 {EMusicWidgetToolbarB1, 41,41} |
94 , |
84 , |
95 {EMusicWidgetToolbarB2, 41,41} |
85 {EMusicWidgetToolbarB2, 41,41} |
96 , |
86 , |
97 {EMusicWidgetToolbarB3, 41,41} |
87 {EMusicWidgetToolbarB3, 41,41} |
98 , |
88 |
99 {EMusicMenuMusicInfoImage1, 70,70} |
|
100 }; |
89 }; |
101 |
90 |
102 /** |
91 /** |
103 * Music Content Publisher (a Content Harvester plugin) |
92 * Music Content Publisher (a Content Harvester plugin) |
104 * |
93 * |
294 * |
288 * |
295 * @since S60 5.0 |
289 * @since S60 5.0 |
296 * @param aDestination Destination trigger that should launch the action. |
290 * @param aDestination Destination trigger that should launch the action. |
297 */ |
291 */ |
298 void InstallEmptyActionL(TMCPTriggerDestination aDestination); |
292 void InstallEmptyActionL(TMCPTriggerDestination aDestination); |
299 |
293 |
300 |
|
301 /** |
|
302 * Maps an enum from TMCPImageDestination, TMCPTextDestination and |
|
303 * TMCPTriggerDestination to it's keys on CPS. |
|
304 * @param aEnum the enum/destination |
|
305 * @param aType the type key is loaded here |
|
306 * @param aDataKey the data key is loaded here |
|
307 * @param aContent the content key is loaded here |
|
308 * |
|
309 * @since S60 5.0 |
|
310 */ |
|
311 void MapEnumToDestinationInfoL(TInt aEnum,TPtrC& aType, TPtrC8& aDataKey, |
|
312 TPtrC& aContent); |
|
313 |
|
314 /** |
294 /** |
315 * Resets the Bitmap cache. |
295 * Resets the Bitmap cache. |
316 * |
296 * |
317 * @since S60 5.0 |
297 * @since S60 5.0 |
318 */ |
298 */ |
319 void ResetBitmapCache(); |
299 void ResetBitmapCache(); |
320 |
|
321 /** |
|
322 * Resets the publishing buffers. |
|
323 * |
|
324 * @since S60 5.0 |
|
325 */ |
|
326 void ResetPublishingBuffers(); |
|
327 |
300 |
328 TUint RegisterPublisherL( |
301 TUint RegisterPublisherL( |
329 const TDesC& aPublisherId, |
302 const TDesC& aPublisherId, |
330 const TDesC& aContentId, |
303 const TDesC& aContentId, |
331 const TDesC& aContentType ); |
304 const TDesC& aContentType ); |
332 |
305 |
333 TUint CMusicContentPublisher::ExtractItemId( const CLiwGenericParamList& aInParamList ); |
306 TUint ExtractItemId( const CLiwGenericParamList& aInParamList ); |
334 |
307 |
335 void RemoveL( TInt aDestination ); |
|
336 |
|
337 /** |
308 /** |
338 * Get a heap descriptor from the resource file |
309 * Get a heap descriptor from the resource file |
339 * |
310 * |
340 * @since S60 5.0 |
311 * @since S60 5.0 |
341 */ |
312 */ |
342 void GetLocalizedStringL(RResourceFile& aResourceFile, HBufC*& aRetBuf, |
313 void GetLocalizedStringL(RResourceFile& aResourceFile, HBufC*& aRetBuf, |
343 TInt aResourceId); |
314 TInt aResourceId); |
344 |
315 |
345 void DoPublishL(); |
316 void PublishDeferred(); |
|
317 static TInt DoPublish(TAny * aMusicContentPublisher); |
|
318 void DoPublishAllL(); |
|
319 void DoPublishModifiedL(); |
|
320 void DoPublishDeleteAllL(); |
|
321 void DoPublishCmdL(const TDesC8& aCmd, const TDesC8& aKey, const CLiwMap * aValue); |
|
322 |
346 |
323 |
347 |
324 |
348 private: // data |
325 private: // data |
349 |
326 |
350 /** |
327 /** |