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.
williamr@2
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
/**
williamr@2
    17
 @file
williamr@2
    18
 @publishedAll
williamr@2
    19
 @released
williamr@2
    20
*/
williamr@2
    21
williamr@2
    22
#ifndef REMCONTRACKINFOTARGET_H
williamr@2
    23
#define REMCONTRACKINFOTARGET_H
williamr@2
    24
williamr@2
    25
#include <e32base.h>
williamr@2
    26
#include <remcon/remconinterfacebase.h>
williamr@2
    27
#include <remcon/remconinterfaceif.h>
williamr@2
    28
williamr@2
    29
class MRemConTrackInfoTargetObserver;
williamr@2
    30
class CRemConInterfaceSelector;
williamr@2
    31
williamr@2
    32
/**
williamr@2
    33
Client-instantiable type supporting sending TrackInfo API responses.
williamr@2
    34
*/
williamr@2
    35
NONSHARABLE_CLASS(CRemConTrackInfoTarget) : public CRemConInterfaceBase, 
williamr@2
    36
								            public MRemConInterfaceIf
williamr@2
    37
	{
williamr@2
    38
public:
williamr@2
    39
	/**
williamr@2
    40
	Factory function.
williamr@2
    41
	@param aInterfaceSelector The interface selector. The client must have 
williamr@2
    42
	created one of these first.
williamr@2
    43
	@param aObserver The observer of this interface.
williamr@2
    44
	@return A new CRemConTrackInfoTarget, owned by the interface selector.
williamr@2
    45
	*/
williamr@2
    46
	IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
williamr@2
    47
		MRemConTrackInfoTargetObserver& aObserver);
williamr@2
    48
	
williamr@2
    49
	/** Destructor. */
williamr@2
    50
	IMPORT_C ~CRemConTrackInfoTarget();
williamr@2
    51
williamr@2
    52
public:
williamr@2
    53
	/**
williamr@2
    54
	Sends a response to a 'get track name' command.
williamr@2
    55
	Only one response per target session can be outstanding at any one time.
williamr@2
    56
	@param aStatus Used by RemCon to indicate completion of the send request.
williamr@2
    57
	@param aTrackName The track name.
williamr@2
    58
	@param aError The response error.
williamr@2
    59
	@panic USER 23, if the length of aTrackName is greater than 58 Characters. 
williamr@2
    60
	*/
williamr@2
    61
	IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus, 
williamr@2
    62
		const TDesC& aTrackName, 
williamr@2
    63
		TInt aError);
williamr@2
    64
williamr@2
    65
	/**
williamr@2
    66
	Sends a response to a 'get artist' command.
williamr@2
    67
	Only one response per target session can be outstanding at any one time.
williamr@2
    68
	@param aStatus Used by RemCon to indicate completion of the send request.
williamr@2
    69
	@param aArtist The artist.
williamr@2
    70
	@param aError The response error.
williamr@2
    71
	@panic USER 23, if the length of aArtist is greater than 58 Characters. 
williamr@2
    72
	*/
williamr@2
    73
	IMPORT_C void GetArtistResponse(TRequestStatus& aStatus, 
williamr@2
    74
		const TDesC& aArtist, 
williamr@2
    75
		TInt aError);
williamr@2
    76
williamr@2
    77
	/**
williamr@2
    78
	Sends a response to a 'get track duration' command.
williamr@2
    79
	Only one response per target session can be outstanding at any one time.
williamr@2
    80
	@param aStatus Used by RemCon to indicate completion of the send request.
williamr@2
    81
	@param aDuration The duration.
williamr@2
    82
	@param aError The response error.
williamr@2
    83
	*/
williamr@2
    84
	IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus, 
williamr@2
    85
		const TTime& aDuration, 
williamr@2
    86
		TInt aError);
williamr@2
    87
williamr@2
    88
/**
williamr@2
    89
The following section of code is included to allow internal back to back 
williamr@2
    90
testing of this component within Symbian Software Ltd. It will only be 
williamr@2
    91
compiled in specially configured test builds. It will never be available 
williamr@2
    92
in any release and so should never be used outside of Symbian owned test 
williamr@2
    93
code.
williamr@2
    94
*/
williamr@2
    95
#ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
williamr@2
    96
	/**
williamr@2
    97
	This method is only available in specially configured test builds and will 
williamr@2
    98
	not be found in any released code.
williamr@2
    99
	*/
williamr@2
   100
	IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
williamr@2
   101
		TInt aError);
williamr@2
   102
williamr@2
   103
private:
williamr@2
   104
	/**
williamr@2
   105
	This method is only available in specially configured test builds and will 
williamr@2
   106
	not be found in any released code.
williamr@2
   107
	*/
williamr@2
   108
	void HandleSetTrackName(const TDesC8& aData);		
williamr@2
   109
#endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
williamr@2
   110
williamr@2
   111
private:
williamr@2
   112
	/** 
williamr@2
   113
	Constructor.
williamr@2
   114
	@param aInterfaceSelector The interface selector.
williamr@2
   115
	@param aObserver The observer of this interface.
williamr@2
   116
	*/
williamr@2
   117
	CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector, 
williamr@2
   118
		MRemConTrackInfoTargetObserver& aObserver);
williamr@2
   119
williamr@2
   120
private: // from CRemConInterfaceBase
williamr@2
   121
	TAny* GetInterfaceIf(TUid aUid);
williamr@2
   122
williamr@2
   123
private: // from MRemConInterfaceIf
williamr@2
   124
	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
williamr@2
   125
williamr@2
   126
private: // unowned
williamr@2
   127
	MRemConTrackInfoTargetObserver& iObserver;
williamr@2
   128
williamr@2
   129
private: // owned
williamr@2
   130
	// For operation-specific data.
williamr@2
   131
	TBuf8<KMaxName> iOutData;
williamr@2
   132
	
williamr@2
   133
	// not used by this class, but required for calling RRemCon::Send ...
williamr@2
   134
	TUint iNumRemotes;
williamr@2
   135
williamr@2
   136
	};
williamr@2
   137
williamr@2
   138
#endif // REMCONTRACKINFOTARGET_H