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 DEVSOUNDADAPTATIONINFOIMPLBODY_H sl@0: #define DEVSOUNDADAPTATIONINFOIMPLBODY_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include // For TFourCC sl@0: #include "devsoundadaptationinfoimpl.h" sl@0: sl@0: #define KFOURCCLENGTH 4 sl@0: sl@0: class MA3FDevSoundAdaptationInfoObserver; sl@0: sl@0: /* sl@0: The real implementation of CA3FDevsoundAdaptationInfo. sl@0: */ sl@0: NONSHARABLE_CLASS(CA3FDevSoundAdaptationInfoImpl::CBody) : public CActive, public MTruePauseCustomInterface sl@0: { sl@0: public: sl@0: sl@0: /* sl@0: Factory sl@0: */ sl@0: static CBody* NewL(MA3FDevSoundAdaptationInfoObserver& aObserver, CFourCCConvertor& aFourCcConvertor); sl@0: sl@0: /* sl@0: Destructor. sl@0: */ sl@0: ~CBody(); sl@0: sl@0: TInt RequestMaxGain(TUid aCodecType); sl@0: TInt RequestSupportedFormats(TUid aCodecType, RArray& aSupportedFormats); sl@0: sl@0: // From CActive sl@0: TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*); sl@0: sl@0: // from MTruePauseCustomInterface sl@0: TBool IsResumeSupported(TUid aCodecType, TUid aFormat); sl@0: sl@0: private: sl@0: sl@0: static TBool IsDataTypeMatch(TFourCC aFourCCPCM16,TFourCC aFourCC); sl@0: sl@0: void SeekHwDevicePluginsL(RArray& aSupportedDataTypes, TUid aCodecType); sl@0: sl@0: void ReadSupportedFormatsL(TUid aCodecType, RArray& aSupportedFormats); sl@0: sl@0: TBool FourCCExists(RArray& aSupportedDataTypes,TFourCC aFourCCEntry); sl@0: sl@0: void ReadFourCC(CImplementationInformation* aHwDeviceResourceEntry, TFourCC& aFourCCLeft, TFourCC& aFourCCRight); sl@0: sl@0: protected: sl@0: void ConstructL(MA3FDevSoundAdaptationInfoObserver& aAdaptationInfoObserver, CFourCCConvertor& aFourCcConvertor); sl@0: CBody(); sl@0: sl@0: // from CActive sl@0: void RunL(); sl@0: void DoCancel(); sl@0: TInt RunError(TInt aError); sl@0: sl@0: private: sl@0: sl@0: MA3FDevSoundAdaptationInfoObserver* iAdaptationInfoObserver; sl@0: sl@0: // Pointer to fourcc convertor sl@0: // Not owned. sl@0: CFourCCConvertor* iFourCcConvertor; sl@0: sl@0: TBool iMaxGainRequested; sl@0: TBool iFormatsRequested; sl@0: sl@0: TUid iCodecType; sl@0: }; sl@0: sl@0: sl@0: #endif // DEVSOUNDADAPTATIONINFOIMPLBODY_H