os/mm/devsound/sounddevbt/src/swcodecwrapper/mmfBtswcodecwrapperCustomInterfaces.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/sounddevbt/src/swcodecwrapper/mmfBtswcodecwrapperCustomInterfaces.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,84 @@
     1.4 +// Copyright (c) 2005-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 __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
    1.20 +#define __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + * Implementation of custom interface class for play functionality created by the 
    1.25 + * CMMFSwCodecWrapper::CustomInterface() method.  It provides 
    1.26 + * access to miscellaneous functionality such as volume settings
    1.27 + * Ports of sw codec wrapper may do this differently eg via EAP
    1.28 + * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
    1.29 + * across the sample rate and channels because 1)it would mean
    1.30 + * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
    1.31 + * the buffer size and encoding members are not required 3)3rd party ports
    1.32 + * may not use RMdaDevSound
    1.33 + * Note also that this interface is just a simple interface to get
    1.34 + * and set values.  No checking is perfomed on the values sent (hence the
    1.35 + * Set methods do not return an error code.)
    1.36 + * @prototype
    1.37 + */
    1.38 +class TPlayCustomInterface : public MPlayCustomInterface
    1.39 +	{
    1.40 +public:
    1.41 +	TPlayCustomInterface() : iVolume(0),iBytesPlayed(0),iDevice(NULL),iRampDuration(0) {}
    1.42 +	void SetVolume(TUint aVolume);
    1.43 +	TUint Volume() {return iVolume;};
    1.44 +	TUint BytesPlayed();
    1.45 +	void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) {iRampDuration = aRampDuration;};
    1.46 +	TTimeIntervalMicroSeconds& VolumeRamp() {return iRampDuration;};
    1.47 +	TTaskConfig Caps();
    1.48 +	void SetDevice(CRoutingSoundPlayDevice* iDevice);//not for use outside codec wrapper
    1.49 +private:
    1.50 +	TUint iVolume;
    1.51 +	TUint iBytesPlayed;
    1.52 +	CRoutingSoundPlayDevice* iDevice;
    1.53 +	TTimeIntervalMicroSeconds iRampDuration;
    1.54 +	};
    1.55 +
    1.56 +/**
    1.57 + * Implementation of custom interface class for record functionality created by the 
    1.58 + * CMMFSwCodecWrapper::CustomInterface() method.  It provides 
    1.59 + * access to miscelaneous functionality such as volume settings
    1.60 + * Ports of sw codec wrapper may do this differently eg via EAP
    1.61 + * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
    1.62 + * across the sample rate and channels because 1)it would mean
    1.63 + * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
    1.64 + * the buffer size and encoding members are not required 3)3rd party ports
    1.65 + * may not use RMdaDevSound
    1.66 + * Note also that this interface is just a simple interface to get
    1.67 + * and set values.  No checking is perfomed on the values sent. (hence the
    1.68 + * Set methods do not return an error code.)
    1.69 + * @prototype
    1.70 + */
    1.71 +class TRecordCustomInterface : public MRecordCustomInterface
    1.72 +	{
    1.73 +public:
    1.74 +	TRecordCustomInterface() : iGain(0), iBytesRecorded(0), iDataPath(NULL) {}
    1.75 +	void SetGain(TUint aGain) {iGain = aGain;};
    1.76 +	void SetDataPath(CMMFSwCodecRecordDataPath* aDataPath){iDataPath = aDataPath;};
    1.77 +	TUint Gain() {return iGain;};
    1.78 +	TUint BytesRecorded(); 
    1.79 +private:
    1.80 +	TUint iGain;
    1.81 +	TUint iBytesRecorded;
    1.82 +	CMMFSwCodecRecordDataPath* iDataPath;
    1.83 +	};
    1.84 +
    1.85 +
    1.86 +#endif
    1.87 +