|
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 <e32base.h> |
|
25 #include <remconmediabrowsetypes.h> |
|
26 |
|
27 #ifndef REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H |
|
28 #define REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H |
|
29 |
|
30 NONSHARABLE_CLASS(MRemConDatabaseAwareMediaLibraryBrowseObserver) |
|
31 { |
|
32 public: |
|
33 /** |
|
34 This requests a list of the items present in a folder. No metadata is |
|
35 requested, that can be retrieved separately on a per item basis. |
|
36 |
|
37 The result should be returned via a call to |
|
38 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderListing(). And |
|
39 the ordering should be as shown locally, but should list folders before |
|
40 media element items. |
|
41 |
|
42 @param aScope The scope in which the folder listing is made. |
|
43 This indicates which listing should be returned. If the scope is |
|
44 EBrowseFolder then the contents of the current browsed folder |
|
45 should be returned. If it is the ESearchResultFolder scope then |
|
46 the contents of the folder populated by the last search should be |
|
47 returned. |
|
48 |
|
49 @param aStartItem The offset into the folder listing of the first item to |
|
50 retrieve. If there is no media available at this offset the error |
|
51 KErrMediaBrowseInvalidOffset should be returned via the result call |
|
52 to MrcdamlbFolderListing(). |
|
53 |
|
54 @param aEndItem The offset into the folder listing of the final item to |
|
55 retrieve. If this is beyond the end of the folder listing then the |
|
56 items from the aStartItem offset to the end of the listing should |
|
57 be returned via the result call to MrcdamlbFolderListing(). |
|
58 */ |
|
59 virtual void MrcdamlboGetFolderListing(TRemConFolderScope aScope, |
|
60 TUint aStartItem, |
|
61 TUint aEndItem) = 0; |
|
62 |
|
63 /** |
|
64 Requests a specific item which may be a folder item or a media element |
|
65 item. |
|
66 |
|
67 If it returns KErrNone the client must return the metadata for the |
|
68 requested item through the response function either |
|
69 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderItemResult() |
|
70 or |
|
71 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbMediaElementItemResult() |
|
72 according to the item type which is a folder item or media element item. |
|
73 If it is unable to process this call then it can return error but not |
|
74 call the response function. |
|
75 |
|
76 @param aScope The scope in which the item is present. If the scope is |
|
77 EBrowseFolder then the item is present in the media library's |
|
78 virtual filesystem. If it is the ESearchResultFolder scope then the |
|
79 item is present in the current set of search results. |
|
80 |
|
81 @param aItemId The UID for the requested Item. |
|
82 |
|
83 @param aIter An iterator for TMediaAttributeIds containing a list of |
|
84 TMediaAttributeIds requested by the controller. It is intended for |
|
85 the media element item, so omit it if the item is a folder item. |
|
86 |
|
87 @param aMediaLibraryStateCookie The cookie which the remote device |
|
88 believes refers to the current state of the media library. If this |
|
89 does not match the current state according to the client then the |
|
90 client shall call |
|
91 MrcdamlbFolderItemResult() or MrcdamlbMediaElementItemResult() to |
|
92 return the error KErrInvalidMediaLibraryStateCookie according it |
|
93 is a folder item or a media element item. |
|
94 @return The call back result. |
|
95 - KErrNone If success. |
|
96 - The appropriate error code. |
|
97 */ |
|
98 virtual TInt MrcdamlboGetItem(TRemConFolderScope aScope, |
|
99 const TRemConItemUid& aItemId, |
|
100 TMediaAttributeIter& aIter, |
|
101 TUint16 aMediaLibraryStateCookie) = 0; |
|
102 |
|
103 /** |
|
104 This requests that the current position within the folder heirarchy is |
|
105 moved to the next folder up. |
|
106 |
|
107 The result of this operation must be returned via a call to |
|
108 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderUpResult. |
|
109 |
|
110 @param aMediaLibraryStateCookie The cookie which the remote device |
|
111 believes refers to the current state of the media library. If this |
|
112 does not match the current state according to the client then the |
|
113 client should call |
|
114 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderUpResult with |
|
115 the error KErrInvalidMediaLibraryStateCookie. |
|
116 */ |
|
117 virtual void MrcdamlboFolderUp(TUint16 aMediaLibraryStateCookie) = 0; |
|
118 |
|
119 /** |
|
120 This requests that the current position within the folder hierarchy is |
|
121 moved to the child folder of the current folder specified by aFolder. |
|
122 |
|
123 The result of this operation must be returned via a call to |
|
124 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderDownResult. |
|
125 |
|
126 @param aFolder The child folder to change into. |
|
127 |
|
128 @param aMediaLibraryStateCookie The cookie which the remote device |
|
129 believes refers to the current state of the media library. If this |
|
130 does not match the current state according to the client then the |
|
131 client should call |
|
132 MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderDownResult() |
|
133 with the error KErrInvalidMediaLibraryStateCookie. |
|
134 */ |
|
135 virtual void MrcdamlboFolderDown(const TRemConItemUid& aFolder, |
|
136 TUint16 aMediaLibraryStateCookie) = 0; |
|
137 |
|
138 /** |
|
139 This requests the current path. |
|
140 |
|
141 The client is responsible for appending items to the array then call |
|
142 MrcdamlbGetPathResult() when completed. Once the item is appended in the |
|
143 array the ownership of the item is taken so the client should keep the |
|
144 item valid and never destroy the item. If the client can append the items |
|
145 successfully then it should return a result via MrcdamlbGetPathResult(). |
|
146 If the client appends some items to the array but then fails to append all |
|
147 the items then it should return an error via MrcdamlbGetPathResult(). |
|
148 |
|
149 @see MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbGetPathResult() |
|
150 |
|
151 @param aPath The current path. |
|
152 Each entry in the array in one level of the path. For example the |
|
153 path /A/B/C would be provided as: |
|
154 aPath[0] 'A' |
|
155 aPath[1] 'B' |
|
156 aPath[2] 'C' |
|
157 All string are in UTF-8. |
|
158 */ |
|
159 virtual void MrcdamlboGetPath(RPointerArray<HBufC8>& aPath) = 0; |
|
160 |
|
161 /** |
|
162 Perform a search in the current location for items |
|
163 matching the search string. |
|
164 |
|
165 @param aSearch The string to search on in UTF-8. The client can use it until |
|
166 the client has called MrcdamlbSearchResult(). |
|
167 |
|
168 @see MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbSearchResult() |
|
169 */ |
|
170 virtual void MrcdamlboSearch(const TDesC8& aSearch) = 0; |
|
171 }; |
|
172 |
|
173 |
|
174 #endif // REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H |