Update contrib.
1 // Copyright (c) 2005-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef A3FCISTUBEXTN_H
17 #define A3FCISTUBEXTN_H
20 #include <a3f/mmfdevsoundcustominterfaceextensions.h>
22 #include <a3f/maudiocontext.h>
23 #include <a3f/maudiocontextobserver.h>
25 #include "testsetvol.h"
31 ETestSetVolIfSetVolCommand,
32 ETestSetVolIfVolCommand,
37 * CA3fClientCiStubExtn
39 * stub version of MDevSoundCIClientExtension
40 * Always fails to open CIs, but simulates presence of object
43 class CA3fClientCiStubExtn : public CBase,
44 public MDevSoundCIClientExtension,
49 static MDevSoundCIClientExtension* NewL();
50 ~CA3fClientCiStubExtn();
53 // from MDevSoundCIClientExtension
54 TInt Setup(MCustomCommand& aCustomCommand);
55 TInt CustomInterfaceExtension(TUid aUid, TAny*& aInterface);
57 void PassDestructorKey(TUid aDestructorKey);
60 TInt SetVol(TInt aVolume);
61 TInt Vol(TInt aMaxVolume);
65 MCustomCommand* iCommand; // not owned
72 * CA3fServerCiStubExtn
74 * stub version of MDevSoundCIServerExtension
75 * Always fails to open CIs, but simulates presence of object
78 class CA3fServerCiStubExtn : public CBase,
79 public MDevSoundCIServerExtension
83 static MDevSoundCIServerExtension* NewL();
84 ~CA3fServerCiStubExtn();
87 // from MDevSoundCIServerExtension
88 TInt Setup(MCustomInterface& aInterface);
89 TInt HandleMessageL(const RMmfIpcMessage& aMessage);
91 void PassDestructorKey(TUid aDestructorKey);
95 MCustomInterface* iInterface; // not owned
100 // CAVEAT - for testing only
101 class CSetVol : public CBase,
102 public MAudioContextObserver
105 static CSetVol* NewL(MCustomInterface& aCustomInterface);
108 TInt HandleMessageL(const RMmfIpcMessage& aMessage);
110 // from MAudioContextObserver
111 void ContextEvent(TUid aEvent, TInt aError);
114 CSetVol(MCustomInterface& aCustomInterface);
117 void UpdateA3fPointers();
118 void SetVolumeL(TInt aVol);
119 TInt VolumeL(TInt aMaxVolume);
121 MCustomInterface* iInterface; // not owned
122 MAudioContext* iContext;
123 MAudioStream* iStream;
124 MAudioProcessingUnit* iGain;
126 CActiveSchedulerWait* iWait;