sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef A3FCISTUBEXTN_H sl@0: #define A3FCISTUBEXTN_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "testsetvol.h" sl@0: sl@0: class CSetVol; sl@0: sl@0: enum TSetVolCommands sl@0: { sl@0: ETestSetVolIfSetVolCommand, sl@0: ETestSetVolIfVolCommand, sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * CA3fClientCiStubExtn sl@0: * sl@0: * stub version of MDevSoundCIClientExtension sl@0: * Always fails to open CIs, but simulates presence of object sl@0: */ sl@0: sl@0: class CA3fClientCiStubExtn : public CBase, sl@0: public MDevSoundCIClientExtension, sl@0: public MTestSetVolIf sl@0: sl@0: { sl@0: public: sl@0: static MDevSoundCIClientExtension* NewL(); sl@0: ~CA3fClientCiStubExtn(); sl@0: sl@0: protected: sl@0: // from MDevSoundCIClientExtension sl@0: TInt Setup(MCustomCommand& aCustomCommand); sl@0: TInt CustomInterfaceExtension(TUid aUid, TAny*& aInterface); sl@0: void Release(); sl@0: void PassDestructorKey(TUid aDestructorKey); sl@0: sl@0: // from MTestSetVolIf sl@0: TInt SetVol(TInt aVolume); sl@0: TInt Vol(TInt aMaxVolume); sl@0: sl@0: protected: sl@0: TUid iKey; sl@0: MCustomCommand* iCommand; // not owned sl@0: HBufC* iDummyBuffer; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * CA3fServerCiStubExtn sl@0: * sl@0: * stub version of MDevSoundCIServerExtension sl@0: * Always fails to open CIs, but simulates presence of object sl@0: */ sl@0: sl@0: class CA3fServerCiStubExtn : public CBase, sl@0: public MDevSoundCIServerExtension sl@0: sl@0: { sl@0: public: sl@0: static MDevSoundCIServerExtension* NewL(); sl@0: ~CA3fServerCiStubExtn(); sl@0: sl@0: protected: sl@0: // from MDevSoundCIServerExtension sl@0: TInt Setup(MCustomInterface& aInterface); sl@0: TInt HandleMessageL(const RMmfIpcMessage& aMessage); sl@0: void Release(); sl@0: void PassDestructorKey(TUid aDestructorKey); sl@0: sl@0: protected: sl@0: TUid iKey; sl@0: MCustomInterface* iInterface; // not owned sl@0: HBufC* iDummyBuffer; sl@0: CSetVol* iSetVol; sl@0: }; sl@0: sl@0: // CAVEAT - for testing only sl@0: class CSetVol : public CBase, sl@0: public MAudioContextObserver sl@0: { sl@0: public: sl@0: static CSetVol* NewL(MCustomInterface& aCustomInterface); sl@0: ~CSetVol(); sl@0: sl@0: TInt HandleMessageL(const RMmfIpcMessage& aMessage); sl@0: sl@0: // from MAudioContextObserver sl@0: void ContextEvent(TUid aEvent, TInt aError); sl@0: sl@0: private: sl@0: CSetVol(MCustomInterface& aCustomInterface); sl@0: void ConstructL(); sl@0: sl@0: void UpdateA3fPointers(); sl@0: void SetVolumeL(TInt aVol); sl@0: TInt VolumeL(TInt aMaxVolume); sl@0: sl@0: MCustomInterface* iInterface; // not owned sl@0: MAudioContext* iContext; sl@0: MAudioStream* iStream; sl@0: MAudioProcessingUnit* iGain; sl@0: sl@0: CActiveSchedulerWait* iWait; sl@0: TInt iError; sl@0: }; sl@0: sl@0: sl@0: #endif