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 REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H
25 #define REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H
27 NONSHARABLE_CLASS(MRemConDatabaseAwareNowPlayingBrowseObserver)
31 Requests a listing of the items present in the Now Playing folder. If the
32 media player does not natively support a Now Plyaing folder the client
33 shall return a listing of one item which is the currently playing media
36 No metadata is requested, that can be retrieved separately on a per item
37 basis. Trying this out for now as it fits in with the existing metadata
38 attribute collection, and means that we would also separate out the
39 listing from the metadata. This means that we can retrieve a NowPlaying
40 list and then request the metadata from the observer.
42 The result shall be returned via a call to
43 MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbFolderListing()
45 @param aStartItem The offset into the folder listing of the first item to
46 retrieve. If there is no media available at this offset the error
47 KErrMediaBrowseInvalidOffset shall be returned via the result call
48 to MrcdanpbFolderListing().
50 @param aEndItem The offset into the folder listing of the final item to
51 retrieve. If this is beyond the end of the folder listing then the
52 items from the aStartItem offset to the end of the listing shall
53 be returned via the result call to MrcdanpbFolderListing().
55 virtual void MrcdanpboGetFolderListing(TUint aStartItem,
59 Requests a set of metadata corresponding to a specific media element item.
61 The client must return the metadata for the requested item via using
62 MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbMediaElementItemResult() if
63 it returns KErrNone, if it is unable to to process this call then it can
64 return error but not call the response function
65 MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbMediaElementItemResult().
67 @param aItemId The UID for the requested media element item.
69 @param aIter An iterator for TMediaAttributeIds containing a list of
70 TMediaAttributeIds requested by the controller.
72 @param aMediaLibraryStateCookie The cookie which the remote device
73 believes refers to the current state of the media library. If this
74 does not match the current state according to the client then the
75 client should call MrcdanpbMediaElementItemResult() with the error
76 KErrInvalidMediaLibraryStateCookie.
78 @return The call back result.
79 - KErrNone If success.
80 - The appropriate error code.
82 virtual TInt MrcdanpboGetItem(const TRemConItemUid& aItemId,
83 TMediaAttributeIter& aIter,
84 TUint16 aMediaLibraryStateCookie) = 0;
87 #endif //REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H