epoc32/include/remconabsvolcontroller.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 REMCONABSVOLCONTROLLER_H
    25 #define REMCONABSVOLCONTROLLER_H
    26 
    27 #include <e32base.h>
    28 #include <remcon/remconinterfacebase.h>
    29 #include <remcon/remconinterfaceif.h>
    30 
    31 class MRemConAbsVolControllerObserver;
    32 class CRemConInterfaceSelector;
    33 
    34 /**
    35 Client-instantiable type supporting sending AbsVol API responses.
    36 */
    37 NONSHARABLE_CLASS(CRemConAbsVolController) : 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 CRemConAbsVolController, owned by the interface selector.
    47 	*/
    48 	IMPORT_C static CRemConAbsVolController* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    49 		MRemConAbsVolControllerObserver& aObserver);
    50 	
    51 	/** Destructor. */
    52 	IMPORT_C ~CRemConAbsVolController();
    53 
    54 public:
    55 	/**
    56 	Sends a 'get absolute volume' command. The absolute volume will be 
    57 	returned in response(s) via the observer interface.
    58 	Only one command per controller session can be outstanding at any one time.
    59 	@param aStatus Used by RemCon to indicate completion of the send request. 
    60 	@param aNumRemotes The number of remotes to which the command was sent.
    61 	*/
    62 	IMPORT_C void GetAbsoluteVolume(TRequestStatus& aStatus, TUint& aNumRemotes);
    63 
    64 	/**
    65 	Sends a 'set absolute volume' command. The volume is set to aAbsVol, on a 
    66 	range of zero to aMaxVol. Any responses will be returned via the observer 
    67 	interface.
    68 	Only one command per controller session can be outstanding at any one time.
    69 	@param aStatus Used by RemCon to indicate completion of the send request.
    70 	@param aAbsVol The relative volume.
    71 	@param aMaxVol The maximum against which aAbsVol is relative.
    72 	@param aNumRemotes The number of remotes to which the command was sent.
    73 	*/
    74 	IMPORT_C void SetAbsoluteVolume(TRequestStatus& aStatus, TUint aAbsVol, TUint aMaxVol, TUint& aNumRemotes);
    75 
    76 private:
    77 	/** 
    78 	Constructor.
    79 	@param aInterfaceSelector The interface selector.
    80 	@param aObserver The observer of this interface.
    81 	*/
    82 	CRemConAbsVolController(CRemConInterfaceSelector& aInterfaceSelector, 
    83 		MRemConAbsVolControllerObserver& aObserver);
    84 
    85 private: // from CRemConInterfaceBase
    86 	TAny* GetInterfaceIf(TUid aUid);
    87 
    88 private: // from MRemConInterfaceIf
    89 	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
    90 
    91 private: // unowned
    92 	MRemConAbsVolControllerObserver& iObserver;
    93 
    94 private: // owned
    95 	static const TUint KMaxOperationDataSize = 0x20;
    96 	TBuf8<KMaxOperationDataSize> iOutData;
    97 	};
    98 
    99 #endif // REMCONABSVOLCONTROLLER_H