|
1 /* |
|
2 * Copyright (c) 2006 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: Definitions for message type |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMPXCOLLECTIONMESSAGEDEFS_H |
|
21 #define CMPXCOLLECTIONMESSAGEDEFS_H |
|
22 |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <mpxattribute.h> |
|
26 /** |
|
27 * Item changed message |
|
28 */ |
|
29 |
|
30 const TInt KMPXMessageIdItemChanged = 0x10282945; |
|
31 |
|
32 /** |
|
33 * Attributes supported for KMPXMessageIdItemChanged |
|
34 */ |
|
35 /** |
|
36 * TUid. Collection id of the message originator |
|
37 */ |
|
38 const TMPXAttributeData KMPXMessageCollectionId={KMPXMessageIdItemChanged, 0x01}; |
|
39 /** |
|
40 * TMPXChangeEventType, change event type |
|
41 */ |
|
42 const TMPXAttributeData KMPXMessageChangeEventType={KMPXMessageIdItemChanged, 0x02}; |
|
43 /** |
|
44 * TMPXGeneralCategory, category of the media changed |
|
45 */ |
|
46 const TMPXAttributeData KMPXMessageMediaGeneralCategory={KMPXMessageIdItemChanged, 0x04}; |
|
47 /** |
|
48 * TMPXItemId (as def'd in CollectionPath) |
|
49 * ID of media changed |
|
50 */ |
|
51 const TMPXAttributeData KMPXMessageMediaGeneralId={KMPXMessageIdItemChanged, 0x08}; |
|
52 /** |
|
53 * TMPXItemId (as def'd in CollectionPath) |
|
54 * (Optional) Old ID of media if media is moved/renamed |
|
55 */ |
|
56 const TMPXAttributeData KMPXMessageMediaDeprecatedId={KMPXMessageIdItemChanged, 0x10}; |
|
57 |
|
58 /** |
|
59 * Attributes supported for KMPXMessageIdItemChanged |
|
60 * |
|
61 * @deprecated please use constants above |
|
62 */ |
|
63 enum |
|
64 { |
|
65 /** |
|
66 * TUid. Collection id of the message originator |
|
67 */ |
|
68 EMPXMessageCollectionId=0x01, |
|
69 |
|
70 /** |
|
71 * TMPXChangeEventType, change event type |
|
72 */ |
|
73 EMPXMessageChangeEventType = 0x02, |
|
74 |
|
75 /** |
|
76 * TMPXGeneralCategory, category of the media changed |
|
77 */ |
|
78 EMPXMessageMediaGeneralCategory=0x04, |
|
79 |
|
80 /** |
|
81 * TMPXItemId (as def'd in CollectionPath) |
|
82 * ID of media changed |
|
83 */ |
|
84 EMPXMessageMediaGeneralId=0x08, |
|
85 |
|
86 /** |
|
87 * TMPXItemId (as def'd in CollectionPath) |
|
88 * (Optional) Old ID of media if media is moved/renamed |
|
89 */ |
|
90 EMPXMessageMediaDeprecatedId=0x10 |
|
91 |
|
92 }; |
|
93 |
|
94 |
|
95 // |
|
96 // a) When a track is removed, the following messages will be sent: |
|
97 // 1) EMPXItemDeleted/EMPXSong for the track removed |
|
98 // 2) EMPXItemModified/EMPXArtist, EMPXItemModified/EMPXAlbum, ...etc. |
|
99 // for the affected artist/album/genre/composer where applicable |
|
100 // 3) EMPXItemModified/EMPXPlaylist for the affected playlists where |
|
101 // applicable. |
|
102 // |
|
103 // b) When a track is added, EMPXItemInserted/EMPXSong will be sent |
|
104 // for the track added |
|
105 // |
|
106 // c) When a track is modified (including modifying its |
|
107 // artist/album/genre/composer), the following messages will be sent: |
|
108 // 1) EMPXItemModified/EMPXSong for the track modified. If MTP renames |
|
109 // the track (i.e. changing the URI of the song), deprecated Id |
|
110 // of the track will be included in this message. |
|
111 // 2) EMPXItemModified/EMPXArtist, EMPXItemModified/EMPXAlbum, ...etc. |
|
112 // for the affected artist/album/genre/composer where applicable. |
|
113 // If artist/album/genre/composer has been renamed, deprecated Id |
|
114 // will be included in this message. |
|
115 // 3) EMPXItemModified/EMPXPlaylist for the affected playlists where |
|
116 // applicable. |
|
117 // |
|
118 // d) When a playlist removed, EMPXItemDeleted/EMPXPlaylist will be |
|
119 // sent for the playlist removed |
|
120 // |
|
121 // e) When a track is removed from a saved playlist, |
|
122 // EMPXItemModified/EMPXPlaylist will be sent |
|
123 // |
|
124 // f) When a playlist is added, EMPXItemInserted/EMPXPlaylist will be |
|
125 // sent for the playlist added |
|
126 // |
|
127 // g) When a track is appended to a playlist, EMPXItemModified/EMPXPlaylist |
|
128 // will be sent for the playlist modified |
|
129 // |
|
130 // h) When a playlist is modified, EMPXItemModified/EMPXPlaylist will be |
|
131 // sent. If the playlist is renamed, deprecated Id of the playlist |
|
132 // will be included in this message. |
|
133 // |
|
134 enum TMPXChangeEventType |
|
135 { |
|
136 EMPXItemDeleted, // item/playlist deleted |
|
137 EMPXItemInserted, // item/playlist added |
|
138 EMPXItemModified // item/playlist/artist/album/genre/composer modified |
|
139 }; |
|
140 |
|
141 |
|
142 /** |
|
143 * A CMPXMessage to give additinal information about failures or events |
|
144 * generated from collection plugins. This message can be customized |
|
145 * by a plugin to tell the UI about events |
|
146 */ |
|
147 const TInt KMPXCustomMessageId = 0x10282957; |
|
148 |
|
149 /** |
|
150 * Attributes supported for KMPXCustomMessageId |
|
151 */ |
|
152 /** |
|
153 * The collection id that originated the message (TInt) |
|
154 */ |
|
155 const TMPXAttributeData KMPXCustomMessageCollectionId={KMPXCustomMessageId, 0x01}; |
|
156 /** |
|
157 * TInt, a generic event type such as TMPXCollectionServerOp |
|
158 * The interpretation of this attribute depends on the collection plugin. |
|
159 * |
|
160 * For example, the Music DB plugin will return EMcsOpen, KErrOutOfDisk |
|
161 * if the plugin cannot merge the database because of low disk space |
|
162 */ |
|
163 const TMPXAttributeData KMPXCustomMessageEventType={KMPXCustomMessageId, 0x02}; |
|
164 /** |
|
165 * TInt, standard symbian error codes |
|
166 */ |
|
167 const TMPXAttributeData KMPXCustomMessageErrorCode={KMPXCustomMessageId, 0x04}; |
|
168 |
|
169 /** |
|
170 * |
|
171 * @deprecated please use constants above |
|
172 * |
|
173 */ |
|
174 |
|
175 enum |
|
176 { |
|
177 /** |
|
178 * The collection id that originated the message (TInt) |
|
179 */ |
|
180 EMPXCustomMessageCollectionId=0x01, |
|
181 |
|
182 /** |
|
183 * TInt, a generic event type such as TMPXCollectionServerOp |
|
184 * The interpretation of this attribute depends on the collection plugin. |
|
185 * |
|
186 * For example, the Music DB plugin will return EMcsOpen, KErrOutOfDisk |
|
187 * if the plugin cannot merge the database because of low disk space |
|
188 */ |
|
189 EMPXCustomMessageEventType=0x02, |
|
190 |
|
191 /** |
|
192 * TInt, standard symbian error codes |
|
193 */ |
|
194 EMPXCustomMessageErrorCode=0x04 |
|
195 |
|
196 }; |
|
197 #endif // CMPXCOLLECTIONMESSAGEDEFS_H |
|
198 |
|
199 // End of file |