os/mm/devsound/devsoundrefplugin/src/platsec/server/AudioServer/MmfAudioClientServer.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsound/devsoundrefplugin/src/platsec/server/AudioServer/MmfAudioClientServer.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,158 @@
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 MMFAUDIOCLIENTSERVER_H
1.20 +#define MMFAUDIOCLIENTSERVER_H
1.21 +
1.22 +#include <mmf/common/mmfutilities.h>
1.23 +#include <mmf/common/mmfbase.h>
1.24 +#include <mmf/server/sounddevice.h>
1.25 +
1.26 +// opcodes used in message passing between client and server
1.27 +enum TMMFAudioServerRequest
1.28 + {
1.29 + EMMFAudioLaunchRequests,
1.30 + EMMFDevSoundSessionHandle
1.31 + };
1.32 +
1.33 +enum TMMFDevSoundProxyRequest
1.34 + {
1.35 + EMMFDevSoundProxyInitialize1,
1.36 + EMMFDevSoundProxyInitialize2,
1.37 + EMMFDevSoundProxyInitialize3,
1.38 + EMMFDevSoundProxyInitialize4,
1.39 + EMMFDevSoundProxyCapabilities,
1.40 + EMMFDevSoundProxyConfig,
1.41 + EMMFDevSoundProxySetConfig,
1.42 + EMMFDevSoundProxyMaxVolume,
1.43 + EMMFDevSoundProxyVolume,
1.44 + EMMFDevSoundProxySetVolume,
1.45 + EMMFDevSoundProxyMaxGain,
1.46 + EMMFDevSoundProxyGain,
1.47 + EMMFDevSoundProxySetGain,
1.48 + EMMFDevSoundProxyPlayBalance,
1.49 + EMMFDevSoundProxySetPlayBalance,
1.50 + EMMFDevSoundProxyRecordBalance,
1.51 + EMMFDevSoundProxySetRecordBalance,
1.52 + EMMFDevSoundProxyICEvent,
1.53 + EMMFDevSoundProxyBTBFEvent,
1.54 + EMMFDevSoundProxyBTBEEvent,
1.55 + EMMFDevSoundProxyPEEvent,
1.56 + EMMFDevSoundProxyREEvent,
1.57 + EMMFDevSoundProxyTFEvent,
1.58 + EMMFDevSoundProxySETCEvent,
1.59 + EMMFDevSoundProxyPlayInit,
1.60 + EMMFDevSoundProxyRecordInit,
1.61 + EMMFDevSoundProxyPlayData,
1.62 + EMMFDevSoundProxyRecordData,
1.63 + EMMFDevSoundProxyStop,
1.64 + EMMFDevSoundProxyPause,
1.65 + EMMFDevSoundProxyPlayTone,
1.66 + EMMFDevSoundProxyPlayDualTone,
1.67 + EMMFDevSoundProxyPlayDTMFString,
1.68 + EMMFDevSoundProxyPlayDTMFStringLength,
1.69 + EMMFDevSoundProxyPlayToneSequence,
1.70 + EMMFDevSoundProxyPlayFixedSequence,
1.71 + EMMFDevSoundProxySetDTMFLengths,
1.72 + EMMFDevSoundProxySetVolumeRamp,
1.73 + EMMFDevSoundProxyGetSupportedInputDataTypes,
1.74 + EMMFDevSoundProxyGetSupportedOutputDataTypes,
1.75 + EMMFDevSoundProxyCopyFourCCArrayData,
1.76 + EMMFDevSoundProxyGetRecordedBuffer,
1.77 + EMMFDevSoundProxySamplesRecorded,
1.78 + EMMFDevSoundProxySamplesPlayed,
1.79 + EMMFDevSoundProxySetToneRepeats,
1.80 + EMMFDevSoundProxySetPrioritySettings,
1.81 + EMMFDevSoundProxyFixedSequenceName,
1.82 + EMMFDevSoundProxyCustomInterface,
1.83 + EMMFDevSoundProxyFixedSequenceCount,
1.84 + EMMFDevSoundProxyRequestResourceNotification,
1.85 + EMMFDevSoundProxyCancelRequestResourceNotification,
1.86 + EMMFDevSoundProxyGetResourceNotificationData,
1.87 + EMMFDevSoundProxyWillResumePlay,
1.88 + EMMFDevSoundProxyBTBFData,
1.89 + EMMFDevSoundProxyBTBEData,
1.90 + EMMFDevSoundProxySyncCustomCommand,
1.91 + EMMFDevSoundProxySyncCustomCommandResult,
1.92 + EMMFDevSoundProxyAsyncCustomCommand,
1.93 + EMMFDevSoundProxyAsyncCustomCommandResult,
1.94 + EMMFDevSoundProxyEmptyBuffers,
1.95 + EMMFDevSoundCustomCommandCloseMuxDemuxPair,
1.96 + EMMFDevSoundProxySetClientThreadInfo,
1.97 + EMMFDevSoundProxyGetTimePlayed
1.98 + };
1.99 +
1.100 +class TMMFDevSoundProxyHwBuf
1.101 +/**
1.102 +*@internalTechnology
1.103 +*/
1.104 + {
1.105 +public:
1.106 + TUid iBufferType;
1.107 + TInt iRequestSize;
1.108 + TBool iLastBuffer;
1.109 + TUint iBufferSize;
1.110 + };
1.111 +
1.112 +typedef TPckgBuf<TMMFDevSoundProxyHwBuf> TMMFDevSoundProxyHwBufPckg;
1.113 +
1.114 +
1.115 +class TMMFDevSoundProxySettings
1.116 +/**
1.117 +*@internalTechnology
1.118 +*/
1.119 + {
1.120 +public:
1.121 + TMMFState iMode;
1.122 + TUid iHWDev;
1.123 + TFourCC iDesiredFourCC;
1.124 + TMMFCapabilities iCaps;
1.125 + TMMFCapabilities iConfig;
1.126 + TInt iMaxVolume;
1.127 + TInt iVolume;
1.128 + TInt iMaxGain;
1.129 + TInt iGain;
1.130 + TInt iLeftPercentage;
1.131 + TInt iRightPercentage;
1.132 + TInt iFrequencyOne;
1.133 + TInt iFrequencyTwo;
1.134 + TTimeIntervalMicroSeconds iDuration;
1.135 + TTimeIntervalMicroSeconds32 iToneOnLength;
1.136 + TTimeIntervalMicroSeconds32 iToneOffLength;
1.137 + TTimeIntervalMicroSeconds32 iPauseLength;
1.138 + TUid iNotificationEventUid;
1.139 + };
1.140 +
1.141 +
1.142 +typedef TPckgBuf<TMMFDevSoundProxySettings> TMMFDevSoundProxySettingsPckg;
1.143 +const TInt KMaxFixedSequenceNameLength = 1024;
1.144 +
1.145 +/**
1.146 +*@internalTechnology
1.147 +* TMMFDevSoundQueueItem is used to pass asynch messages between the devsound proxy and server
1.148 +* for the observer's BufferToBeFilled, BufferToBeEmptied, PlayError, RecordError, ToneFinished,
1.149 +* InitializeComplete and SendEventToClient events.
1.150 +*/
1.151 +class TMMFDevSoundQueueItem
1.152 + {
1.153 +public:
1.154 + // Would've been nice to send TMMFDevSoundProxyHwBufPckg data here too
1.155 + // but that would break the message size limit
1.156 + TMMFDevSoundProxyRequest iRequest;
1.157 + TMMFEventPckg iEventPckg; // SendEventToClient message payload
1.158 + TInt iErrorCode; // InitComplete, ToneFinished, PlayError, RecordError message payload
1.159 + };
1.160 +
1.161 +#endif