devsound/a3facf/inc/maudioprocessingunit.h
changeset 0 b8ed18f6c07b
equal deleted inserted replaced
-1:000000000000 0:b8ed18f6c07b
       
     1 // Copyright (c) 2006-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 
       
    25 #ifndef MAUDIOPROCESSINGUNIT_H
       
    26 #define MAUDIOPROCESSINGUNIT_H
       
    27 
       
    28 #include <e32base.h>
       
    29 #include <f32file.h>
       
    30 #include <mmf/common/mmfcontroller.h>
       
    31 #include <a3f/a3fbase.h>
       
    32 
       
    33 class MAudioProcessingUnitObserver;
       
    34 
       
    35 /**
       
    36  * A generic interface for audio processing units.
       
    37  */
       
    38 class MAudioProcessingUnit
       
    39 	{
       
    40 public:
       
    41 
       
    42 	/**
       
    43 	 * Fetches the identifier of the context in which this processing unit exists.
       
    44 	 *
       
    45 	 * @return TUid context instance id.
       
    46 	 */
       
    47 	virtual TAudioContextId ContextId() const = 0;
       
    48 
       
    49 
       
    50 	/**
       
    51 	 * Fetches the specified interface to this processing unit.
       
    52 	 * The interface must not be deleted by the client.
       
    53 	 * The processing unit must be removed once from the context using
       
    54 	 * any of the retrieved processing unit interfaces.
       
    55 	 * @param aTypeId the type of the interface
       
    56 	 */
       
    57 	virtual TAny* Interface(TUid aType)=0;
       
    58 
       
    59 	/**
       
    60 	 * Registers a processing unit observer.
       
    61 	 *
       
    62 	 * The observer must be unregistered before the processing unit is removed from the context.
       
    63 	 * 
       
    64 	 * @see MAudioProcessingUnitObserver for further inforamtion about the observer usage.
       
    65 	 * @param aObserver a reference to the observer to register
       
    66 	 * @return an error code. KErrNone if successful.
       
    67 	 *         KErrNotSupported the processing unit does not provide support for this type of observation.
       
    68 	 *         Other system wide error codes are also possible.
       
    69 	 */
       
    70 	virtual TInt RegisterProcessingUnitObserver(MAudioProcessingUnitObserver& aObserver)=0;
       
    71 
       
    72 	/**
       
    73 	 * Unregisters audio processing unit observer.
       
    74 	 *
       
    75 	 * @see RegisterProcessingUnitObserver for further information.
       
    76 	 * @param aObserver a reference to the processing unit observer to unregister.
       
    77 	 * @return an error code. KErrNone if successful.
       
    78 	 */
       
    79 	virtual void UnregisterProcessingUnitObserver(MAudioProcessingUnitObserver& aObserver)=0; 
       
    80 
       
    81 	/**
       
    82 	 * Returns the component instance id.
       
    83 	 *
       
    84 	 * @return TUid component instance id.
       
    85 	 */
       
    86 	virtual TAudioComponentId InstanceId() const = 0;
       
    87 
       
    88 	/** 
       
    89 	 * Returns if the component is the same type of the given feature Uid. 
       
    90  	 * @param aTypeId a feature Uid to compare with.
       
    91 	 */
       
    92 	virtual TBool IsTypeOf(TUid aTypeId) const =  0;
       
    93 
       
    94 	};
       
    95 
       
    96 #endif // MAUDIOPROCESSINGUNIT_H