williamr@4
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
//
|
williamr@4
|
15 |
|
williamr@4
|
16 |
|
williamr@4
|
17 |
|
williamr@4
|
18 |
/**
|
williamr@4
|
19 |
@file
|
williamr@4
|
20 |
@publishedAll
|
williamr@4
|
21 |
@released
|
williamr@4
|
22 |
*/
|
williamr@4
|
23 |
|
williamr@4
|
24 |
#ifndef REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H
|
williamr@4
|
25 |
#define REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H
|
williamr@4
|
26 |
|
williamr@4
|
27 |
NONSHARABLE_CLASS(MRemConDatabaseAwareNowPlayingBrowseObserver)
|
williamr@4
|
28 |
{
|
williamr@4
|
29 |
public:
|
williamr@4
|
30 |
/**
|
williamr@4
|
31 |
Requests a listing of the items present in the Now Playing folder. If the
|
williamr@4
|
32 |
media player does not natively support a Now Plyaing folder the client
|
williamr@4
|
33 |
shall return a listing of one item which is the currently playing media
|
williamr@4
|
34 |
element.
|
williamr@4
|
35 |
|
williamr@4
|
36 |
No metadata is requested, that can be retrieved separately on a per item
|
williamr@4
|
37 |
basis. Trying this out for now as it fits in with the existing metadata
|
williamr@4
|
38 |
attribute collection, and means that we would also separate out the
|
williamr@4
|
39 |
listing from the metadata. This means that we can retrieve a NowPlaying
|
williamr@4
|
40 |
list and then request the metadata from the observer.
|
williamr@4
|
41 |
|
williamr@4
|
42 |
The result shall be returned via a call to
|
williamr@4
|
43 |
MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbFolderListing()
|
williamr@4
|
44 |
|
williamr@4
|
45 |
@param aStartItem The offset into the folder listing of the first item to
|
williamr@4
|
46 |
retrieve. If there is no media available at this offset the error
|
williamr@4
|
47 |
KErrMediaBrowseInvalidOffset shall be returned via the result call
|
williamr@4
|
48 |
to MrcdanpbFolderListing().
|
williamr@4
|
49 |
|
williamr@4
|
50 |
@param aEndItem The offset into the folder listing of the final item to
|
williamr@4
|
51 |
retrieve. If this is beyond the end of the folder listing then the
|
williamr@4
|
52 |
items from the aStartItem offset to the end of the listing shall
|
williamr@4
|
53 |
be returned via the result call to MrcdanpbFolderListing().
|
williamr@4
|
54 |
*/
|
williamr@4
|
55 |
virtual void MrcdanpboGetFolderListing(TUint aStartItem,
|
williamr@4
|
56 |
TUint aEndItem) = 0;
|
williamr@4
|
57 |
|
williamr@4
|
58 |
/**
|
williamr@4
|
59 |
Requests a set of metadata corresponding to a specific media element item.
|
williamr@4
|
60 |
|
williamr@4
|
61 |
The client must return the metadata for the requested item via using
|
williamr@4
|
62 |
MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbMediaElementItemResult() if
|
williamr@4
|
63 |
it returns KErrNone, if it is unable to to process this call then it can
|
williamr@4
|
64 |
return error but not call the response function
|
williamr@4
|
65 |
MRemConDatabaseAwareNowPlayingBrowse::MrcdanpbMediaElementItemResult().
|
williamr@4
|
66 |
|
williamr@4
|
67 |
@param aItemId The UID for the requested media element item.
|
williamr@4
|
68 |
|
williamr@4
|
69 |
@param aIter An iterator for TMediaAttributeIds containing a list of
|
williamr@4
|
70 |
TMediaAttributeIds requested by the controller.
|
williamr@4
|
71 |
|
williamr@4
|
72 |
@param aMediaLibraryStateCookie The cookie which the remote device
|
williamr@4
|
73 |
believes refers to the current state of the media library. If this
|
williamr@4
|
74 |
does not match the current state according to the client then the
|
williamr@4
|
75 |
client should call MrcdanpbMediaElementItemResult() with the error
|
williamr@4
|
76 |
KErrInvalidMediaLibraryStateCookie.
|
williamr@4
|
77 |
|
williamr@4
|
78 |
@return The call back result.
|
williamr@4
|
79 |
- KErrNone If success.
|
williamr@4
|
80 |
- The appropriate error code.
|
williamr@4
|
81 |
*/
|
williamr@4
|
82 |
virtual TInt MrcdanpboGetItem(const TRemConItemUid& aItemId,
|
williamr@4
|
83 |
TMediaAttributeIter& aIter,
|
williamr@4
|
84 |
TUint16 aMediaLibraryStateCookie) = 0;
|
williamr@4
|
85 |
};
|
williamr@4
|
86 |
|
williamr@4
|
87 |
#endif //REMCONDATABASEAWARENOWPLAYINGBROWSEOBSERVER_H
|