epoc32/include/remcontrackinfotarget.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 REMCONTRACKINFOTARGET_H
    23 #define REMCONTRACKINFOTARGET_H
    24 
    25 #include <e32base.h>
    26 #include <remcon/remconinterfacebase.h>
    27 #include <remcon/remconinterfaceif.h>
    28 
    29 class MRemConTrackInfoTargetObserver;
    30 class CRemConInterfaceSelector;
    31 
    32 /**
    33 Client-instantiable type supporting sending TrackInfo API responses.
    34 */
    35 NONSHARABLE_CLASS(CRemConTrackInfoTarget) : 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 CRemConTrackInfoTarget, owned by the interface selector.
    45 	*/
    46 	IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    47 		MRemConTrackInfoTargetObserver& aObserver);
    48 	
    49 	/** Destructor. */
    50 	IMPORT_C ~CRemConTrackInfoTarget();
    51 
    52 public:
    53 	/**
    54 	Sends a response to a 'get track name' command.
    55 	Only one response per target 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 aError The response error.
    59 	@panic USER 23, if the length of aTrackName is greater than 58 Characters. 
    60 	*/
    61 	IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus, 
    62 		const TDesC& aTrackName, 
    63 		TInt aError);
    64 
    65 	/**
    66 	Sends a response to a 'get artist' command.
    67 	Only one response per target session can be outstanding at any one time.
    68 	@param aStatus Used by RemCon to indicate completion of the send request.
    69 	@param aArtist The artist.
    70 	@param aError The response error.
    71 	@panic USER 23, if the length of aArtist is greater than 58 Characters. 
    72 	*/
    73 	IMPORT_C void GetArtistResponse(TRequestStatus& aStatus, 
    74 		const TDesC& aArtist, 
    75 		TInt aError);
    76 
    77 	/**
    78 	Sends a response to a 'get track duration' command.
    79 	Only one response per target session can be outstanding at any one time.
    80 	@param aStatus Used by RemCon to indicate completion of the send request.
    81 	@param aDuration The duration.
    82 	@param aError The response error.
    83 	*/
    84 	IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus, 
    85 		const TTime& aDuration, 
    86 		TInt aError);
    87 
    88 /**
    89 The following section of code is included to allow internal back to back 
    90 testing of this component within Symbian Software Ltd. It will only be 
    91 compiled in specially configured test builds. It will never be available 
    92 in any release and so should never be used outside of Symbian owned test 
    93 code.
    94 */
    95 #ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
    96 	/**
    97 	This method is only available in specially configured test builds and will 
    98 	not be found in any released code.
    99 	*/
   100 	IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
   101 		TInt aError);
   102 
   103 private:
   104 	/**
   105 	This method is only available in specially configured test builds and will 
   106 	not be found in any released code.
   107 	*/
   108 	void HandleSetTrackName(const TDesC8& aData);		
   109 #endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
   110 
   111 private:
   112 	/** 
   113 	Constructor.
   114 	@param aInterfaceSelector The interface selector.
   115 	@param aObserver The observer of this interface.
   116 	*/
   117 	CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector, 
   118 		MRemConTrackInfoTargetObserver& aObserver);
   119 
   120 private: // from CRemConInterfaceBase
   121 	TAny* GetInterfaceIf(TUid aUid);
   122 
   123 private: // from MRemConInterfaceIf
   124 	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
   125 
   126 private: // unowned
   127 	MRemConTrackInfoTargetObserver& iObserver;
   128 
   129 private: // owned
   130 	// For operation-specific data.
   131 	TBuf8<KMaxName> iOutData;
   132 	
   133 	// not used by this class, but required for calling RRemCon::Send ...
   134 	TUint iNumRemotes;
   135 
   136 	};
   137 
   138 #endif // REMCONTRACKINFOTARGET_H