epoc32/include/remconabsvolcontroller.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/remconabsvolcontroller.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/remconabsvolcontroller.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,99 @@
     1.4 -remconabsvolcontroller.h
     1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @publishedAll
    1.25 + @released
    1.26 +*/
    1.27 +
    1.28 +#ifndef REMCONABSVOLCONTROLLER_H
    1.29 +#define REMCONABSVOLCONTROLLER_H
    1.30 +
    1.31 +#include <e32base.h>
    1.32 +#include <remcon/remconinterfacebase.h>
    1.33 +#include <remcon/remconinterfaceif.h>
    1.34 +
    1.35 +class MRemConAbsVolControllerObserver;
    1.36 +class CRemConInterfaceSelector;
    1.37 +
    1.38 +/**
    1.39 +Client-instantiable type supporting sending AbsVol API responses.
    1.40 +*/
    1.41 +NONSHARABLE_CLASS(CRemConAbsVolController) : public CRemConInterfaceBase, 
    1.42 +								             public MRemConInterfaceIf
    1.43 +	{
    1.44 +public:
    1.45 +	/**
    1.46 +	Factory function.
    1.47 +	@param aInterfaceSelector The interface selector. The client must have 
    1.48 +	created one of these first.
    1.49 +	@param aObserver The observer of this interface.
    1.50 +	@return A new CRemConAbsVolController, owned by the interface selector.
    1.51 +	*/
    1.52 +	IMPORT_C static CRemConAbsVolController* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    1.53 +		MRemConAbsVolControllerObserver& aObserver);
    1.54 +	
    1.55 +	/** Destructor. */
    1.56 +	IMPORT_C ~CRemConAbsVolController();
    1.57 +
    1.58 +public:
    1.59 +	/**
    1.60 +	Sends a 'get absolute volume' command. The absolute volume will be 
    1.61 +	returned in response(s) via the observer interface.
    1.62 +	Only one command per controller session can be outstanding at any one time.
    1.63 +	@param aStatus Used by RemCon to indicate completion of the send request. 
    1.64 +	@param aNumRemotes The number of remotes to which the command was sent.
    1.65 +	*/
    1.66 +	IMPORT_C void GetAbsoluteVolume(TRequestStatus& aStatus, TUint& aNumRemotes);
    1.67 +
    1.68 +	/**
    1.69 +	Sends a 'set absolute volume' command. The volume is set to aAbsVol, on a 
    1.70 +	range of zero to aMaxVol. Any responses will be returned via the observer 
    1.71 +	interface.
    1.72 +	Only one command per controller session can be outstanding at any one time.
    1.73 +	@param aStatus Used by RemCon to indicate completion of the send request.
    1.74 +	@param aAbsVol The relative volume.
    1.75 +	@param aMaxVol The maximum against which aAbsVol is relative.
    1.76 +	@param aNumRemotes The number of remotes to which the command was sent.
    1.77 +	*/
    1.78 +	IMPORT_C void SetAbsoluteVolume(TRequestStatus& aStatus, TUint aAbsVol, TUint aMaxVol, TUint& aNumRemotes);
    1.79 +
    1.80 +private:
    1.81 +	/** 
    1.82 +	Constructor.
    1.83 +	@param aInterfaceSelector The interface selector.
    1.84 +	@param aObserver The observer of this interface.
    1.85 +	*/
    1.86 +	CRemConAbsVolController(CRemConInterfaceSelector& aInterfaceSelector, 
    1.87 +		MRemConAbsVolControllerObserver& aObserver);
    1.88 +
    1.89 +private: // from CRemConInterfaceBase
    1.90 +	TAny* GetInterfaceIf(TUid aUid);
    1.91 +
    1.92 +private: // from MRemConInterfaceIf
    1.93 +	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
    1.94 +
    1.95 +private: // unowned
    1.96 +	MRemConAbsVolControllerObserver& iObserver;
    1.97 +
    1.98 +private: // owned
    1.99 +	static const TUint KMaxOperationDataSize = 0x20;
   1.100 +	TBuf8<KMaxOperationDataSize> iOutData;
   1.101 +	};
   1.102 +
   1.103 +#endif // REMCONABSVOLCONTROLLER_H