Update contrib.
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #ifndef MMFAUDIOCLIENTSERVER_H
21 #define MMFAUDIOCLIENTSERVER_H
24 #include <mmf/common/mmfutilities.h>
25 #include <mmf/common/mmfbase.h>
26 #include <mmf/server/sounddevice.h>
29 // opcodes used in message passing between client and server
30 enum TMMFAudioServerRequest
32 EMMFAudioLaunchRequests,
33 EMMFDevSoundSessionHandle
36 // opcodes used in message passing between client and server for DevSound
38 enum TMMFDevSoundProxyRequest
40 EMMFDevSoundProxyPostOpen,
41 EMMFDevSoundProxyInitialize1,
42 EMMFDevSoundProxyInitialize2,
43 EMMFDevSoundProxyInitialize3,
44 EMMFDevSoundProxyInitialize4,
45 EMMFDevSoundProxyCapabilities,
46 EMMFDevSoundProxyConfig,
47 EMMFDevSoundProxySetConfig,
48 EMMFDevSoundProxyMaxVolume,
49 EMMFDevSoundProxyVolume,
50 EMMFDevSoundProxySetVolume,
51 EMMFDevSoundProxyMaxGain,
52 EMMFDevSoundProxyGain,
53 EMMFDevSoundProxySetGain,
54 EMMFDevSoundProxyPlayBalance,
55 EMMFDevSoundProxySetPlayBalance,
56 EMMFDevSoundProxyRecordBalance,
57 EMMFDevSoundProxySetRecordBalance,
58 EMMFDevSoundProxyICEvent,
59 EMMFDevSoundProxyBTBFEvent,
60 EMMFDevSoundProxyBTBEEvent,
61 EMMFDevSoundProxyPEEvent,
62 EMMFDevSoundProxyREEvent,
63 EMMFDevSoundProxyTFEvent,
64 EMMFDevSoundProxySETCEvent,
65 EMMFDevSoundProxyPlayInit,
66 EMMFDevSoundProxyRecordInit,
67 EMMFDevSoundProxyPlayData,
68 EMMFDevSoundProxyRecordData,
69 EMMFDevSoundProxyStop,
70 EMMFDevSoundProxyPause,
71 EMMFDevSoundProxyPlayTone,
72 EMMFDevSoundProxyPlayDualTone,
73 EMMFDevSoundProxyPlayDTMFString,
74 EMMFDevSoundProxyPlayDTMFStringLength,
75 EMMFDevSoundProxyPlayToneSequence,
76 EMMFDevSoundProxyPlayFixedSequence,
77 EMMFDevSoundProxySetDTMFLengths,
78 EMMFDevSoundProxySetVolumeRamp,
79 EMMFDevSoundProxyGetSupportedInputDataTypes,
80 EMMFDevSoundProxyGetSupportedOutputDataTypes,
81 EMMFDevSoundProxyCopyFourCCArrayData,
82 EMMFDevSoundProxySamplesRecorded,
83 EMMFDevSoundProxySamplesPlayed,
84 EMMFDevSoundProxySetToneRepeats,
85 EMMFDevSoundProxySetPrioritySettings,
86 EMMFDevSoundProxyFixedSequenceName,
87 EMMFDevSoundProxyCustomInterface,
88 EMMFDevSoundProxyFixedSequenceCount,
89 EMMFDevSoundProxyRequestResourceNotification,
90 EMMFDevSoundProxyCancelRequestResourceNotification,
91 EMMFDevSoundProxyGetResourceNotificationData,
92 EMMFDevSoundProxyWillResumePlay,
93 EMMFDevSoundProxyEmptyBuffers,
94 EMMFDevSoundProxyCancelInitialize,
95 EMMFDevSoundProxyBTBFData,
96 EMMFDevSoundProxyBTBEData,
97 EMMFDevSoundProxySyncCustomCommand,
98 EMMFDevSoundProxySyncCustomCommandResult,
99 EMMFDevSoundProxyAsyncCustomCommand,
100 EMMFDevSoundProxyAsyncCustomCommandResult,
101 EMMFDevSoundCustomCommandCloseMuxDemuxPair,
102 EMMFDevSoundProxyClose,
103 EMMFDevSoundProxyPausedRecordCompleteEvent,
104 EMMFDevSoundProxyGetTimePlayed,
105 EMMFDevSoundProxySetClientThreadInfo,
106 EMMFDevSoundProxyIsResumeSupported,
107 EMMFDevSoundProxyResume,
108 EMMFDevSoundProxyMarkEvent
111 // Signals that the message is destined for the DevSound
112 const TUid KUidInterfaceMMFDevSound = {0x10207ABA};
113 const TInt KMMFObjectHandleDevSound = -3;
115 // Addresses the chunk states
123 * A class representing CMMFBuffer information.
124 * Buffers are used for both playback and recording.
126 * @lib MmfDevSoundAdaptation.lib
128 class TMMFDevSoundProxyHwBuf
138 typedef TPckgBuf<TMMFDevSoundProxyHwBuf> TMMFDevSoundProxyHwBufPckg;
141 * A class representing settings information used to send configuration
142 * information to DevSound server.
143 * Buffers are used for both playback and recording digital audio.
145 * @lib MmfDevSoundAdaptation.lib
147 class TMMFDevSoundProxySettings
152 TFourCC iDesiredFourCC;
153 TMMFCapabilities iCaps;
154 TMMFCapabilities iConfig;
159 TInt iLeftPercentage;
160 TInt iRightPercentage;
163 TTimeIntervalMicroSeconds iDuration;
164 TTimeIntervalMicroSeconds32 iToneOnLength;
165 TTimeIntervalMicroSeconds32 iToneOffLength;
166 TTimeIntervalMicroSeconds32 iPauseLength;
167 TUid iNotificationEventUid;
171 // Packages a DevSound object information into a modifiable buffer descriptor.
172 // Provides a type safe way of transferring an object or data structure which is contained within a modifiable buffer descriptor.
173 typedef TPckgBuf<TMMFDevSoundProxySettings> TMMFDevSoundProxySettingsPckg;
175 // Tone Fixed Sequence Max Length
176 const TInt KMaxFixedSequenceNameLength = 1024;
179 * TMMFDevSoundQueueItem is used to pass asynch messages between the devsound
180 * proxy and server for the observer's BufferToBeFilled, BufferToBeEmptied,
181 * PlayError, RecordError, ToneFinished, InitializeComplete and
182 * SendEventToClient events.
184 class TMMFDevSoundQueueItem
187 TMMFDevSoundProxyRequest iRequest;
188 TMMFEventPckg iEventPckg; // SendEventToClient message payload
189 TInt iErrorCode; // InitComplete, ToneFinished, PlayError, RecordError message payload
192 #endif //MMFAUDIOCLIENTSERVER_H