epoc32/include/remcontrackinfocontroller.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @publishedAll
    19  @released
    20 */
    21 
    22 #ifndef REMCONTRACKINFOCONTROLLER_H
    23 #define REMCONTRACKINFOCONTROLLER_H
    24 
    25 #include <e32base.h>
    26 #include <remcon/remconinterfacebase.h>
    27 #include <remcon/remconinterfaceif.h>
    28 
    29 class MRemConTrackInfoControllerObserver;
    30 class CRemConInterfaceSelector;
    31 
    32 /**
    33 Client-instantiable type supporting sending TrackInfo API commands.
    34 */
    35 NONSHARABLE_CLASS(CRemConTrackInfoController) : public CRemConInterfaceBase, 
    36 								       	        public MRemConInterfaceIf
    37 	{
    38 public:
    39 	/**
    40 	Factory function.
    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.
    45 	*/
    46 	IMPORT_C static CRemConTrackInfoController* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    47 		MRemConTrackInfoControllerObserver& aObserver);
    48 	
    49 	/** Destructor. */
    50 	IMPORT_C ~CRemConTrackInfoController();
    51 
    52 public:
    53 	/** 
    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 
    59 	command was sent to.
    60 	@panic USER 23, if the length of aTrackName is greater than 58 Characters.
    61 	*/
    62 	IMPORT_C void SetTrackName(TRequestStatus& aStatus, const TDesC& aTrackName, TUint& aNumRemotes);
    63 
    64 /**
    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 
    69 code.
    70 */
    71 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
    72 	/**
    73 	This method is only available in specially configured test builds and will 
    74 	not be found in any released code.
    75 	*/
    76 	IMPORT_C void GetTrackName(TRequestStatus& aStatus, TUint& aNumRemotes);
    77 	
    78 	/**
    79 	This method is only available in specially configured test builds and will 
    80 	not be found in any released code.
    81 	*/	
    82 	IMPORT_C void GetArtist(TRequestStatus& aStatus, TUint& aNumRemotes);
    83 	
    84 	/**
    85 	This method is only available in specially configured test builds and will 
    86 	not be found in any released code.
    87 	*/
    88 	IMPORT_C void GetTrackDuration(TRequestStatus& aStatus, TUint& aNumRemotes);
    89 	
    90 private:
    91 	/**
    92 	This method is only available in specially configured test builds and will 
    93 	not be found in any released code.
    94 	*/
    95 	void HandleGetTrackNameResponse(TInt aError, const TDesC8& aData);
    96 	
    97 	/**
    98 	This method is only available in specially configured test builds and will 
    99 	not be found in any released code.
   100 	*/
   101 	void HandleGetArtistResponse(TInt aError, const TDesC8& aData);
   102 	
   103 	/**
   104 	This method is only available in specially configured test builds and will 
   105 	not be found in any released code.
   106 	*/
   107 	void HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData);	
   108 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
   109 
   110 private:
   111 	/** 
   112 	Constructor.
   113 	@param aInterfaceSelector The interface selector.
   114 	@param aObserver The observer of this interface.
   115 	*/
   116 	CRemConTrackInfoController(CRemConInterfaceSelector& aInterfaceSelector, 
   117 		MRemConTrackInfoControllerObserver& aObserver);
   118 
   119 private: // from CRemConInterfaceBase
   120 	TAny* GetInterfaceIf(TUid aUid);
   121 
   122 private: // from MRemConInterfaceIf
   123 	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
   124 
   125 private: // unowned
   126 	MRemConTrackInfoControllerObserver& iObserver;
   127 
   128 private: // owned
   129 	TBuf8<KMaxName> iOutData;
   130 	};
   131 
   132 #endif // REMCONTRACKINFOCONTROLLER_H