1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef REMCONTRACKINFOTARGET_H
25 #define REMCONTRACKINFOTARGET_H
28 #include <remcon/remconinterfacebase.h>
29 #include <remcon/remconinterfaceif.h>
31 class MRemConTrackInfoTargetObserver;
32 class CRemConInterfaceSelector;
35 Client-instantiable type supporting sending TrackInfo API responses.
37 NONSHARABLE_CLASS(CRemConTrackInfoTarget) : public CRemConInterfaceBase,
38 public MRemConInterfaceIf
43 @param aInterfaceSelector The interface selector. The client must have
44 created one of these first.
45 @param aObserver The observer of this interface.
46 @return A new CRemConTrackInfoTarget, owned by the interface selector.
48 IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
49 MRemConTrackInfoTargetObserver& aObserver);
52 IMPORT_C ~CRemConTrackInfoTarget();
56 Sends a response to a 'get track name' command.
57 Only one response per target session can be outstanding at any one time.
58 @param aStatus Used by RemCon to indicate completion of the send request.
59 @param aTrackName The track name.
60 @param aError The response error.
61 @panic USER 23, if the length of aTrackName is greater than 58 Characters.
63 IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus,
64 const TDesC& aTrackName,
68 Sends a response to a 'get artist' command.
69 Only one response per target session can be outstanding at any one time.
70 @param aStatus Used by RemCon to indicate completion of the send request.
71 @param aArtist The artist.
72 @param aError The response error.
73 @panic USER 23, if the length of aArtist is greater than 58 Characters.
75 IMPORT_C void GetArtistResponse(TRequestStatus& aStatus,
80 Sends a response to a 'get track duration' command.
81 Only one response per target session can be outstanding at any one time.
82 @param aStatus Used by RemCon to indicate completion of the send request.
83 @param aDuration The duration.
84 @param aError The response error.
86 IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus,
87 const TTime& aDuration,
91 The following section of code is included to allow internal back to back
92 testing of this component within Symbian Software Ltd. It will only be
93 compiled in specially configured test builds. It will never be available
94 in any release and so should never be used outside of Symbian owned test
97 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
99 This method is only available in specially configured test builds and will
100 not be found in any released code.
103 IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
108 This method is only available in specially configured test builds and will
109 not be found in any released code.
111 void HandleSetTrackName(const TDesC8& aData);
112 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
117 @param aInterfaceSelector The interface selector.
118 @param aObserver The observer of this interface.
120 CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector,
121 MRemConTrackInfoTargetObserver& aObserver);
123 private: // from CRemConInterfaceBase
124 TAny* GetInterfaceIf(TUid aUid);
126 private: // from MRemConInterfaceIf
127 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
130 MRemConTrackInfoTargetObserver& iObserver;
133 // For operation-specific data.
134 TBuf8<KMaxName> iOutData;
136 // not used by this class, but required for calling RRemCon::Send ...
141 #endif // REMCONTRACKINFOTARGET_H