sl@0: /* sl@0: * Copyright (c) 2006-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: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef MAUDIOGAINCONTROLOBSERVER_H sl@0: #define MAUDIOGAINCONTROLOBSERVER_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: * An interface to a set of AudioGainControl callback functions. sl@0: * sl@0: * this serves as the method of communication between the client and the sl@0: * AudioGainControl. sl@0: * sl@0: * The class is a mixin and is intended to be inherited by the client class sl@0: * that is interested in observing the Gain operations. The functions sl@0: * encapsulated by this class are called when specific events occur while sl@0: * processing audio. sl@0: * sl@0: */ sl@0: class MAudioGainControlObserver sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * Notifies the observer that the max ramp time supported by the gain sl@0: * control has changed. sl@0: * sl@0: * @param aGain a reference to GainControl whose max ramp time changed. sl@0: */ sl@0: virtual void MaxRampTimeChanged(MAudioGainControl& aGain)=0; sl@0: sl@0: /** sl@0: * Notifies the observer that the maximum gain value supported by the sl@0: * gain control has changed. sl@0: * sl@0: * @param aGain a reference to GainControl whose max gain changed. sl@0: */ sl@0: virtual void MaxGainChanged(MAudioGainControl& aGain)=0; sl@0: sl@0: /** sl@0: * Notifies the observer that the gain has changed, sl@0: * due to request from the client or otherwise. sl@0: * If gain change by the client cannot be fulfilled, sl@0: * a gain change with an error code other than KErrNone will be issued. sl@0: * @param aGain a reference to the gain control whose gain has changed. sl@0: * @return aError an error code. sl@0: * KErrNone if the gain change was requested by the client and was completed successfully. sl@0: * KErrNotSupported if the SetGain() call referred to non-existent channels. sl@0: * KErrArgument if aGain of less than 0 or larger than max gain, sl@0: * the same channel is specified multiple times, sl@0: * or aRampDuration is less than 0 or greater than max ramp duration. sl@0: * KErrA3fUnsupportedRamp if the ramp operation requested is not supported, sl@0: * or the Uid value supplies is unknown. sl@0: * Other system-wide errors are also possible. They will indicate that the gain change failed. sl@0: * Note that these errors could alternatively be returned by the associated SetGain() call. sl@0: */ sl@0: virtual void GainChanged(MAudioGainControl& aGain, TInt aError)=0; sl@0: sl@0: }; sl@0: sl@0: #endif // MAUDIOGAINCONTROLOBSERVER_H