|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
|
23 |
|
24 #include <remcondatabaseawaremedialibrarybrowse.h> |
|
25 |
|
26 /** |
|
27 Called by the client in response to a MrcdamlboGetFolderListing() call. |
|
28 |
|
29 @param aFolderListing A listing of the items that are |
|
30 in the range requested by the MrcdamlboGetFolderListing() call. |
|
31 |
|
32 @param aMediaLibraryStateCookie The current value of the state cookie. |
|
33 |
|
34 @param aResult The result of the MrcdamlboGetFolderListing() operation. |
|
35 - KErrNone if the operation was successful. |
|
36 - KErrMediaBrowseInvalidOffset if there is no media available at the |
|
37 offset of the start item, i.e. the start of range provided via |
|
38 MrcdamlboGetFolderListing() is not valid. |
|
39 - System wide error code otherwise. |
|
40 */ |
|
41 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderListing( |
|
42 const TArray<TRemConItem>& aFolderListing, |
|
43 TUint16 aMediaLibraryStateCookie, |
|
44 TUint aResult) |
|
45 { |
|
46 MrcdamlbDoFolderListing(aFolderListing, aMediaLibraryStateCookie, aResult); |
|
47 } |
|
48 |
|
49 /** |
|
50 Called by the client in response to a MrcdamlboFolderUp call. |
|
51 |
|
52 @param aItemCount The number of items present in this folder. |
|
53 @param aResult The result of the MrcdamlboFolderUp operation. |
|
54 - KErrNone if the operation was successful. |
|
55 - KErrInvalidMediaLibraryStateCookie if the media library state cookie |
|
56 provided does not match the client's state cookie |
|
57 - System wide error code otherwise. |
|
58 */ |
|
59 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderUpResult( |
|
60 TUint aItemCount, TInt aResult) |
|
61 { |
|
62 MrcdamlbDoFolderUpResult(aItemCount, aResult); |
|
63 } |
|
64 |
|
65 /** |
|
66 Called by the client in response to a MrcdamlboFolderDown() call. |
|
67 |
|
68 @param aItemCount The number of items present in this folder. |
|
69 |
|
70 @param aResult The result of the MrcdamlboFolderDown() operation |
|
71 - KErrNone if the operation was successful. |
|
72 - KErrInvalidMediaLibraryStateCookie if the media library state cookie |
|
73 provided does not match the client's state cookie |
|
74 - KErrMediaBrowseInvalidDirection if the folder provided is not a valid |
|
75 folder e.g. path A/B/C, the current dirctory is B, and the param |
|
76 provided with MrcdamlboFolderDown()is A, obviously you can not change |
|
77 folder down to A, so A is invalid. |
|
78 - KErrMediaBrowseNotADirectory if the UID provided does not refer to a |
|
79 folder item, e.g. it is a media element. |
|
80 - KErrInvalidUid if the UID provided is invalid. |
|
81 - System wide error code otherwise. |
|
82 */ |
|
83 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderDownResult( |
|
84 TUint aItemCount, TInt aResult) |
|
85 { |
|
86 MrcdamlbDoFolderDownResult(aItemCount, aResult); |
|
87 } |
|
88 |
|
89 /** |
|
90 Called by the client in response to a MrcdamlboGetPath() call. |
|
91 |
|
92 @param aItemCount The number of items present in this folder. |
|
93 |
|
94 @param aMediaLibraryStateCookie The current value of the state cookie. |
|
95 |
|
96 @param aResult The result of the MrcdamlboGetPath() operation |
|
97 - KErrNone if the operation is successful. |
|
98 - System wide error code otherwise. |
|
99 */ |
|
100 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbGetPathResult( |
|
101 TUint aItemCount, |
|
102 TUint16 aMediaLibraryStateCookie, |
|
103 TInt aResult) |
|
104 { |
|
105 MrcdamlbDoGetPathResult(aItemCount, aMediaLibraryStateCookie, aResult); |
|
106 } |
|
107 |
|
108 /** |
|
109 Called by the client in response to a MrcdamlboSearch() call to indicate |
|
110 that a search has completed. |
|
111 |
|
112 @param aNumberItemsFound The number of items found by the search. |
|
113 @param aMediaLibraryStateCookie The current of the state cookie. |
|
114 @param aResult The result of the search. |
|
115 - KErrNone if the search completed successfully |
|
116 - System wide error otherwise. |
|
117 */ |
|
118 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbSearchResult( |
|
119 TUint aNumberItemsFound, |
|
120 TUint16 aMediaLibraryStateCookie, |
|
121 TInt aResult) |
|
122 { |
|
123 MrcdamlbDoSearchResult(aNumberItemsFound, aMediaLibraryStateCookie, aResult); |
|
124 } |
|
125 |
|
126 /** |
|
127 Called by the client in the case that the state of the media library has |
|
128 changed. This means that the media library state cookie provided prior to |
|
129 this call by the client may no longer be valid. Typical causes for this |
|
130 would be items added or removed from the media library. |
|
131 |
|
132 This function shall be called by any client any time it believes that media |
|
133 library state cookie has ceased to be valid, for example if the current |
|
134 directory is on removable media, and that media has been removed. |
|
135 That includes clients that are only able to offer state cookie that are |
|
136 limited to one directory. |
|
137 |
|
138 @param aMediaLibraryStateCookie The current value of the state cookie which |
|
139 enables state mismatches between the client and the remote controller |
|
140 device to be detected. |
|
141 */ |
|
142 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbMediaLibraryStateChange( |
|
143 TUint16 aMediaLibraryStateCookie) |
|
144 { |
|
145 MrcdamlbDoMediaLibraryStateChange(aMediaLibraryStateCookie); |
|
146 } |
|
147 |
|
148 /** |
|
149 Called by the client in response to MrcdamlboGetItem() call in the case the |
|
150 requested item is a folder item. |
|
151 |
|
152 @param aFolderID The folder UID. |
|
153 @param aFolderName The folder name. Takes a copy of it. |
|
154 @param aFolderType The folder type. |
|
155 @param aPlayable Indicaties whether the folder is playable |
|
156 - KFolderNotPlayable the folder can not be played |
|
157 - KFolderPlayable the folder can be played |
|
158 @param aAttributes The attributes of the folder item requested by |
|
159 MrcdamlboGetItem() |
|
160 @param aResult The result of the MrcdamlboGetItem() operation. |
|
161 - KErrNone if the operation was successful. |
|
162 - KErrInvalidMediaLibraryStateCookie if the media library state cookie |
|
163 provided does not match the client's state cookie. |
|
164 - KErrInvalidUid if the uid of the item requested is invalid, |
|
165 e.g. the client removed the item before the request |
|
166 MrcdamlboGetItem() coming. |
|
167 - System wide error code otherwise. |
|
168 */ |
|
169 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderItemResult( |
|
170 const TRemConItemUid& aFolderID, |
|
171 const TDesC8& aFolderName, |
|
172 TFolderItemType aFolderType, |
|
173 TFolderItemPlayable aPlayable, |
|
174 const TArray<TMediaElementAttribute>& aAttributes, |
|
175 TInt aResult) |
|
176 { |
|
177 MrcdamlbDoFolderItemResult(aFolderID, aFolderName, aFolderType, aPlayable, aAttributes, aResult); |
|
178 } |
|
179 |
|
180 /** |
|
181 Called by the client in response to MrcdamlboGetItem() call in the case the |
|
182 requested item is a media element item. |
|
183 |
|
184 @param aMediaID The media element UID. |
|
185 @param aMediaName The media name. Takes a copy of it. |
|
186 @param aMediaType The media type. |
|
187 @param aAttributes The attributes list. Takes a copy of it. |
|
188 @param aResult The result of the MrcdamlboGetItem() operation. |
|
189 - KErrNone if the operation was successful. |
|
190 - KErrInvalidMediaLibraryStateCookie if the media library state cookie |
|
191 provided does not match the client's state cookie. |
|
192 - KErrInvalidUid if the uid of the item requested is invalid, |
|
193 e.g. the client removed the item before the request |
|
194 MrcdamlboGetItem() coming. |
|
195 - System wide error code otherwise. |
|
196 */ |
|
197 EXPORT_C void MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbMediaElementItemResult( |
|
198 const TRemConItemUid& aMediaID, |
|
199 const TDesC8& aMediaName, |
|
200 TMediaItemType aMediaType, |
|
201 const TArray<TMediaElementAttribute>& aAttributes, |
|
202 TInt aResult) |
|
203 { |
|
204 MrcdamlbDoMediaElementItemResult(aMediaID, aMediaName, aMediaType, aAttributes,aResult); |
|
205 } |