sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef MMFAUDIOCLIENTSERVER_H sl@0: #define MMFAUDIOCLIENTSERVER_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // opcodes used in message passing between client and server sl@0: enum TMMFAudioServerRequest sl@0: { sl@0: EMMFAudioLaunchRequests, sl@0: EMMFDevSoundSessionHandle sl@0: }; sl@0: sl@0: enum TMMFDevSoundProxyRequest sl@0: { sl@0: EMMFDevSoundProxyInitialize1, sl@0: EMMFDevSoundProxyInitialize2, sl@0: EMMFDevSoundProxyInitialize3, sl@0: EMMFDevSoundProxyInitialize4, sl@0: EMMFDevSoundProxyCapabilities, sl@0: EMMFDevSoundProxyConfig, sl@0: EMMFDevSoundProxySetConfig, sl@0: EMMFDevSoundProxyMaxVolume, sl@0: EMMFDevSoundProxyVolume, sl@0: EMMFDevSoundProxySetVolume, sl@0: EMMFDevSoundProxyMaxGain, sl@0: EMMFDevSoundProxyGain, sl@0: EMMFDevSoundProxySetGain, sl@0: EMMFDevSoundProxyPlayBalance, sl@0: EMMFDevSoundProxySetPlayBalance, sl@0: EMMFDevSoundProxyRecordBalance, sl@0: EMMFDevSoundProxySetRecordBalance, sl@0: EMMFDevSoundProxyICEvent, sl@0: EMMFDevSoundProxyBTBFEvent, sl@0: EMMFDevSoundProxyBTBEEvent, sl@0: EMMFDevSoundProxyPEEvent, sl@0: EMMFDevSoundProxyREEvent, sl@0: EMMFDevSoundProxyTFEvent, sl@0: EMMFDevSoundProxySETCEvent, sl@0: EMMFDevSoundProxyPlayInit, sl@0: EMMFDevSoundProxyRecordInit, sl@0: EMMFDevSoundProxyPlayData, sl@0: EMMFDevSoundProxyRecordData, sl@0: EMMFDevSoundProxyStop, sl@0: EMMFDevSoundProxyPause, sl@0: EMMFDevSoundProxyPlayTone, sl@0: EMMFDevSoundProxyPlayDualTone, sl@0: EMMFDevSoundProxyPlayDTMFString, sl@0: EMMFDevSoundProxyPlayDTMFStringLength, sl@0: EMMFDevSoundProxyPlayToneSequence, sl@0: EMMFDevSoundProxyPlayFixedSequence, sl@0: EMMFDevSoundProxySetDTMFLengths, sl@0: EMMFDevSoundProxySetVolumeRamp, sl@0: EMMFDevSoundProxyGetSupportedInputDataTypes, sl@0: EMMFDevSoundProxyGetSupportedOutputDataTypes, sl@0: EMMFDevSoundProxyCopyFourCCArrayData, sl@0: EMMFDevSoundProxyGetRecordedBuffer, sl@0: EMMFDevSoundProxySamplesRecorded, sl@0: EMMFDevSoundProxySamplesPlayed, sl@0: EMMFDevSoundProxySetToneRepeats, sl@0: EMMFDevSoundProxySetPrioritySettings, sl@0: EMMFDevSoundProxyFixedSequenceName, sl@0: EMMFDevSoundProxyCustomInterface, sl@0: EMMFDevSoundProxyFixedSequenceCount, sl@0: EMMFDevSoundProxyRequestResourceNotification, sl@0: EMMFDevSoundProxyCancelRequestResourceNotification, sl@0: EMMFDevSoundProxyGetResourceNotificationData, sl@0: EMMFDevSoundProxyWillResumePlay, sl@0: EMMFDevSoundProxyBTBFData, sl@0: EMMFDevSoundProxyBTBEData, sl@0: EMMFDevSoundProxySyncCustomCommand, sl@0: EMMFDevSoundProxySyncCustomCommandResult, sl@0: EMMFDevSoundProxyAsyncCustomCommand, sl@0: EMMFDevSoundProxyAsyncCustomCommandResult, sl@0: EMMFDevSoundProxyEmptyBuffers, sl@0: EMMFDevSoundCustomCommandCloseMuxDemuxPair, sl@0: EMMFDevSoundProxySetClientThreadInfo, sl@0: EMMFDevSoundProxyGetTimePlayed sl@0: }; sl@0: sl@0: class TMMFDevSoundProxyHwBuf sl@0: /** sl@0: *@internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: TUid iBufferType; sl@0: TInt iRequestSize; sl@0: TBool iLastBuffer; sl@0: TUint iBufferSize; sl@0: }; sl@0: sl@0: typedef TPckgBuf TMMFDevSoundProxyHwBufPckg; sl@0: sl@0: sl@0: class TMMFDevSoundProxySettings sl@0: /** sl@0: *@internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: TMMFState iMode; sl@0: TUid iHWDev; sl@0: TFourCC iDesiredFourCC; sl@0: TMMFCapabilities iCaps; sl@0: TMMFCapabilities iConfig; sl@0: TInt iMaxVolume; sl@0: TInt iVolume; sl@0: TInt iMaxGain; sl@0: TInt iGain; sl@0: TInt iLeftPercentage; sl@0: TInt iRightPercentage; sl@0: TInt iFrequencyOne; sl@0: TInt iFrequencyTwo; sl@0: TTimeIntervalMicroSeconds iDuration; sl@0: TTimeIntervalMicroSeconds32 iToneOnLength; sl@0: TTimeIntervalMicroSeconds32 iToneOffLength; sl@0: TTimeIntervalMicroSeconds32 iPauseLength; sl@0: TUid iNotificationEventUid; sl@0: }; sl@0: sl@0: sl@0: typedef TPckgBuf TMMFDevSoundProxySettingsPckg; sl@0: const TInt KMaxFixedSequenceNameLength = 1024; sl@0: sl@0: /** sl@0: *@internalTechnology sl@0: * TMMFDevSoundQueueItem is used to pass asynch messages between the devsound proxy and server sl@0: * for the observer's BufferToBeFilled, BufferToBeEmptied, PlayError, RecordError, ToneFinished, sl@0: * InitializeComplete and SendEventToClient events. sl@0: */ sl@0: class TMMFDevSoundQueueItem sl@0: { sl@0: public: sl@0: // Would've been nice to send TMMFDevSoundProxyHwBufPckg data here too sl@0: // but that would break the message size limit sl@0: TMMFDevSoundProxyRequest iRequest; sl@0: TMMFEventPckg iEventPckg; // SendEventToClient message payload sl@0: TInt iErrorCode; // InitComplete, ToneFinished, PlayError, RecordError message payload sl@0: }; sl@0: sl@0: #endif