williamr@4: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // williamr@4: williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: williamr@4: #ifndef REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H williamr@4: #define REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H williamr@4: williamr@4: NONSHARABLE_CLASS(MRemConDatabaseUnawareMediaLibraryBrowseObserver) williamr@4: { williamr@4: public: williamr@4: /** williamr@4: This requests a list of the items present in a folder. No metadata is williamr@4: requested, that can be retrieved separately on a per item basis. williamr@4: williamr@4: The result should be returned via a call to williamr@4: MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderListing(). And williamr@4: the ordering should be as shown locally, but should list folders before williamr@4: media element items. williamr@4: williamr@4: @param aScope The scope in which the folder listing is made. williamr@4: This indicates which listing should be returned. If the scope is williamr@4: EBrowseFolder then the contents of the current browsed williamr@4: folder should be returned. If it is the ESearchResultFolder scope williamr@4: then the contents of the folder populated by the last search williamr@4: should be returned. williamr@4: williamr@4: @param aStartItem The offset into the folder listing of the first item to williamr@4: retrieve. If there is no media available at this offset the error williamr@4: KErrMediaBrowseInvalidOffset should be returned via the result call williamr@4: to MrcdumlbFolderListing(). williamr@4: williamr@4: @param aEndItem The offset into the folder listing of the final item to williamr@4: retrieve. If this is beyond the end of the folder listing then the williamr@4: items from the aStartItem offset to the end of the listing should williamr@4: be returned via the result call to MrcdumlbFolderListing(). williamr@4: */ williamr@4: virtual void MrcdumlboGetFolderListing(TRemConFolderScope aScope, williamr@4: TUint aStartItem, williamr@4: TUint aEndItem) = 0; williamr@4: williamr@4: /** williamr@4: Requests a specific item which may be a folder item or a media element williamr@4: item. williamr@4: williamr@4: If it returns KErrNone the client must return the metadata for the williamr@4: requested item through the response function either williamr@4: MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderItemResult() williamr@4: or williamr@4: MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbMediaElementItemResult() williamr@4: according to the item type which is a folder item or media element item. williamr@4: If it is unable to process this call then it can return error but not williamr@4: call the response function. williamr@4: williamr@4: @param aScope The scope in which the item is present. If the scope is williamr@4: EBrowseFolder then the item is present in the media library's williamr@4: virtual filesystem. If it is the ESearchResultFolder scope then the williamr@4: item is present in the current set of search results. williamr@4: williamr@4: @param aItemId The UID for the requested Item. williamr@4: williamr@4: @param aIter An iterator for TMediaAttributeIds containing a list of williamr@4: TMediaAttributeIds requested by the controller. It is intended for williamr@4: the media element item, so omit it if the item is a folder item. williamr@4: williamr@4: @return The call back result. williamr@4: - KErrNone If success. williamr@4: - The appropriate error code. williamr@4: */ williamr@4: virtual TInt MrcdumlboGetItem(TRemConFolderScope aScope, williamr@4: const TRemConItemUid& aItemId, williamr@4: TMediaAttributeIter& aIter) = 0; williamr@4: williamr@4: /** williamr@4: This requests that the current position within the folder heirarchy is williamr@4: moved to the next folder up. williamr@4: williamr@4: The result of this operation must be returned via a call to williamr@4: MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderUpResult(). williamr@4: */ williamr@4: virtual void MrcdumlboFolderUp() = 0; williamr@4: williamr@4: /** williamr@4: This requests that the current position within the folder hierarchy is williamr@4: moved to the child folder of the current folder specified by aFolder. williamr@4: williamr@4: The result of this operation must be returned via a call to williamr@4: MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderDownResult(). williamr@4: williamr@4: @param aFolder The child folder to change into. williamr@4: */ williamr@4: virtual void MrcdumlboFolderDown(const TRemConItemUid& aFolder) = 0; williamr@4: williamr@4: /** williamr@4: This requests the current path. williamr@4: williamr@4: The client is responsible for appending items to the array then call williamr@4: MrcdumlbGetPathResult() when completed. Once the item is appended in the williamr@4: array the ownership of the item is taken so the client should keep the williamr@4: item valid and never destroy the item. If the client can append the items williamr@4: successfully then it must return a result via MrcdumlbGetPathResult(). williamr@4: If the client appends some items to the array but then fails to append all williamr@4: the items then it must return an error via MrcdumlbGetPathResult(). williamr@4: williamr@4: @see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbGetPathResult() williamr@4: williamr@4: @param aPath The current path. williamr@4: Each entry in the array in one level of the path. For example the williamr@4: path /A/B/C would be provided as: williamr@4: aPath[0] 'A' williamr@4: aPath[1] 'B' williamr@4: aPath[2] 'C' williamr@4: All string are in UTF-8. williamr@4: */ williamr@4: virtual void MrcdumlboGetPath(RPointerArray& aPath) = 0; williamr@4: williamr@4: /** williamr@4: Perform a search in the current location for items williamr@4: matching the search string. williamr@4: williamr@4: @param aSearch The string to search on in UTF-8. The client can use it until williamr@4: the client has called MrcdumlbSearchResult(). williamr@4: williamr@4: @see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbSearchResult() williamr@4: */ williamr@4: virtual void MrcdumlboSearch(const TDesC8& aSearch) = 0; williamr@4: }; williamr@4: williamr@4: #endif //REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H