epoc32/include/remconabsvoltarget.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef REMCONABSVOLTARGET_H
    25 #define REMCONABSVOLTARGET_H
    26 
    27 #include <e32base.h>
    28 #include <remcon/remconinterfacebase.h>
    29 #include <remcon/remconinterfaceif.h>
    30 
    31 class MRemConAbsVolTargetObserver;
    32 class CRemConInterfaceSelector;
    33 
    34 /**
    35 Client-instantiable type supporting sending AbsVol API responses.
    36 */
    37 NONSHARABLE_CLASS(CRemConAbsVolTarget) : public CRemConInterfaceBase, 
    38 								         public MRemConInterfaceIf
    39 	{
    40 public:
    41 	/**
    42 	Factory function.
    43 	@param aInterfaceSelector The interface selector. The client must have 
    44 	created one of these first.
    45 	@param aObserver The observer of this interface.
    46 	@return A new CRemConAbsVolTarget, owned by the interface selector.
    47 	*/
    48 	IMPORT_C static CRemConAbsVolTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    49 		MRemConAbsVolTargetObserver& aObserver);
    50 	
    51 	/** Destructor. */
    52 	IMPORT_C ~CRemConAbsVolTarget();
    53 
    54 public:
    55 	/**
    56 	Sends a response to a 'get absolute volume' command.
    57 	Only one response per target session can be outstanding at any one time.
    58 	@param aStatus Used by RemCon to indicate completion of the send request.
    59 	@param aAbsVol The volume, on a scale of 0 to aMaxVol.
    60 	@param aMaxVol The maximum volume, to which aAbsVol is relative.
    61 	@param aError The response error.
    62 	*/
    63 	IMPORT_C void GetAbsoluteVolumeResponse(TRequestStatus& aStatus, 
    64 		TUint aAbsVol, 
    65 		TUint aMaxVol, 
    66 		TInt aError);
    67 
    68 	/**
    69 	Sends a response to a 'set absolute volume' command.
    70 	Only one response per target session can be outstanding at any one time.
    71 	@param aStatus Used by RemCon to indicate completion of the request.
    72 	@param aError The response error.
    73 	*/
    74 	IMPORT_C void SetAbsoluteVolumeResponse(TRequestStatus& aStatus, 
    75 		TInt aError);
    76 
    77 private:
    78 	/** 
    79 	Constructor.
    80 	@param aInterfaceSelector The interface selector.
    81 	@param aObserver The observer of this interface.
    82 	*/
    83 	CRemConAbsVolTarget(CRemConInterfaceSelector& aInterfaceSelector, 
    84 		MRemConAbsVolTargetObserver& aObserver);
    85 
    86 private: // from CRemConInterfaceBase
    87 	TAny* GetInterfaceIf(TUid aUid);
    88 
    89 private: // from MRemConInterfaceIf
    90 	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
    91 
    92 private: // unowned
    93 	MRemConAbsVolTargetObserver& iObserver;
    94 
    95 private: // owned
    96 	// For operation-specific data.
    97 	static const TUint KMaxOperationDataSize = 0x20;
    98 	TBuf8<KMaxOperationDataSize> iOutData;
    99 	
   100 	// not used by this class, but required for calling RRemCon::Send ...
   101 	TUint iNumRemotes;
   102 	
   103 	};
   104 
   105 #endif // REMCONABSVOLTARGET_H