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@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.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: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef REMCONTRACKINFOTARGET_H williamr@2: #define REMCONTRACKINFOTARGET_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class MRemConTrackInfoTargetObserver; williamr@2: class CRemConInterfaceSelector; williamr@2: williamr@2: /** williamr@2: Client-instantiable type supporting sending TrackInfo API responses. williamr@2: */ williamr@2: NONSHARABLE_CLASS(CRemConTrackInfoTarget) : 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 CRemConTrackInfoTarget, owned by the interface selector. williamr@2: */ williamr@2: IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, williamr@2: MRemConTrackInfoTargetObserver& aObserver); williamr@2: williamr@2: /** Destructor. */ williamr@2: IMPORT_C ~CRemConTrackInfoTarget(); williamr@2: williamr@2: public: williamr@2: /** williamr@2: Sends a response to a 'get track name' command. williamr@2: Only one response per target 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 aError The response error. williamr@2: @panic USER 23, if the length of aTrackName is greater than 58 Characters. williamr@2: */ williamr@2: IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus, williamr@2: const TDesC& aTrackName, williamr@2: TInt aError); williamr@2: williamr@2: /** williamr@2: Sends a response to a 'get artist' command. williamr@2: Only one response per target 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 aArtist The artist. williamr@2: @param aError The response error. williamr@2: @panic USER 23, if the length of aArtist is greater than 58 Characters. williamr@2: */ williamr@2: IMPORT_C void GetArtistResponse(TRequestStatus& aStatus, williamr@2: const TDesC& aArtist, williamr@2: TInt aError); williamr@2: williamr@2: /** williamr@2: Sends a response to a 'get track duration' command. williamr@2: Only one response per target 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 aDuration The duration. williamr@2: @param aError The response error. williamr@2: */ williamr@2: IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus, williamr@2: const TTime& aDuration, williamr@2: TInt aError); 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: */ williamr@2: IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus, williamr@2: TInt aError); 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 HandleSetTrackName(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: CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector, williamr@2: MRemConTrackInfoTargetObserver& 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: MRemConTrackInfoTargetObserver& iObserver; williamr@2: williamr@2: private: // owned williamr@2: // For operation-specific data. williamr@2: TBuf8 iOutData; williamr@2: williamr@2: // not used by this class, but required for calling RRemCon::Send ... williamr@2: TUint iNumRemotes; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // REMCONTRACKINFOTARGET_H