1.1 --- a/epoc32/include/remcontrackinfotarget.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/remcontrackinfotarget.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,141 @@
1.4 -remcontrackinfotarget.h
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef REMCONTRACKINFOTARGET_H
1.29 +#define REMCONTRACKINFOTARGET_H
1.30 +
1.31 +#include <e32base.h>
1.32 +#include <remcon/remconinterfacebase.h>
1.33 +#include <remcon/remconinterfaceif.h>
1.34 +
1.35 +class MRemConTrackInfoTargetObserver;
1.36 +class CRemConInterfaceSelector;
1.37 +
1.38 +/**
1.39 +Client-instantiable type supporting sending TrackInfo API responses.
1.40 +*/
1.41 +NONSHARABLE_CLASS(CRemConTrackInfoTarget) : public CRemConInterfaceBase,
1.42 + public MRemConInterfaceIf
1.43 + {
1.44 +public:
1.45 + /**
1.46 + Factory function.
1.47 + @param aInterfaceSelector The interface selector. The client must have
1.48 + created one of these first.
1.49 + @param aObserver The observer of this interface.
1.50 + @return A new CRemConTrackInfoTarget, owned by the interface selector.
1.51 + */
1.52 + IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
1.53 + MRemConTrackInfoTargetObserver& aObserver);
1.54 +
1.55 + /** Destructor. */
1.56 + IMPORT_C ~CRemConTrackInfoTarget();
1.57 +
1.58 +public:
1.59 + /**
1.60 + Sends a response to a 'get track name' command.
1.61 + Only one response per target session can be outstanding at any one time.
1.62 + @param aStatus Used by RemCon to indicate completion of the send request.
1.63 + @param aTrackName The track name.
1.64 + @param aError The response error.
1.65 + @panic USER 23, if the length of aTrackName is greater than 58 Characters.
1.66 + */
1.67 + IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus,
1.68 + const TDesC& aTrackName,
1.69 + TInt aError);
1.70 +
1.71 + /**
1.72 + Sends a response to a 'get artist' command.
1.73 + Only one response per target session can be outstanding at any one time.
1.74 + @param aStatus Used by RemCon to indicate completion of the send request.
1.75 + @param aArtist The artist.
1.76 + @param aError The response error.
1.77 + @panic USER 23, if the length of aArtist is greater than 58 Characters.
1.78 + */
1.79 + IMPORT_C void GetArtistResponse(TRequestStatus& aStatus,
1.80 + const TDesC& aArtist,
1.81 + TInt aError);
1.82 +
1.83 + /**
1.84 + Sends a response to a 'get track duration' command.
1.85 + Only one response per target session can be outstanding at any one time.
1.86 + @param aStatus Used by RemCon to indicate completion of the send request.
1.87 + @param aDuration The duration.
1.88 + @param aError The response error.
1.89 + */
1.90 + IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus,
1.91 + const TTime& aDuration,
1.92 + TInt aError);
1.93 +
1.94 +/**
1.95 +The following section of code is included to allow internal back to back
1.96 +testing of this component within Symbian Software Ltd. It will only be
1.97 +compiled in specially configured test builds. It will never be available
1.98 +in any release and so should never be used outside of Symbian owned test
1.99 +code.
1.100 +*/
1.101 +#ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
1.102 + /**
1.103 + This method is only available in specially configured test builds and will
1.104 + not be found in any released code.
1.105 + @internalTechnology
1.106 + */
1.107 + IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
1.108 + TInt aError);
1.109 +
1.110 +private:
1.111 + /**
1.112 + This method is only available in specially configured test builds and will
1.113 + not be found in any released code.
1.114 + */
1.115 + void HandleSetTrackName(const TDesC8& aData);
1.116 +#endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
1.117 +
1.118 +private:
1.119 + /**
1.120 + Constructor.
1.121 + @param aInterfaceSelector The interface selector.
1.122 + @param aObserver The observer of this interface.
1.123 + */
1.124 + CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector,
1.125 + MRemConTrackInfoTargetObserver& aObserver);
1.126 +
1.127 +private: // from CRemConInterfaceBase
1.128 + TAny* GetInterfaceIf(TUid aUid);
1.129 +
1.130 +private: // from MRemConInterfaceIf
1.131 + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
1.132 +
1.133 +private: // unowned
1.134 + MRemConTrackInfoTargetObserver& iObserver;
1.135 +
1.136 +private: // owned
1.137 + // For operation-specific data.
1.138 + TBuf8<KMaxName> iOutData;
1.139 +
1.140 + // not used by this class, but required for calling RRemCon::Send ...
1.141 + TUint iNumRemotes;
1.142 +
1.143 + };
1.144 +
1.145 +#endif // REMCONTRACKINFOTARGET_H