os/mm/devsound/sounddevbt/PlatSec/src/Client/MmfBtDevSoundProxy.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/sounddevbt/PlatSec/src/Client/MmfBtDevSoundProxy.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,116 @@
     1.4 +// Copyright (c) 2004-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 __MMFDEVSOUNDPROXY_H__
    1.20 +#define __MMFDEVSOUNDPROXY_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <e32std.h>
    1.24 +#include <mmf/common/mmfipc.h>
    1.25 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.26 +#include <mmf/common/mmfipcserver.h>
    1.27 +#endif
    1.28 +#include "MmfBtAudioClientServer.h"
    1.29 +#include "MmfBtAudioServerProxy.h"
    1.30 +
    1.31 +
    1.32 +class RMMFDevSoundProxy; // declared here.
    1.33 +
    1.34 +NONSHARABLE_CLASS( RMMFDevSoundProxy ): public RMmfSessionBase
    1.35 +/**
    1.36 +*@internalTechnology
    1.37 +*/
    1.38 +	{
    1.39 +public:
    1.40 +
    1.41 +	IMPORT_C TInt Open();
    1.42 +	IMPORT_C TInt SetDevSoundInfo();
    1.43 +	IMPORT_C TInt InitializeL(TMMFState aMode);
    1.44 +	IMPORT_C TInt InitializeL(TUid aHWDev, TMMFState aMode);
    1.45 +	IMPORT_C TInt InitializeL(CArrayPtr<TUid> /*aHWDevArray*/, TMMFState /*aMode*/);
    1.46 +	IMPORT_C TInt InitializeL(TFourCC aDesiredFourCC, TMMFState aMode);
    1.47 +	IMPORT_C TMMFCapabilities Capabilities();
    1.48 +	IMPORT_C TMMFCapabilities Config();
    1.49 +	IMPORT_C TInt SetConfigL(const TMMFCapabilities& aConfig);
    1.50 +	IMPORT_C TInt MaxVolume();
    1.51 +	IMPORT_C TInt Volume();
    1.52 +	IMPORT_C TInt SetVolume(TInt aVolume);
    1.53 +	IMPORT_C TInt MaxGain();
    1.54 +	IMPORT_C TInt Gain();
    1.55 +	IMPORT_C TInt SetGain(TInt aGain);
    1.56 +	IMPORT_C void GetPlayBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
    1.57 +	IMPORT_C void SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
    1.58 +	IMPORT_C void GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
    1.59 +	IMPORT_C void SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
    1.60 +	IMPORT_C void Close();
    1.61 +	IMPORT_C void PlayInitL();
    1.62 +	IMPORT_C void RecordInitL();
    1.63 +	IMPORT_C void PlayData();
    1.64 +	IMPORT_C void RecordData();
    1.65 +	IMPORT_C void Stop();
    1.66 +	IMPORT_C void Pause();
    1.67 +	IMPORT_C void PlayToneL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration);
    1.68 +	IMPORT_C void PlayDualToneL(TInt aFrequencyOne, TInt aFrequencyTwo, const TTimeIntervalMicroSeconds& aDuration);
    1.69 +	IMPORT_C void PlayDTMFStringL(const TDesC& aDTMFString);
    1.70 +	IMPORT_C void PlayToneSequenceL(const TDesC8& aData);
    1.71 +	IMPORT_C void PlayFixedSequenceL(TInt aSequenceNumber);
    1.72 +	IMPORT_C void SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength,
    1.73 +								 TTimeIntervalMicroSeconds32& aToneOffLength,
    1.74 +								 TTimeIntervalMicroSeconds32& aPauseLength);
    1.75 +	IMPORT_C void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
    1.76 +	IMPORT_C void GetSupportedInputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
    1.77 +	IMPORT_C void GetSupportedOutputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
    1.78 +	IMPORT_C TInt SamplesRecorded();
    1.79 +	IMPORT_C TInt SamplesPlayed();
    1.80 +	IMPORT_C void SetToneRepeats(TInt aRepeatCount, const TTimeIntervalMicroSeconds& aRepeatTrailingSilence);
    1.81 +	IMPORT_C void SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings);
    1.82 +	IMPORT_C const TDesC& FixedSequenceName(TInt aSequenceNumber);
    1.83 +	IMPORT_C void ConvertInitL();
    1.84 +	IMPORT_C void ConvertData();
    1.85 +	IMPORT_C TAny* CustomInterface(TUid aInterfaceId);
    1.86 +	IMPORT_C TInt FixedSequenceCount();
    1.87 +
    1.88 +	IMPORT_C void ReceiveInitializeCompleteEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.89 +	IMPORT_C void CancelReceiveInitializeCompleteEvent();
    1.90 +	IMPORT_C void ReceiveBufferToBeFilledEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.91 +	IMPORT_C void CancelReceiveBufferToBeFilledEvent();
    1.92 +	IMPORT_C void ReceiveBufferToBeEmptiedEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.93 +	IMPORT_C void CancelReceiveBufferToBeEmptiedEvent();
    1.94 +	IMPORT_C void ReceivePlayErrorEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.95 +	IMPORT_C void CancelReceivePlayErrorEvent();
    1.96 +	IMPORT_C void ReceiveRecordErrorEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.97 +	IMPORT_C void CancelReceiveRecordErrorEvent();
    1.98 +	IMPORT_C void ReceiveToneFinishedEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    1.99 +	IMPORT_C void CancelReceiveToneFinishedEvent();
   1.100 +	IMPORT_C void ReceiveSendEventToClientEvent(TMMFEventPckg& aEventPckg, TRequestStatus& aStatus);
   1.101 +	IMPORT_C void CancelReceiveSendEventToClientEvent();
   1.102 +
   1.103 +	IMPORT_C void CancelReceiveEvents();
   1.104 +	IMPORT_C void SetBuffer(CMMFDataBuffer* aBuffer);
   1.105 +	IMPORT_C TInt GetRecordedBufferL(CMMFDataBuffer& aBuffer);
   1.106 +
   1.107 +	IMPORT_C TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData = KNullDesC8);
   1.108 +	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
   1.109 +	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
   1.110 +	IMPORT_C TInt WillResumePlay();
   1.111 +	IMPORT_C TInt SetClientThreadInfo(TThreadId& aTid);
   1.112 +
   1.113 +private:
   1.114 +	TMMFDevSoundProxySettingsPckg iDspsPckg;
   1.115 +	CMMFDataBuffer* iBuffer;
   1.116 +	HBufC* iSeqName;
   1.117 +	};
   1.118 +
   1.119 +#endif