williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef REMCONTRACKINFOCONTROLLER_H williamr@2: #define REMCONTRACKINFOCONTROLLER_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class MRemConTrackInfoControllerObserver; williamr@2: class CRemConInterfaceSelector; williamr@2: williamr@2: /** williamr@2: Client-instantiable type supporting sending TrackInfo API commands. williamr@2: */ williamr@2: NONSHARABLE_CLASS(CRemConTrackInfoController) : public CRemConInterfaceBase, williamr@2: public MRemConInterfaceIf williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Factory function. williamr@2: @param aInterfaceSelector The interface selector. The client must have williamr@2: created one of these first. williamr@2: @param aObserver The observer of this interface. williamr@2: @return A new CRemConTrackInfoController, owned by the interface selector. williamr@2: */ williamr@2: IMPORT_C static CRemConTrackInfoController* NewL(CRemConInterfaceSelector& aInterfaceSelector, williamr@2: MRemConTrackInfoControllerObserver& aObserver); williamr@2: williamr@2: /** Destructor. */ williamr@2: IMPORT_C ~CRemConTrackInfoController(); williamr@2: williamr@2: public: williamr@2: /** williamr@2: Sends a 'set track name' command. williamr@2: Only one command per controller session can be outstanding at any one time. williamr@2: @param aStatus Used by RemCon to indicate completion of the send request. williamr@2: @param aTrackName The track name. williamr@2: @param aNumRemotes On success, will contain the number of remotes the williamr@2: command was sent to. williamr@2: @panic USER 23, if the length of aTrackName is greater than 58 Characters. williamr@2: */ williamr@2: IMPORT_C void SetTrackName(TRequestStatus& aStatus, const TDesC& aTrackName, TUint& aNumRemotes); williamr@2: williamr@2: /** williamr@2: The following section of code is included to allow internal back to back williamr@2: testing of this component within Symbian Software Ltd. It will only be williamr@2: compiled in specially configured test builds. It will never be available williamr@2: in any release and so should never be used outside of Symbian owned test williamr@2: code. williamr@2: */ williamr@2: #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: @internalTechnology williamr@2: */ williamr@2: IMPORT_C void GetTrackName(TRequestStatus& aStatus, TUint& aNumRemotes); williamr@2: williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: @internalTechnology williamr@2: */ williamr@2: IMPORT_C void GetArtist(TRequestStatus& aStatus, TUint& aNumRemotes); williamr@2: williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: @internalTechnology williamr@2: */ williamr@2: IMPORT_C void GetTrackDuration(TRequestStatus& aStatus, TUint& aNumRemotes); williamr@2: williamr@2: private: williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: */ williamr@2: void HandleGetTrackNameResponse(TInt aError, const TDesC8& aData); williamr@2: williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: */ williamr@2: void HandleGetArtistResponse(TInt aError, const TDesC8& aData); williamr@2: williamr@2: /** williamr@2: This method is only available in specially configured test builds and will williamr@2: not be found in any released code. williamr@2: */ williamr@2: void HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData); williamr@2: #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT williamr@2: williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: @param aInterfaceSelector The interface selector. williamr@2: @param aObserver The observer of this interface. williamr@2: */ williamr@2: CRemConTrackInfoController(CRemConInterfaceSelector& aInterfaceSelector, williamr@2: MRemConTrackInfoControllerObserver& aObserver); williamr@2: williamr@2: private: // from CRemConInterfaceBase williamr@2: TAny* GetInterfaceIf(TUid aUid); williamr@2: williamr@2: private: // from MRemConInterfaceIf williamr@2: void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); williamr@2: williamr@2: private: // unowned williamr@2: MRemConTrackInfoControllerObserver& iObserver; williamr@2: williamr@2: private: // owned williamr@2: TBuf8 iOutData; williamr@2: }; williamr@2: williamr@2: #endif // REMCONTRACKINFOCONTROLLER_H