sl@0
|
1 |
// Copyright (c) 2004-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 __MMFDEVSOUNDPROXY_H__
|
sl@0
|
17 |
#define __MMFDEVSOUNDPROXY_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32base.h>
|
sl@0
|
20 |
#include <e32std.h>
|
sl@0
|
21 |
#include <mmf/common/mmfipc.h>
|
sl@0
|
22 |
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
|
sl@0
|
23 |
#include <mmf/common/mmfipcserver.h>
|
sl@0
|
24 |
#endif
|
sl@0
|
25 |
#include "MmfAudioClientServer.h"
|
sl@0
|
26 |
#include "MmfAudioServerProxy.h"
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
Panic category and codes for the MmfDevSoundProxy
|
sl@0
|
31 |
@internalTechnology
|
sl@0
|
32 |
*/
|
sl@0
|
33 |
_LIT(KMMFDevSoundProxyPanicCategory, "MmfDevSoundProxy");
|
sl@0
|
34 |
enum TMMFDevSoundProxyPanicCodes
|
sl@0
|
35 |
{
|
sl@0
|
36 |
EMMFDevSoundProxyPlayDataWithoutInitialize,
|
sl@0
|
37 |
EMMFDevSoundProxyRecordDataWithoutInitialize,
|
sl@0
|
38 |
EMMFDevSoundProxyConvertDataWithoutInitialize
|
sl@0
|
39 |
};
|
sl@0
|
40 |
|
sl@0
|
41 |
class RMMFDevSoundProxy; // declared here.
|
sl@0
|
42 |
|
sl@0
|
43 |
NONSHARABLE_CLASS( RMMFDevSoundProxy ): public RMmfSessionBase
|
sl@0
|
44 |
/**
|
sl@0
|
45 |
*@internalTechnology
|
sl@0
|
46 |
*/
|
sl@0
|
47 |
{
|
sl@0
|
48 |
public:
|
sl@0
|
49 |
|
sl@0
|
50 |
IMPORT_C RMMFDevSoundProxy();
|
sl@0
|
51 |
IMPORT_C TInt Open(RHandleBase& aMsgQueueHandle);
|
sl@0
|
52 |
IMPORT_C TInt SetDevSoundInfo();
|
sl@0
|
53 |
IMPORT_C TInt InitializeL(TMMFState aMode);
|
sl@0
|
54 |
IMPORT_C TInt InitializeL(TUid aHWDev, TMMFState aMode);
|
sl@0
|
55 |
IMPORT_C TInt InitializeL(TFourCC aDesiredFourCC, TMMFState aMode);
|
sl@0
|
56 |
IMPORT_C TMMFCapabilities Capabilities();
|
sl@0
|
57 |
IMPORT_C TMMFCapabilities Config();
|
sl@0
|
58 |
IMPORT_C TInt SetConfigL(const TMMFCapabilities& aConfig);
|
sl@0
|
59 |
IMPORT_C TInt MaxVolume();
|
sl@0
|
60 |
IMPORT_C TInt Volume();
|
sl@0
|
61 |
IMPORT_C TInt SetVolume(TInt aVolume);
|
sl@0
|
62 |
IMPORT_C TInt MaxGain();
|
sl@0
|
63 |
IMPORT_C TInt Gain();
|
sl@0
|
64 |
IMPORT_C TInt SetGain(TInt aGain);
|
sl@0
|
65 |
IMPORT_C void GetPlayBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
|
sl@0
|
66 |
IMPORT_C void SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
|
sl@0
|
67 |
IMPORT_C void GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
|
sl@0
|
68 |
IMPORT_C void SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
|
sl@0
|
69 |
IMPORT_C void Close();
|
sl@0
|
70 |
IMPORT_C void PlayInitL();
|
sl@0
|
71 |
IMPORT_C void RecordInitL();
|
sl@0
|
72 |
IMPORT_C void PlayData();
|
sl@0
|
73 |
IMPORT_C void RecordData();
|
sl@0
|
74 |
IMPORT_C void Stop();
|
sl@0
|
75 |
IMPORT_C void Pause();
|
sl@0
|
76 |
IMPORT_C void PlayToneL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration);
|
sl@0
|
77 |
IMPORT_C void PlayDualToneL(TInt aFrequencyOne, TInt aFrequencyTwo, const TTimeIntervalMicroSeconds& aDuration);
|
sl@0
|
78 |
IMPORT_C void PlayDTMFStringL(const TDesC& aDTMFString);
|
sl@0
|
79 |
IMPORT_C void PlayToneSequenceL(const TDesC8& aData);
|
sl@0
|
80 |
IMPORT_C void PlayFixedSequenceL(TInt aSequenceNumber);
|
sl@0
|
81 |
IMPORT_C void SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength,
|
sl@0
|
82 |
TTimeIntervalMicroSeconds32& aToneOffLength,
|
sl@0
|
83 |
TTimeIntervalMicroSeconds32& aPauseLength);
|
sl@0
|
84 |
IMPORT_C void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
|
sl@0
|
85 |
IMPORT_C void GetSupportedInputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
|
sl@0
|
86 |
IMPORT_C void GetSupportedOutputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings);
|
sl@0
|
87 |
IMPORT_C TInt SamplesRecorded();
|
sl@0
|
88 |
IMPORT_C TInt SamplesPlayed();
|
sl@0
|
89 |
IMPORT_C void SetToneRepeats(TInt aRepeatCount, const TTimeIntervalMicroSeconds& aRepeatTrailingSilence);
|
sl@0
|
90 |
IMPORT_C void SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings);
|
sl@0
|
91 |
IMPORT_C const TDesC& FixedSequenceName(TInt aSequenceNumber);
|
sl@0
|
92 |
IMPORT_C TAny* CustomInterface(TUid aInterfaceId);
|
sl@0
|
93 |
IMPORT_C TInt FixedSequenceCount();
|
sl@0
|
94 |
|
sl@0
|
95 |
IMPORT_C TInt BufferToBeFilledData(TMMFDevSoundProxyHwBufPckg& aSetPckg);
|
sl@0
|
96 |
IMPORT_C TInt BufferToBeEmptiedData(TMMFDevSoundProxyHwBufPckg& aSetPckg);
|
sl@0
|
97 |
|
sl@0
|
98 |
IMPORT_C void CancelReceiveEvents();
|
sl@0
|
99 |
IMPORT_C void SetBuffer(CMMFDataBuffer* aBuffer);
|
sl@0
|
100 |
IMPORT_C TInt GetRecordedBufferL(CMMFDataBuffer& aBuffer);
|
sl@0
|
101 |
|
sl@0
|
102 |
IMPORT_C TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData = KNullDesC8);
|
sl@0
|
103 |
IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
|
sl@0
|
104 |
IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
|
sl@0
|
105 |
IMPORT_C TInt WillResumePlay();
|
sl@0
|
106 |
IMPORT_C TInt EmptyBuffers();
|
sl@0
|
107 |
|
sl@0
|
108 |
IMPORT_C TInt SyncCustomCommand(TUid aUid, const TDesC8& aParam1, const TDesC8& aParam2, TDes8* aOutParam);
|
sl@0
|
109 |
IMPORT_C void AsyncCustomCommand(TUid aUid, TRequestStatus& aStatus, const TDesC8& aParam1, const TDesC8& aParam2, TDes8* aOutParam);
|
sl@0
|
110 |
IMPORT_C TInt SetClientThreadInfo(TThreadId& aTid);
|
sl@0
|
111 |
IMPORT_C TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime);
|
sl@0
|
112 |
|
sl@0
|
113 |
private:
|
sl@0
|
114 |
TMMFDevSoundProxySettingsPckg iDspsPckg;
|
sl@0
|
115 |
CMMFDataBuffer* iBuffer;
|
sl@0
|
116 |
HBufC* iSeqName;
|
sl@0
|
117 |
enum TState
|
sl@0
|
118 |
{
|
sl@0
|
119 |
EIdle=0,
|
sl@0
|
120 |
EPlaying,
|
sl@0
|
121 |
ERecording,
|
sl@0
|
122 |
EConverting
|
sl@0
|
123 |
};
|
sl@0
|
124 |
TState iState;
|
sl@0
|
125 |
RHandleBase* iMsgQueueHandle;
|
sl@0
|
126 |
RMMFAudioServerProxy* iAudioServerProxy;
|
sl@0
|
127 |
};
|
sl@0
|
128 |
|
sl@0
|
129 |
#endif
|