1.1 --- a/epoc32/include/remcontrackinfocontroller.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/remcontrackinfocontroller.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,137 @@
1.4 -remcontrackinfocontroller.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 REMCONTRACKINFOCONTROLLER_H
1.29 +#define REMCONTRACKINFOCONTROLLER_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 MRemConTrackInfoControllerObserver;
1.36 +class CRemConInterfaceSelector;
1.37 +
1.38 +/**
1.39 +Client-instantiable type supporting sending TrackInfo API commands.
1.40 +*/
1.41 +NONSHARABLE_CLASS(CRemConTrackInfoController) : 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 CRemConTrackInfoController, owned by the interface selector.
1.51 + */
1.52 + IMPORT_C static CRemConTrackInfoController* NewL(CRemConInterfaceSelector& aInterfaceSelector,
1.53 + MRemConTrackInfoControllerObserver& aObserver);
1.54 +
1.55 + /** Destructor. */
1.56 + IMPORT_C ~CRemConTrackInfoController();
1.57 +
1.58 +public:
1.59 + /**
1.60 + Sends a 'set track name' command.
1.61 + Only one command per controller 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 aNumRemotes On success, will contain the number of remotes the
1.65 + command was sent to.
1.66 + @panic USER 23, if the length of aTrackName is greater than 58 Characters.
1.67 + */
1.68 + IMPORT_C void SetTrackName(TRequestStatus& aStatus, const TDesC& aTrackName, TUint& aNumRemotes);
1.69 +
1.70 +/**
1.71 +The following section of code is included to allow internal back to back
1.72 +testing of this component within Symbian Software Ltd. It will only be
1.73 +compiled in specially configured test builds. It will never be available
1.74 +in any release and so should never be used outside of Symbian owned test
1.75 +code.
1.76 +*/
1.77 +#ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
1.78 + /**
1.79 + This method is only available in specially configured test builds and will
1.80 + not be found in any released code.
1.81 + @internalTechnology
1.82 + */
1.83 + IMPORT_C void GetTrackName(TRequestStatus& aStatus, TUint& aNumRemotes);
1.84 +
1.85 + /**
1.86 + This method is only available in specially configured test builds and will
1.87 + not be found in any released code.
1.88 + @internalTechnology
1.89 + */
1.90 + IMPORT_C void GetArtist(TRequestStatus& aStatus, TUint& aNumRemotes);
1.91 +
1.92 + /**
1.93 + This method is only available in specially configured test builds and will
1.94 + not be found in any released code.
1.95 + @internalTechnology
1.96 + */
1.97 + IMPORT_C void GetTrackDuration(TRequestStatus& aStatus, TUint& aNumRemotes);
1.98 +
1.99 +private:
1.100 + /**
1.101 + This method is only available in specially configured test builds and will
1.102 + not be found in any released code.
1.103 + */
1.104 + void HandleGetTrackNameResponse(TInt aError, const TDesC8& aData);
1.105 +
1.106 + /**
1.107 + This method is only available in specially configured test builds and will
1.108 + not be found in any released code.
1.109 + */
1.110 + void HandleGetArtistResponse(TInt aError, const TDesC8& aData);
1.111 +
1.112 + /**
1.113 + This method is only available in specially configured test builds and will
1.114 + not be found in any released code.
1.115 + */
1.116 + void HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData);
1.117 +#endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
1.118 +
1.119 +private:
1.120 + /**
1.121 + Constructor.
1.122 + @param aInterfaceSelector The interface selector.
1.123 + @param aObserver The observer of this interface.
1.124 + */
1.125 + CRemConTrackInfoController(CRemConInterfaceSelector& aInterfaceSelector,
1.126 + MRemConTrackInfoControllerObserver& aObserver);
1.127 +
1.128 +private: // from CRemConInterfaceBase
1.129 + TAny* GetInterfaceIf(TUid aUid);
1.130 +
1.131 +private: // from MRemConInterfaceIf
1.132 + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
1.133 +
1.134 +private: // unowned
1.135 + MRemConTrackInfoControllerObserver& iObserver;
1.136 +
1.137 +private: // owned
1.138 + TBuf8<KMaxName> iOutData;
1.139 + };
1.140 +
1.141 +#endif // REMCONTRACKINFOCONTROLLER_H