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 REMCONTRACKINFOCONTROLLER_H
25 #define REMCONTRACKINFOCONTROLLER_H
28 #include <remcon/remconinterfacebase.h>
29 #include <remcon/remconinterfaceif.h>
31 class MRemConTrackInfoControllerObserver;
32 class CRemConInterfaceSelector;
35 Client-instantiable type supporting sending TrackInfo API commands.
37 NONSHARABLE_CLASS(CRemConTrackInfoController) : 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 CRemConTrackInfoController, owned by the interface selector.
48 IMPORT_C static CRemConTrackInfoController* NewL(CRemConInterfaceSelector& aInterfaceSelector,
49 MRemConTrackInfoControllerObserver& aObserver);
52 IMPORT_C ~CRemConTrackInfoController();
56 Sends a 'set track name' command.
57 Only one command per controller 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 aNumRemotes On success, will contain the number of remotes the
62 @panic USER 23, if the length of aTrackName is greater than 58 Characters.
64 IMPORT_C void SetTrackName(TRequestStatus& aStatus, const TDesC& aTrackName, TUint& aNumRemotes);
67 The following section of code is included to allow internal back to back
68 testing of this component within Symbian Software Ltd. It will only be
69 compiled in specially configured test builds. It will never be available
70 in any release and so should never be used outside of Symbian owned test
73 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
75 This method is only available in specially configured test builds and will
76 not be found in any released code.
79 IMPORT_C void GetTrackName(TRequestStatus& aStatus, TUint& aNumRemotes);
82 This method is only available in specially configured test builds and will
83 not be found in any released code.
86 IMPORT_C void GetArtist(TRequestStatus& aStatus, TUint& aNumRemotes);
89 This method is only available in specially configured test builds and will
90 not be found in any released code.
93 IMPORT_C void GetTrackDuration(TRequestStatus& aStatus, TUint& aNumRemotes);
97 This method is only available in specially configured test builds and will
98 not be found in any released code.
100 void HandleGetTrackNameResponse(TInt aError, const TDesC8& aData);
103 This method is only available in specially configured test builds and will
104 not be found in any released code.
106 void HandleGetArtistResponse(TInt aError, const TDesC8& aData);
109 This method is only available in specially configured test builds and will
110 not be found in any released code.
112 void HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData);
113 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
118 @param aInterfaceSelector The interface selector.
119 @param aObserver The observer of this interface.
121 CRemConTrackInfoController(CRemConInterfaceSelector& aInterfaceSelector,
122 MRemConTrackInfoControllerObserver& aObserver);
124 private: // from CRemConInterfaceBase
125 TAny* GetInterfaceIf(TUid aUid);
127 private: // from MRemConInterfaceIf
128 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
131 MRemConTrackInfoControllerObserver& iObserver;
134 TBuf8<KMaxName> iOutData;
137 #endif // REMCONTRACKINFOCONTROLLER_H