|
1 /* |
|
2 * Copyright (c) 2006-2007 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: SDK, AI Player Plugin Content Model API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AIPLPLCONTENTMODEL_H |
|
20 #define AIPLPLCONTENTMODEL_H |
|
21 |
|
22 #include <aicontentmodel.h> |
|
23 #include "aiplayerpluginuids.hrh" |
|
24 |
|
25 // Plug-in Implementation UID. |
|
26 const TInt KImplUidMusicPlayerPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PLAYERPLUGIN; |
|
27 const TUid KUidMusicPlayerPlugin = { KImplUidMusicPlayerPlugin }; |
|
28 |
|
29 |
|
30 // ================================= CONTENT =================================== |
|
31 |
|
32 /** |
|
33 * Content Ids |
|
34 */ |
|
35 enum TAiPlplContentIds |
|
36 { |
|
37 EAiPlplContentArtistCaption |
|
38 ,EAiPlplContentTitleCaption |
|
39 ,EAiPlplContentDurationCaption |
|
40 ,EAiPlplContentVolume |
|
41 ,EAiPlplContentStatus |
|
42 ,EAiPlplContentElapsedTime |
|
43 }; |
|
44 |
|
45 /** |
|
46 * Content that the plugin will publish |
|
47 */ |
|
48 const TAiContentItem KAiPlplContent[] = |
|
49 { |
|
50 { EAiPlplContentArtistCaption, L"Artist", KAiContentTypeText } |
|
51 ,{ EAiPlplContentTitleCaption, L"Title", KAiContentTypeText } |
|
52 ,{ EAiPlplContentDurationCaption, L"Duration", KAiContentTypeText } |
|
53 //Current volume level. Content needs to be re-published every time when volume is changed |
|
54 //Always published as resource see KAiPlplResources \ VolumeLevel |
|
55 ,{ EAiPlplContentVolume, L"Volume", KAiContentTypeText } |
|
56 //Current player status. Content needs to be re-published every time when player status is changed. |
|
57 //When player is stoped, the plug-in MUST publish empty item |
|
58 //Always published as resource see KAiPlplResources \ Status |
|
59 ,{ EAiPlplContentStatus, L"Status", KAiContentTypeBitmap } |
|
60 ,{ EAiPlplContentElapsedTime, L"ElapsedTime",KAiContentTypeText } |
|
61 }; |
|
62 |
|
63 |
|
64 // ================================ RESOURCES ================================== |
|
65 |
|
66 |
|
67 /** |
|
68 * Resource Ids |
|
69 */ |
|
70 enum TAiPlplPluginResourceIds |
|
71 { |
|
72 EAiPlplResourceVol0 |
|
73 ,EAiPlplResourceVol1 |
|
74 ,EAiPlplResourceVol2 |
|
75 ,EAiPlplResourceVol3 |
|
76 ,EAiPlplResourceVol4 |
|
77 ,EAiPlplResourceVol5 |
|
78 ,EAiPlplResourceVol6 |
|
79 ,EAiPlplResourceVol7 |
|
80 ,EAiPlplResourceVol8 |
|
81 ,EAiPlplResourceVol9 |
|
82 ,EAiPlplResourceVol10 |
|
83 ,EAiPlplResourcePlayIcon |
|
84 ,EAiPlplResourcePauseIcon |
|
85 }; |
|
86 |
|
87 /** |
|
88 * Resources that the plugin will publish |
|
89 */ |
|
90 const TAiContentItem KAiPlplResources[] = |
|
91 { |
|
92 //UI resources that represents volume levels |
|
93 { EAiPlplResourceVol0, L"Vol0", KAiContentTypeText } |
|
94 ,{ EAiPlplResourceVol1, L"Vol1", KAiContentTypeText } |
|
95 ,{ EAiPlplResourceVol2, L"Vol2", KAiContentTypeText } |
|
96 ,{ EAiPlplResourceVol3, L"Vol3", KAiContentTypeText } |
|
97 ,{ EAiPlplResourceVol4, L"Vol4", KAiContentTypeText } |
|
98 ,{ EAiPlplResourceVol5, L"Vol5", KAiContentTypeText } |
|
99 ,{ EAiPlplResourceVol6, L"Vol6", KAiContentTypeText } |
|
100 ,{ EAiPlplResourceVol7, L"Vol7", KAiContentTypeText } |
|
101 ,{ EAiPlplResourceVol8, L"Vol8", KAiContentTypeText } |
|
102 ,{ EAiPlplResourceVol9, L"Vol9", KAiContentTypeText } |
|
103 ,{ EAiPlplResourceVol10, L"Vol10", KAiContentTypeText } |
|
104 |
|
105 //UI resources that represents status |
|
106 ,{ EAiPlplResourcePlayIcon, L"PlayIcon", KAiContentTypeBitmap } |
|
107 ,{ EAiPlplResourcePauseIcon, L"PauseIcon", KAiContentTypeBitmap } |
|
108 }; |
|
109 |
|
110 // ============================ SERVICES (Events) ============================== |
|
111 |
|
112 /** |
|
113 * Event Ids. |
|
114 */ |
|
115 enum TAiPlplEventIds |
|
116 { |
|
117 EAiPlplEventVolInc |
|
118 ,EAiPlplEventVolDec |
|
119 ,EAiPlplEventLaunchLibrary |
|
120 ,EAiPlplEventVolSet |
|
121 ,EAiPlplEventVolMute |
|
122 ,EAiPlplEventVolRestore |
|
123 }; |
|
124 |
|
125 /** |
|
126 * Services that the plugin can perform |
|
127 */ |
|
128 const TAiContentItem KAiPlplEvents[] = |
|
129 { |
|
130 { EAiPlplEventVolInc, L"VolInc", "" } |
|
131 ,{ EAiPlplEventVolDec, L"VolDec", "" } |
|
132 ,{ EAiPlplEventLaunchLibrary, L"Library", "" } |
|
133 ,{ EAiPlplEventVolSet, L"VolSet", "" } |
|
134 ,{ EAiPlplEventVolMute, L"Mute", "" } |
|
135 ,{ EAiPlplEventVolRestore, L"Restore", "" } |
|
136 }; |
|
137 |
|
138 #endif // AIPLPLCONTENTMODEL_H |