diff -r 5b153be919d4 -r e9b924a62a66 bluetooth/gavdp/test/tavsrcAbsoluteVolume.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetooth/gavdp/test/tavsrcAbsoluteVolume.h Wed Sep 01 12:38:54 2010 +0100 @@ -0,0 +1,72 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef TAVSRCABSOLUTEVOLUME_H_ +#define TAVSRCABSOLUTEVOLUME_H_ +#include +#include +#include "tavsrcConsole.h" + +static const TUint32 KInitialVolume = 1; +static const TUint32 KMaxTgVolume = 10; + +static const TUint32 KMaxCtVolume = 100; + +class CActiveConsole; +class CRemConInterfaceSelector; +class CRemConAbsoluteVolumeTarget; +class CRemConAbsoluteVolumeController; +class CTavsrcAbsoluteVolume: public CActive, + public MActiveConsoleNotify, + public MRemConAbsoluteVolumeTargetObserver, + public MRemConAbsoluteVolumeControllerObserver + { +public: + static CTavsrcAbsoluteVolume* NewL(CRemConInterfaceSelector& aIfSel); + ~CTavsrcAbsoluteVolume(); + +private: + CTavsrcAbsoluteVolume(); + void ConstructL(CRemConInterfaceSelector& aIfSel); + +private://from MActiveConsoleNotify + void KeyPressed(TChar aKey); + +private: + //from MRemConAbsoluteVolumeTargetObserver + void MrcavtoSetAbsoluteVolumeRequest(TUint32 aVolume, TUint32 aMaxVolume); + + //from MRemConAbsoluteVolumeControllerObserver + void MrcavcoCurrentVolume(TUint32 aVolume, TUint32 aMaxVolume, TInt aError); + void MrcavcoSetAbsoluteVolumeResponse(TUint32 aVolume, TUint32 aMaxVolume, TInt aError); + void MrcavcoAbsoluteVolumeNotificationError(); + +private: + // from CActive + void RunL(); + void DoCancel(); + +private: + void MtMenu(); + TUint32 GetVolume(); + +private: + CActiveConsole* iMtAbsoluteVolumeConsole; + CRemConAbsoluteVolumeTarget* iAbsoluteVolumeTarget; + CRemConAbsoluteVolumeController* iAbsoluteVolumeController; + TUint iNumRemotes; + }; + +#endif /*TAVSRCABSOLUTEVOLUME_H_*/