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 REMCONTRACKINFOCONTROLLER_H
23 #define REMCONTRACKINFOCONTROLLER_H
26 #include <remcon/remconinterfacebase.h>
27 #include <remcon/remconinterfaceif.h>
29 class MRemConTrackInfoControllerObserver;
30 class CRemConInterfaceSelector;
33 Client-instantiable type supporting sending TrackInfo API commands.
35 NONSHARABLE_CLASS(CRemConTrackInfoController) : 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 CRemConTrackInfoController, owned by the interface selector.
46 IMPORT_C static CRemConTrackInfoController* NewL(CRemConInterfaceSelector& aInterfaceSelector,
47 MRemConTrackInfoControllerObserver& aObserver);
50 IMPORT_C ~CRemConTrackInfoController();
54 Sends a 'set track name' command.
55 Only one command per controller 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 aNumRemotes On success, will contain the number of remotes the
60 @panic USER 23, if the length of aTrackName is greater than 58 Characters.
62 IMPORT_C void SetTrackName(TRequestStatus& aStatus, const TDesC& aTrackName, TUint& aNumRemotes);
65 The following section of code is included to allow internal back to back
66 testing of this component within Symbian Software Ltd. It will only be
67 compiled in specially configured test builds. It will never be available
68 in any release and so should never be used outside of Symbian owned test
71 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
73 This method is only available in specially configured test builds and will
74 not be found in any released code.
76 IMPORT_C void GetTrackName(TRequestStatus& aStatus, TUint& aNumRemotes);
79 This method is only available in specially configured test builds and will
80 not be found in any released code.
82 IMPORT_C void GetArtist(TRequestStatus& aStatus, TUint& aNumRemotes);
85 This method is only available in specially configured test builds and will
86 not be found in any released code.
88 IMPORT_C void GetTrackDuration(TRequestStatus& aStatus, TUint& aNumRemotes);
92 This method is only available in specially configured test builds and will
93 not be found in any released code.
95 void HandleGetTrackNameResponse(TInt aError, const TDesC8& aData);
98 This method is only available in specially configured test builds and will
99 not be found in any released code.
101 void HandleGetArtistResponse(TInt aError, const TDesC8& aData);
104 This method is only available in specially configured test builds and will
105 not be found in any released code.
107 void HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData);
108 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
113 @param aInterfaceSelector The interface selector.
114 @param aObserver The observer of this interface.
116 CRemConTrackInfoController(CRemConInterfaceSelector& aInterfaceSelector,
117 MRemConTrackInfoControllerObserver& aObserver);
119 private: // from CRemConInterfaceBase
120 TAny* GetInterfaceIf(TUid aUid);
122 private: // from MRemConInterfaceIf
123 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
126 MRemConTrackInfoControllerObserver& iObserver;
129 TBuf8<KMaxName> iOutData;
132 #endif // REMCONTRACKINFOCONTROLLER_H