os/mm/mmhais/a3fdevsoundcustomisation/src/devsoundadaptationinfo/devsoundadaptationinfoimplbody.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef DEVSOUNDADAPTATIONINFOIMPLBODY_H
sl@0
    17
#define DEVSOUNDADAPTATIONINFOIMPLBODY_H
sl@0
    18
sl@0
    19
#include <e32std.h>
sl@0
    20
#include <ecom/ecom.h>
sl@0
    21
#include <a3f/a3f_trace_utils.h>
sl@0
    22
#include <a3f/a3ffourcclookup.h>
sl@0
    23
#include <mmf/common/mmfutilities.h> // For TFourCC
sl@0
    24
#include "devsoundadaptationinfoimpl.h"
sl@0
    25
sl@0
    26
#define KFOURCCLENGTH 4
sl@0
    27
sl@0
    28
class MA3FDevSoundAdaptationInfoObserver;
sl@0
    29
sl@0
    30
/*
sl@0
    31
The real implementation of CA3FDevsoundAdaptationInfo.
sl@0
    32
*/
sl@0
    33
NONSHARABLE_CLASS(CA3FDevSoundAdaptationInfoImpl::CBody) : public CActive, public MTruePauseCustomInterface
sl@0
    34
	{
sl@0
    35
public:
sl@0
    36
sl@0
    37
	/*
sl@0
    38
	Factory
sl@0
    39
	*/
sl@0
    40
	static CBody* NewL(MA3FDevSoundAdaptationInfoObserver& aObserver, CFourCCConvertor& aFourCcConvertor);
sl@0
    41
sl@0
    42
	/*
sl@0
    43
	Destructor.
sl@0
    44
	*/
sl@0
    45
	~CBody();
sl@0
    46
sl@0
    47
	TInt RequestMaxGain(TUid aCodecType);
sl@0
    48
	TInt RequestSupportedFormats(TUid aCodecType, RArray<TUid>& aSupportedFormats);
sl@0
    49
	
sl@0
    50
	// From CActive
sl@0
    51
	TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*);
sl@0
    52
	
sl@0
    53
	// from MTruePauseCustomInterface
sl@0
    54
	TBool IsResumeSupported(TUid aCodecType, TUid aFormat);
sl@0
    55
sl@0
    56
private:
sl@0
    57
sl@0
    58
	static TBool IsDataTypeMatch(TFourCC aFourCCPCM16,TFourCC aFourCC);
sl@0
    59
sl@0
    60
	void SeekHwDevicePluginsL(RArray<TFourCC>& aSupportedDataTypes, TUid aCodecType);
sl@0
    61
sl@0
    62
	void ReadSupportedFormatsL(TUid aCodecType, RArray<TUid>& aSupportedFormats);
sl@0
    63
sl@0
    64
	TBool FourCCExists(RArray<TFourCC>& aSupportedDataTypes,TFourCC aFourCCEntry);
sl@0
    65
sl@0
    66
	void ReadFourCC(CImplementationInformation* aHwDeviceResourceEntry, TFourCC& aFourCCLeft, TFourCC& aFourCCRight);
sl@0
    67
sl@0
    68
protected:
sl@0
    69
	void ConstructL(MA3FDevSoundAdaptationInfoObserver& aAdaptationInfoObserver, CFourCCConvertor& aFourCcConvertor);
sl@0
    70
	CBody();
sl@0
    71
sl@0
    72
	// from CActive
sl@0
    73
	void RunL();
sl@0
    74
	void DoCancel();
sl@0
    75
	TInt RunError(TInt aError);
sl@0
    76
sl@0
    77
private:
sl@0
    78
sl@0
    79
	MA3FDevSoundAdaptationInfoObserver* iAdaptationInfoObserver;
sl@0
    80
sl@0
    81
	// Pointer to fourcc convertor
sl@0
    82
	// Not owned.
sl@0
    83
	CFourCCConvertor* iFourCcConvertor;
sl@0
    84
sl@0
    85
	TBool iMaxGainRequested;
sl@0
    86
	TBool iFormatsRequested;
sl@0
    87
sl@0
    88
	TUid iCodecType;
sl@0
    89
	};
sl@0
    90
sl@0
    91
sl@0
    92
#endif // DEVSOUNDADAPTATIONINFOIMPLBODY_H