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: #ifndef AUDIOSTREAMADAPTATION_H sl@0: #define AUDIOSTREAMADAPTATION_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Implementation of the Audio Component Version sl@0: sl@0: */ sl@0: sl@0: class TAudioComponentInfo sl@0: { sl@0: TInt iVersion; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Implementation of the Stream Adaptation sl@0: sl@0: */ sl@0: sl@0: class MAudioStreamAdaptationObserver; sl@0: class CFourCCConvertor; sl@0: class MLogicalChain; sl@0: class MAudioContext; sl@0: sl@0: const TUid KAudioComponentManagerUid = {0x10283462}; sl@0: sl@0: // Messages flags sl@0: const TInt KServerStopping = 0x01; sl@0: const TInt KPreemptionRequest = 0x02; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: This is the interface to AudioStreamAdaptation. sl@0: This is represent the stream loaded when the MMRC server sl@0: selects the adaptation. sl@0: sl@0: This functionality includes audio playback and recording using different formats sl@0: CAudioStreamAdaptation provides the access point for clients to Adaptation Layer. sl@0: It is responsible for initializing connections to various subsystems sl@0: in audio adaptation. These include setting up and managing connection sl@0: to the low level audio adaptation API implementations. The connections are then made sl@0: available . sl@0: */ sl@0: class CAudioStreamAdaptation : public CBase sl@0: { sl@0: sl@0: public: sl@0: sl@0: /** sl@0: Constructs, and returns a pointer to, a new CAudioComponentManager object. sl@0: sl@0: @return A pointer to the CAudioComponentManager instance. sl@0: */ sl@0: static CAudioStreamAdaptation* NewL(TUid aType); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: Deletes all objects and releases all resource owned by this instance. sl@0: */ sl@0: virtual ~CAudioStreamAdaptation(); sl@0: sl@0: sl@0: /** sl@0: Returns if a message was passed through the adaptation. sl@0: sl@0: @param MLogicalChain sl@0: Logical Current Chain sl@0: @param MLogicalChain sl@0: Desired Chain after message sl@0: @return An error code indicating if the function call was successful. KErrNone on success, otherwise sl@0: another of the system-wide error codes. sl@0: */ sl@0: sl@0: virtual TInt Message(MLogicalChain& aCurrentChain, MLogicalChain& aDesiredChain, MAudioContext& aContext, TInt aFlags) = 0; sl@0: sl@0: /** sl@0: Returns if a Audio Stream Observer was Registered. sl@0: sl@0: @param MAudioStreamAdaptationObserver sl@0: Observer object witch will be registered sl@0: @return An error code indicating if the function call was successful. KErrNone on success, otherwise sl@0: another of the system-wide error codes. sl@0: */ sl@0: sl@0: virtual TInt RegisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0 ; sl@0: sl@0: /** sl@0: Returns if a Audio Stream Observer was UnRegistered. sl@0: sl@0: @param MAudioStreamAdaptationObserver sl@0: Observer object witch will be unregistered sl@0: */ sl@0: sl@0: virtual void UnregisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0; sl@0: sl@0: virtual void UnregisterAllAudioStreamObserver() = 0; sl@0: sl@0: virtual void SetFourCC(const CFourCCConvertor& aFourCCConvertor) = 0; sl@0: sl@0: sl@0: private: sl@0: sl@0: /** iDtor_ID_Key Instance identifier key. When instance of an sl@0: * implementation is created by ECOM framework, the sl@0: * framework will assign UID for it. The UID is used in sl@0: * destructor to notify framework that this instance is sl@0: * being destroyed and resources can be released. sl@0: */ sl@0: TUid iDtor_ID_Key; sl@0: }; sl@0: sl@0: #include "audiostreamadaptation.inl" sl@0: sl@0: #endif // C_AUDIOCOMPONENTMANAGER_H