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 MMFAUDIOCLIENTSERVER_H
|
sl@0
|
17 |
#define MMFAUDIOCLIENTSERVER_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <mmf/common/mmfutilities.h>
|
sl@0
|
20 |
#include <mmf/common/mmfbase.h>
|
sl@0
|
21 |
#include <mmf/server/sounddevice.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
// opcodes used in message passing between client and server
|
sl@0
|
24 |
enum TMMFAudioServerRequest
|
sl@0
|
25 |
{
|
sl@0
|
26 |
EMMFAudioLaunchRequests,
|
sl@0
|
27 |
EMMFDevSoundSessionHandle
|
sl@0
|
28 |
};
|
sl@0
|
29 |
|
sl@0
|
30 |
enum TMMFDevSoundProxyRequest
|
sl@0
|
31 |
{
|
sl@0
|
32 |
EMMFDevSoundProxyInitialize1,
|
sl@0
|
33 |
EMMFDevSoundProxyInitialize2,
|
sl@0
|
34 |
EMMFDevSoundProxyInitialize3,
|
sl@0
|
35 |
EMMFDevSoundProxyInitialize4,
|
sl@0
|
36 |
EMMFDevSoundProxyCapabilities,
|
sl@0
|
37 |
EMMFDevSoundProxyConfig,
|
sl@0
|
38 |
EMMFDevSoundProxySetConfig,
|
sl@0
|
39 |
EMMFDevSoundProxyMaxVolume,
|
sl@0
|
40 |
EMMFDevSoundProxyVolume,
|
sl@0
|
41 |
EMMFDevSoundProxySetVolume,
|
sl@0
|
42 |
EMMFDevSoundProxyMaxGain,
|
sl@0
|
43 |
EMMFDevSoundProxyGain,
|
sl@0
|
44 |
EMMFDevSoundProxySetGain,
|
sl@0
|
45 |
EMMFDevSoundProxyPlayBalance,
|
sl@0
|
46 |
EMMFDevSoundProxySetPlayBalance,
|
sl@0
|
47 |
EMMFDevSoundProxyRecordBalance,
|
sl@0
|
48 |
EMMFDevSoundProxySetRecordBalance,
|
sl@0
|
49 |
EMMFDevSoundProxyICEvent,
|
sl@0
|
50 |
EMMFDevSoundProxyBTBFEvent,
|
sl@0
|
51 |
EMMFDevSoundProxyBTBEEvent,
|
sl@0
|
52 |
EMMFDevSoundProxyPEEvent,
|
sl@0
|
53 |
EMMFDevSoundProxyREEvent,
|
sl@0
|
54 |
EMMFDevSoundProxyTFEvent,
|
sl@0
|
55 |
EMMFDevSoundProxySETCEvent,
|
sl@0
|
56 |
EMMFDevSoundProxyPlayInit,
|
sl@0
|
57 |
EMMFDevSoundProxyRecordInit,
|
sl@0
|
58 |
EMMFDevSoundProxyPlayData,
|
sl@0
|
59 |
EMMFDevSoundProxyRecordData,
|
sl@0
|
60 |
EMMFDevSoundProxyStop,
|
sl@0
|
61 |
EMMFDevSoundProxyPause,
|
sl@0
|
62 |
EMMFDevSoundProxyPlayTone,
|
sl@0
|
63 |
EMMFDevSoundProxyPlayDualTone,
|
sl@0
|
64 |
EMMFDevSoundProxyPlayDTMFString,
|
sl@0
|
65 |
EMMFDevSoundProxyPlayDTMFStringLength,
|
sl@0
|
66 |
EMMFDevSoundProxyPlayToneSequence,
|
sl@0
|
67 |
EMMFDevSoundProxyPlayFixedSequence,
|
sl@0
|
68 |
EMMFDevSoundProxySetDTMFLengths,
|
sl@0
|
69 |
EMMFDevSoundProxySetVolumeRamp,
|
sl@0
|
70 |
EMMFDevSoundProxyGetSupportedInputDataTypes,
|
sl@0
|
71 |
EMMFDevSoundProxyGetSupportedOutputDataTypes,
|
sl@0
|
72 |
EMMFDevSoundProxyCopyFourCCArrayData,
|
sl@0
|
73 |
EMMFDevSoundProxyGetRecordedBuffer,
|
sl@0
|
74 |
EMMFDevSoundProxySamplesRecorded,
|
sl@0
|
75 |
EMMFDevSoundProxySamplesPlayed,
|
sl@0
|
76 |
EMMFDevSoundProxySetToneRepeats,
|
sl@0
|
77 |
EMMFDevSoundProxySetPrioritySettings,
|
sl@0
|
78 |
EMMFDevSoundProxyFixedSequenceName,
|
sl@0
|
79 |
EMMFDevSoundProxyCustomInterface,
|
sl@0
|
80 |
EMMFDevSoundProxyFixedSequenceCount,
|
sl@0
|
81 |
EMMFDevSoundProxyRequestResourceNotification,
|
sl@0
|
82 |
EMMFDevSoundProxyCancelRequestResourceNotification,
|
sl@0
|
83 |
EMMFDevSoundProxyGetResourceNotificationData,
|
sl@0
|
84 |
EMMFDevSoundProxyWillResumePlay,
|
sl@0
|
85 |
EMMFDevSoundProxyBTBFData,
|
sl@0
|
86 |
EMMFDevSoundProxyBTBEData,
|
sl@0
|
87 |
EMMFDevSoundProxySyncCustomCommand,
|
sl@0
|
88 |
EMMFDevSoundProxySyncCustomCommandResult,
|
sl@0
|
89 |
EMMFDevSoundProxyAsyncCustomCommand,
|
sl@0
|
90 |
EMMFDevSoundProxyAsyncCustomCommandResult,
|
sl@0
|
91 |
EMMFDevSoundProxyEmptyBuffers,
|
sl@0
|
92 |
EMMFDevSoundCustomCommandCloseMuxDemuxPair,
|
sl@0
|
93 |
EMMFDevSoundProxySetClientThreadInfo,
|
sl@0
|
94 |
EMMFDevSoundProxyGetTimePlayed
|
sl@0
|
95 |
};
|
sl@0
|
96 |
|
sl@0
|
97 |
class TMMFDevSoundProxyHwBuf
|
sl@0
|
98 |
/**
|
sl@0
|
99 |
*@internalTechnology
|
sl@0
|
100 |
*/
|
sl@0
|
101 |
{
|
sl@0
|
102 |
public:
|
sl@0
|
103 |
TUid iBufferType;
|
sl@0
|
104 |
TInt iRequestSize;
|
sl@0
|
105 |
TBool iLastBuffer;
|
sl@0
|
106 |
TUint iBufferSize;
|
sl@0
|
107 |
};
|
sl@0
|
108 |
|
sl@0
|
109 |
typedef TPckgBuf<TMMFDevSoundProxyHwBuf> TMMFDevSoundProxyHwBufPckg;
|
sl@0
|
110 |
|
sl@0
|
111 |
|
sl@0
|
112 |
class TMMFDevSoundProxySettings
|
sl@0
|
113 |
/**
|
sl@0
|
114 |
*@internalTechnology
|
sl@0
|
115 |
*/
|
sl@0
|
116 |
{
|
sl@0
|
117 |
public:
|
sl@0
|
118 |
TMMFState iMode;
|
sl@0
|
119 |
TUid iHWDev;
|
sl@0
|
120 |
TFourCC iDesiredFourCC;
|
sl@0
|
121 |
TMMFCapabilities iCaps;
|
sl@0
|
122 |
TMMFCapabilities iConfig;
|
sl@0
|
123 |
TInt iMaxVolume;
|
sl@0
|
124 |
TInt iVolume;
|
sl@0
|
125 |
TInt iMaxGain;
|
sl@0
|
126 |
TInt iGain;
|
sl@0
|
127 |
TInt iLeftPercentage;
|
sl@0
|
128 |
TInt iRightPercentage;
|
sl@0
|
129 |
TInt iFrequencyOne;
|
sl@0
|
130 |
TInt iFrequencyTwo;
|
sl@0
|
131 |
TTimeIntervalMicroSeconds iDuration;
|
sl@0
|
132 |
TTimeIntervalMicroSeconds32 iToneOnLength;
|
sl@0
|
133 |
TTimeIntervalMicroSeconds32 iToneOffLength;
|
sl@0
|
134 |
TTimeIntervalMicroSeconds32 iPauseLength;
|
sl@0
|
135 |
TUid iNotificationEventUid;
|
sl@0
|
136 |
};
|
sl@0
|
137 |
|
sl@0
|
138 |
|
sl@0
|
139 |
typedef TPckgBuf<TMMFDevSoundProxySettings> TMMFDevSoundProxySettingsPckg;
|
sl@0
|
140 |
const TInt KMaxFixedSequenceNameLength = 1024;
|
sl@0
|
141 |
|
sl@0
|
142 |
/**
|
sl@0
|
143 |
*@internalTechnology
|
sl@0
|
144 |
* TMMFDevSoundQueueItem is used to pass asynch messages between the devsound proxy and server
|
sl@0
|
145 |
* for the observer's BufferToBeFilled, BufferToBeEmptied, PlayError, RecordError, ToneFinished,
|
sl@0
|
146 |
* InitializeComplete and SendEventToClient events.
|
sl@0
|
147 |
*/
|
sl@0
|
148 |
class TMMFDevSoundQueueItem
|
sl@0
|
149 |
{
|
sl@0
|
150 |
public:
|
sl@0
|
151 |
// Would've been nice to send TMMFDevSoundProxyHwBufPckg data here too
|
sl@0
|
152 |
// but that would break the message size limit
|
sl@0
|
153 |
TMMFDevSoundProxyRequest iRequest;
|
sl@0
|
154 |
TMMFEventPckg iEventPckg; // SendEventToClient message payload
|
sl@0
|
155 |
TInt iErrorCode; // InitComplete, ToneFinished, PlayError, RecordError message payload
|
sl@0
|
156 |
};
|
sl@0
|
157 |
|
sl@0
|
158 |
#endif
|