sl@0: // Copyright (c) 2005-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 __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
sl@0: #define __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
sl@0: 
sl@0: 
sl@0: /**
sl@0:  * Implementation of custom interface class for play functionality created by the 
sl@0:  * CMMFSwCodecWrapper::CustomInterface() method.  It provides 
sl@0:  * access to miscellaneous functionality such as volume settings
sl@0:  * Ports of sw codec wrapper may do this differently eg via EAP
sl@0:  * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
sl@0:  * across the sample rate and channels because 1)it would mean
sl@0:  * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
sl@0:  * the buffer size and encoding members are not required 3)3rd party ports
sl@0:  * may not use RMdaDevSound
sl@0:  * Note also that this interface is just a simple interface to get
sl@0:  * and set values.  No checking is perfomed on the values sent (hence the
sl@0:  * Set methods do not return an error code.)
sl@0:  * @prototype
sl@0:  */
sl@0: class TPlayCustomInterface : public MPlayCustomInterface
sl@0: 	{
sl@0: public:
sl@0: 	TPlayCustomInterface() : iVolume(0),iBytesPlayed(0),iDevice(NULL),iRampDuration(0) {}
sl@0: 	void SetVolume(TUint aVolume);
sl@0: 	TUint Volume() {return iVolume;};
sl@0: 	TUint BytesPlayed();
sl@0: 	void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) {iRampDuration = aRampDuration;};
sl@0: 	TTimeIntervalMicroSeconds& VolumeRamp() {return iRampDuration;};
sl@0: 	TTaskConfig Caps();
sl@0: 	void SetDevice(CRoutingSoundPlayDevice* iDevice);//not for use outside codec wrapper
sl@0: private:
sl@0: 	TUint iVolume;
sl@0: 	TUint iBytesPlayed;
sl@0: 	CRoutingSoundPlayDevice* iDevice;
sl@0: 	TTimeIntervalMicroSeconds iRampDuration;
sl@0: 	};
sl@0: 
sl@0: /**
sl@0:  * Implementation of custom interface class for record functionality created by the 
sl@0:  * CMMFSwCodecWrapper::CustomInterface() method.  It provides 
sl@0:  * access to miscelaneous functionality such as volume settings
sl@0:  * Ports of sw codec wrapper may do this differently eg via EAP
sl@0:  * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
sl@0:  * across the sample rate and channels because 1)it would mean
sl@0:  * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
sl@0:  * the buffer size and encoding members are not required 3)3rd party ports
sl@0:  * may not use RMdaDevSound
sl@0:  * Note also that this interface is just a simple interface to get
sl@0:  * and set values.  No checking is perfomed on the values sent. (hence the
sl@0:  * Set methods do not return an error code.)
sl@0:  * @prototype
sl@0:  */
sl@0: class TRecordCustomInterface : public MRecordCustomInterface
sl@0: 	{
sl@0: public:
sl@0: 	TRecordCustomInterface() : iGain(0), iBytesRecorded(0), iDataPath(NULL) {}
sl@0: 	void SetGain(TUint aGain) {iGain = aGain;};
sl@0: 	void SetDataPath(CMMFSwCodecRecordDataPath* aDataPath){iDataPath = aDataPath;};
sl@0: 	TUint Gain() {return iGain;};
sl@0: 	TUint BytesRecorded(); 
sl@0: private:
sl@0: 	TUint iGain;
sl@0: 	TUint iBytesRecorded;
sl@0: 	CMMFSwCodecRecordDataPath* iDataPath;
sl@0: 	};
sl@0: 
sl@0: 
sl@0: #endif
sl@0: