os/mm/mmhais/a3fdevsoundcustomisation/src/devsoundadaptationinfo/devsoundadaptationinfoimplbody.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/a3fdevsoundcustomisation/src/devsoundadaptationinfo/devsoundadaptationinfoimplbody.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,92 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef DEVSOUNDADAPTATIONINFOIMPLBODY_H
1.20 +#define DEVSOUNDADAPTATIONINFOIMPLBODY_H
1.21 +
1.22 +#include <e32std.h>
1.23 +#include <ecom/ecom.h>
1.24 +#include <a3f/a3f_trace_utils.h>
1.25 +#include <a3f/a3ffourcclookup.h>
1.26 +#include <mmf/common/mmfutilities.h> // For TFourCC
1.27 +#include "devsoundadaptationinfoimpl.h"
1.28 +
1.29 +#define KFOURCCLENGTH 4
1.30 +
1.31 +class MA3FDevSoundAdaptationInfoObserver;
1.32 +
1.33 +/*
1.34 +The real implementation of CA3FDevsoundAdaptationInfo.
1.35 +*/
1.36 +NONSHARABLE_CLASS(CA3FDevSoundAdaptationInfoImpl::CBody) : public CActive, public MTruePauseCustomInterface
1.37 + {
1.38 +public:
1.39 +
1.40 + /*
1.41 + Factory
1.42 + */
1.43 + static CBody* NewL(MA3FDevSoundAdaptationInfoObserver& aObserver, CFourCCConvertor& aFourCcConvertor);
1.44 +
1.45 + /*
1.46 + Destructor.
1.47 + */
1.48 + ~CBody();
1.49 +
1.50 + TInt RequestMaxGain(TUid aCodecType);
1.51 + TInt RequestSupportedFormats(TUid aCodecType, RArray<TUid>& aSupportedFormats);
1.52 +
1.53 + // From CActive
1.54 + TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*);
1.55 +
1.56 + // from MTruePauseCustomInterface
1.57 + TBool IsResumeSupported(TUid aCodecType, TUid aFormat);
1.58 +
1.59 +private:
1.60 +
1.61 + static TBool IsDataTypeMatch(TFourCC aFourCCPCM16,TFourCC aFourCC);
1.62 +
1.63 + void SeekHwDevicePluginsL(RArray<TFourCC>& aSupportedDataTypes, TUid aCodecType);
1.64 +
1.65 + void ReadSupportedFormatsL(TUid aCodecType, RArray<TUid>& aSupportedFormats);
1.66 +
1.67 + TBool FourCCExists(RArray<TFourCC>& aSupportedDataTypes,TFourCC aFourCCEntry);
1.68 +
1.69 + void ReadFourCC(CImplementationInformation* aHwDeviceResourceEntry, TFourCC& aFourCCLeft, TFourCC& aFourCCRight);
1.70 +
1.71 +protected:
1.72 + void ConstructL(MA3FDevSoundAdaptationInfoObserver& aAdaptationInfoObserver, CFourCCConvertor& aFourCcConvertor);
1.73 + CBody();
1.74 +
1.75 + // from CActive
1.76 + void RunL();
1.77 + void DoCancel();
1.78 + TInt RunError(TInt aError);
1.79 +
1.80 +private:
1.81 +
1.82 + MA3FDevSoundAdaptationInfoObserver* iAdaptationInfoObserver;
1.83 +
1.84 + // Pointer to fourcc convertor
1.85 + // Not owned.
1.86 + CFourCCConvertor* iFourCcConvertor;
1.87 +
1.88 + TBool iMaxGainRequested;
1.89 + TBool iFormatsRequested;
1.90 +
1.91 + TUid iCodecType;
1.92 + };
1.93 +
1.94 +
1.95 +#endif // DEVSOUNDADAPTATIONINFOIMPLBODY_H