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 REMCONDATABASEAWARENOWPLAYINGTARGETOBSERVER_H
25 #define REMCONDATABASEAWARENOWPLAYINGTARGETOBSERVER_H
27 #include <remconmediabrowsetypes.h>
30 It is intended for the client which is database aware.
31 Clients must implement this interface in order to instantiate objects of type
32 CRemConDatabaseAwareNowPlayingTarget. This interface passes incoming commands
33 from RemCon to the client.
35 @see CRemConDatabaseAwareNowPlayingTarget
37 NONSHARABLE_CLASS(MRemConDatabaseAwareNowPlayingTargetObserver)
41 Requests to play an item.
43 @param aItem The item requested to play.
44 - If it does not refer to any valid item, the client must call
45 CRemConNowPlayingTargetBase::PlayItemResponse()
46 with the error KErrInvalidUid;
47 - If it refers to a directory which can not be handled by this media
48 player, the client must call
49 CRemConNowPlayingTargetBase::PlayItemResponse()
50 with the error KErrNowPlayingUidIsADirectory;
51 - If it is in use and can not be played, the client must call
52 CRemConNowPlayingTargetBase::PlayItemResponse()
53 with the error KErrNowPlayingMediaInUse;
55 @param aScope The scope in which the item was requested to play.
57 @param aMediaLibraryStateCookie The cookie which the remote device
58 believes refers to the current state of the media library. If this
59 does not match the current state according to the client then the
61 CRemConNowPlayingTargetBase::PlayItemResponse()
62 with the error KErrInvalidMediaLibraryStateCookie.
64 @see CRemConNowPlayingTargetBase::PlayItemResponse().
66 virtual void MrcdanptoPlayItem(const TRemConItemUid& aItem,
67 TRemConFolderScope aScope,
68 TUint16 aMediaLibraryStateCookie) = 0;
71 Requests to add an item to now playing list.
73 @param aItem The item requested to play.
74 - If it does not refer to any valid item, the client must call
75 CRemConNowPlayingTargetBase::AddToNowPlayingResponse()
76 with the error KErrInvalidUid;
77 - If it refers to a directory which can not be handled by this media
78 player, the client must call
79 CRemConNowPlayingTargetBase::AddToNowPlayingResponse()
80 with the error KErrNowPlayingUidIsADirectory;
81 - If it is in use and can not be added to now playing list, the
83 CRemConNowPlayingTargetBase::AddToNowPlayingResponse()
84 with the error KErrNowPlayingMediaInUse;
86 @param aScope The scope in which the item was requested to play.
88 @param aMediaLibraryStateCookie The cookie which the remote device
89 believes refers to the current state of the media library. If this
90 does not match the current state according to the client then the
92 CRemConNowPlayingTargetBase::PlayItemResponse()
93 with the error KErrInvalidMediaLibraryStateCookie.
95 @see CRemConNowPlayingTargetBase::AddToNowPlayingResponse().
97 virtual void MrcdanptoAddToNowPlaying(const TRemConItemUid& aItem,
98 TRemConFolderScope aScope,
99 TUint16 aMediaLibraryStateCookie) = 0;
103 #endif //REMCONDATABASEAWARENOWPLAYINGTARGETOBSERVER_H