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 "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.
22 #ifndef REMCONTRACKINFOTARGET_H
23 #define REMCONTRACKINFOTARGET_H
26 #include <remcon/remconinterfacebase.h>
27 #include <remcon/remconinterfaceif.h>
29 class MRemConTrackInfoTargetObserver;
30 class CRemConInterfaceSelector;
33 Client-instantiable type supporting sending TrackInfo API responses.
35 NONSHARABLE_CLASS(CRemConTrackInfoTarget) : public CRemConInterfaceBase,
36 public MRemConInterfaceIf
41 @param aInterfaceSelector The interface selector. The client must have
42 created one of these first.
43 @param aObserver The observer of this interface.
44 @return A new CRemConTrackInfoTarget, owned by the interface selector.
46 IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
47 MRemConTrackInfoTargetObserver& aObserver);
50 IMPORT_C ~CRemConTrackInfoTarget();
54 Sends a response to a 'get track name' command.
55 Only one response per target session can be outstanding at any one time.
56 @param aStatus Used by RemCon to indicate completion of the send request.
57 @param aTrackName The track name.
58 @param aError The response error.
59 @panic USER 23, if the length of aTrackName is greater than 58 Characters.
61 IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus,
62 const TDesC& aTrackName,
66 Sends a response to a 'get artist' command.
67 Only one response per target session can be outstanding at any one time.
68 @param aStatus Used by RemCon to indicate completion of the send request.
69 @param aArtist The artist.
70 @param aError The response error.
71 @panic USER 23, if the length of aArtist is greater than 58 Characters.
73 IMPORT_C void GetArtistResponse(TRequestStatus& aStatus,
78 Sends a response to a 'get track duration' command.
79 Only one response per target session can be outstanding at any one time.
80 @param aStatus Used by RemCon to indicate completion of the send request.
81 @param aDuration The duration.
82 @param aError The response error.
84 IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus,
85 const TTime& aDuration,
89 The following section of code is included to allow internal back to back
90 testing of this component within Symbian Software Ltd. It will only be
91 compiled in specially configured test builds. It will never be available
92 in any release and so should never be used outside of Symbian owned test
95 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
97 This method is only available in specially configured test builds and will
98 not be found in any released code.
100 IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
105 This method is only available in specially configured test builds and will
106 not be found in any released code.
108 void HandleSetTrackName(const TDesC8& aData);
109 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
114 @param aInterfaceSelector The interface selector.
115 @param aObserver The observer of this interface.
117 CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector,
118 MRemConTrackInfoTargetObserver& aObserver);
120 private: // from CRemConInterfaceBase
121 TAny* GetInterfaceIf(TUid aUid);
123 private: // from MRemConInterfaceIf
124 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
127 MRemConTrackInfoTargetObserver& iObserver;
130 // For operation-specific data.
131 TBuf8<KMaxName> iOutData;
133 // not used by this class, but required for calling RRemCon::Send ...
138 #endif // REMCONTRACKINFOTARGET_H