os/mm/devsound/sounddevbt/PlatSec/src/Client/MmfBtDevSoundProxy.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMFDEVSOUNDPROXY_H__
    17 #define __MMFDEVSOUNDPROXY_H__
    18 
    19 #include <e32base.h>
    20 #include <e32std.h>
    21 #include <mmf/common/mmfipc.h>
    22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    23 #include <mmf/common/mmfipcserver.h>
    24 #endif
    25 #include "MmfBtAudioClientServer.h"
    26 #include "MmfBtAudioServerProxy.h"
    27 
    28 
    29 class RMMFDevSoundProxy; // declared here.
    30 
    31 NONSHARABLE_CLASS( RMMFDevSoundProxy ): public RMmfSessionBase
    32 /**
    33 *@internalTechnology
    34 */
    35 	{
    36 public:
    37 
    38 	IMPORT_C TInt Open();
    39 	IMPORT_C TInt SetDevSoundInfo();
    40 	IMPORT_C TInt InitializeL(TMMFState aMode);
    41 	IMPORT_C TInt InitializeL(TUid aHWDev, TMMFState aMode);
    42 	IMPORT_C TInt InitializeL(CArrayPtr<TUid> /*aHWDevArray*/, TMMFState /*aMode*/);
    43 	IMPORT_C TInt InitializeL(TFourCC aDesiredFourCC, TMMFState aMode);
    44 	IMPORT_C TMMFCapabilities Capabilities();
    45 	IMPORT_C TMMFCapabilities Config();
    46 	IMPORT_C TInt SetConfigL(const TMMFCapabilities& aConfig);
    47 	IMPORT_C TInt MaxVolume();
    48 	IMPORT_C TInt Volume();
    49 	IMPORT_C TInt SetVolume(TInt aVolume);
    50 	IMPORT_C TInt MaxGain();
    51 	IMPORT_C TInt Gain();
    52 	IMPORT_C TInt SetGain(TInt aGain);
    53 	IMPORT_C void GetPlayBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
    54 	IMPORT_C void SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
    55 	IMPORT_C void GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
    56 	IMPORT_C void SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
    57 	IMPORT_C void Close();
    58 	IMPORT_C void PlayInitL();
    59 	IMPORT_C void RecordInitL();
    60 	IMPORT_C void PlayData();
    61 	IMPORT_C void RecordData();
    62 	IMPORT_C void Stop();
    63 	IMPORT_C void Pause();
    64 	IMPORT_C void PlayToneL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration);
    65 	IMPORT_C void PlayDualToneL(TInt aFrequencyOne, TInt aFrequencyTwo, const TTimeIntervalMicroSeconds& aDuration);
    66 	IMPORT_C void PlayDTMFStringL(const TDesC& aDTMFString);
    67 	IMPORT_C void PlayToneSequenceL(const TDesC8& aData);
    68 	IMPORT_C void PlayFixedSequenceL(TInt aSequenceNumber);
    69 	IMPORT_C void SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength,
    70 								 TTimeIntervalMicroSeconds32& aToneOffLength,
    71 								 TTimeIntervalMicroSeconds32& aPauseLength);
    72 	IMPORT_C void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
    73 	IMPORT_C void GetSupportedInputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
    74 	IMPORT_C void GetSupportedOutputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
    75 	IMPORT_C TInt SamplesRecorded();
    76 	IMPORT_C TInt SamplesPlayed();
    77 	IMPORT_C void SetToneRepeats(TInt aRepeatCount, const TTimeIntervalMicroSeconds& aRepeatTrailingSilence);
    78 	IMPORT_C void SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings);
    79 	IMPORT_C const TDesC& FixedSequenceName(TInt aSequenceNumber);
    80 	IMPORT_C void ConvertInitL();
    81 	IMPORT_C void ConvertData();
    82 	IMPORT_C TAny* CustomInterface(TUid aInterfaceId);
    83 	IMPORT_C TInt FixedSequenceCount();
    84 
    85 	IMPORT_C void ReceiveInitializeCompleteEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    86 	IMPORT_C void CancelReceiveInitializeCompleteEvent();
    87 	IMPORT_C void ReceiveBufferToBeFilledEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    88 	IMPORT_C void CancelReceiveBufferToBeFilledEvent();
    89 	IMPORT_C void ReceiveBufferToBeEmptiedEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    90 	IMPORT_C void CancelReceiveBufferToBeEmptiedEvent();
    91 	IMPORT_C void ReceivePlayErrorEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    92 	IMPORT_C void CancelReceivePlayErrorEvent();
    93 	IMPORT_C void ReceiveRecordErrorEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    94 	IMPORT_C void CancelReceiveRecordErrorEvent();
    95 	IMPORT_C void ReceiveToneFinishedEvent(TMMFDevSoundProxyHwBufPckg& aSetPckg, TRequestStatus& aStatus);
    96 	IMPORT_C void CancelReceiveToneFinishedEvent();
    97 	IMPORT_C void ReceiveSendEventToClientEvent(TMMFEventPckg& aEventPckg, TRequestStatus& aStatus);
    98 	IMPORT_C void CancelReceiveSendEventToClientEvent();
    99 
   100 	IMPORT_C void CancelReceiveEvents();
   101 	IMPORT_C void SetBuffer(CMMFDataBuffer* aBuffer);
   102 	IMPORT_C TInt GetRecordedBufferL(CMMFDataBuffer& aBuffer);
   103 
   104 	IMPORT_C TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData = KNullDesC8);
   105 	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
   106 	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
   107 	IMPORT_C TInt WillResumePlay();
   108 	IMPORT_C TInt SetClientThreadInfo(TThreadId& aTid);
   109 
   110 private:
   111 	TMMFDevSoundProxySettingsPckg iDspsPckg;
   112 	CMMFDataBuffer* iBuffer;
   113 	HBufC* iSeqName;
   114 	};
   115 
   116 #endif