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: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef MAUDIOPROCESSINGUNIT_H sl@0: #define MAUDIOPROCESSINGUNIT_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class MAudioProcessingUnitObserver; sl@0: sl@0: /** sl@0: * A generic interface for audio processing units. sl@0: */ sl@0: class MAudioProcessingUnit sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * Fetches the identifier of the context in which this processing unit exists. sl@0: * sl@0: * @return TUid context instance id. sl@0: */ sl@0: virtual TAudioContextId ContextId() const = 0; sl@0: sl@0: sl@0: /** sl@0: * Fetches the specified interface to this processing unit. sl@0: * The interface must not be deleted by the client. sl@0: * The processing unit must be removed once from the context using sl@0: * any of the retrieved processing unit interfaces. sl@0: * @param aTypeId the type of the interface sl@0: */ sl@0: virtual TAny* Interface(TUid aType)=0; sl@0: sl@0: /** sl@0: * Registers a processing unit observer. sl@0: * sl@0: * The observer must be unregistered before the processing unit is removed from the context. sl@0: * sl@0: * @see MAudioProcessingUnitObserver for further inforamtion about the observer usage. sl@0: * @param aObserver a reference to the observer to register sl@0: * @return an error code. KErrNone if successful. sl@0: * KErrNotSupported the processing unit does not provide support for this type of observation. sl@0: * Other system wide error codes are also possible. sl@0: */ sl@0: virtual TInt RegisterProcessingUnitObserver(MAudioProcessingUnitObserver& aObserver)=0; sl@0: sl@0: /** sl@0: * Unregisters audio processing unit observer. sl@0: * sl@0: * @see RegisterProcessingUnitObserver for further information. sl@0: * @param aObserver a reference to the processing unit observer to unregister. sl@0: * @return an error code. KErrNone if successful. sl@0: */ sl@0: virtual void UnregisterProcessingUnitObserver(MAudioProcessingUnitObserver& aObserver)=0; sl@0: sl@0: /** sl@0: * Returns the component instance id. sl@0: * sl@0: * @return TUid component instance id. sl@0: */ sl@0: virtual TAudioComponentId InstanceId() const = 0; sl@0: sl@0: /** sl@0: * Returns if the component is the same type of the given feature Uid. sl@0: * @param aTypeId a feature Uid to compare with. sl@0: */ sl@0: virtual TBool IsTypeOf(TUid aTypeId) const = 0; sl@0: sl@0: }; sl@0: sl@0: #endif // MAUDIOPROCESSINGUNIT_H