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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H
25 #define REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H
27 NONSHARABLE_CLASS(MRemConDatabaseUnawareMediaLibraryBrowseObserver)
31 This requests a list of the items present in a folder. No metadata is
32 requested, that can be retrieved separately on a per item basis.
34 The result should be returned via a call to
35 MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderListing(). And
36 the ordering should be as shown locally, but should list folders before
39 @param aScope The scope in which the folder listing is made.
40 This indicates which listing should be returned. If the scope is
41 EBrowseFolder then the contents of the current browsed
42 folder should be returned. If it is the ESearchResultFolder scope
43 then the contents of the folder populated by the last search
46 @param aStartItem The offset into the folder listing of the first item to
47 retrieve. If there is no media available at this offset the error
48 KErrMediaBrowseInvalidOffset should be returned via the result call
49 to MrcdumlbFolderListing().
51 @param aEndItem The offset into the folder listing of the final item to
52 retrieve. If this is beyond the end of the folder listing then the
53 items from the aStartItem offset to the end of the listing should
54 be returned via the result call to MrcdumlbFolderListing().
56 virtual void MrcdumlboGetFolderListing(TRemConFolderScope aScope,
61 Requests a specific item which may be a folder item or a media element
64 If it returns KErrNone the client must return the metadata for the
65 requested item through the response function either
66 MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderItemResult()
68 MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbMediaElementItemResult()
69 according to the item type which is a folder item or media element item.
70 If it is unable to process this call then it can return error but not
71 call the response function.
73 @param aScope The scope in which the item is present. If the scope is
74 EBrowseFolder then the item is present in the media library's
75 virtual filesystem. If it is the ESearchResultFolder scope then the
76 item is present in the current set of search results.
78 @param aItemId The UID for the requested Item.
80 @param aIter An iterator for TMediaAttributeIds containing a list of
81 TMediaAttributeIds requested by the controller. It is intended for
82 the media element item, so omit it if the item is a folder item.
84 @return The call back result.
85 - KErrNone If success.
86 - The appropriate error code.
88 virtual TInt MrcdumlboGetItem(TRemConFolderScope aScope,
89 const TRemConItemUid& aItemId,
90 TMediaAttributeIter& aIter) = 0;
93 This requests that the current position within the folder heirarchy is
94 moved to the next folder up.
96 The result of this operation must be returned via a call to
97 MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderUpResult().
99 virtual void MrcdumlboFolderUp() = 0;
102 This requests that the current position within the folder hierarchy is
103 moved to the child folder of the current folder specified by aFolder.
105 The result of this operation must be returned via a call to
106 MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderDownResult().
108 @param aFolder The child folder to change into.
110 virtual void MrcdumlboFolderDown(const TRemConItemUid& aFolder) = 0;
113 This requests the current path.
115 The client is responsible for appending items to the array then call
116 MrcdumlbGetPathResult() when completed. Once the item is appended in the
117 array the ownership of the item is taken so the client should keep the
118 item valid and never destroy the item. If the client can append the items
119 successfully then it must return a result via MrcdumlbGetPathResult().
120 If the client appends some items to the array but then fails to append all
121 the items then it must return an error via MrcdumlbGetPathResult().
123 @see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbGetPathResult()
125 @param aPath The current path.
126 Each entry in the array in one level of the path. For example the
127 path /A/B/C would be provided as:
131 All string are in UTF-8.
133 virtual void MrcdumlboGetPath(RPointerArray<HBufC8>& aPath) = 0;
136 Perform a search in the current location for items
137 matching the search string.
139 @param aSearch The string to search on in UTF-8. The client can use it until
140 the client has called MrcdumlbSearchResult().
142 @see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbSearchResult()
144 virtual void MrcdumlboSearch(const TDesC8& aSearch) = 0;
147 #endif //REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H