sl@0: /* sl@0: * Copyright (c) 2006-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: sl@0: sl@0: sl@0: #ifndef MMFAUDIOCLIENTSERVER_H sl@0: #define MMFAUDIOCLIENTSERVER_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // DATA TYPES 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: // opcodes used in message passing between client and server for DevSound sl@0: // operations. sl@0: enum TMMFDevSoundProxyRequest sl@0: { sl@0: EMMFDevSoundProxyPostOpen, 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: 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: EMMFDevSoundProxyEmptyBuffers, sl@0: EMMFDevSoundProxyCancelInitialize, sl@0: EMMFDevSoundProxyBTBFData, sl@0: EMMFDevSoundProxyBTBEData, sl@0: EMMFDevSoundProxySyncCustomCommand, sl@0: EMMFDevSoundProxySyncCustomCommandResult, sl@0: EMMFDevSoundProxyAsyncCustomCommand, sl@0: EMMFDevSoundProxyAsyncCustomCommandResult, sl@0: EMMFDevSoundCustomCommandCloseMuxDemuxPair, sl@0: EMMFDevSoundProxyClose, sl@0: EMMFDevSoundProxyPausedRecordCompleteEvent, sl@0: EMMFDevSoundProxyGetTimePlayed, sl@0: EMMFDevSoundProxySetClientThreadInfo, sl@0: EMMFDevSoundProxyIsResumeSupported, sl@0: EMMFDevSoundProxyResume, sl@0: EMMFDevSoundProxyMarkEvent sl@0: }; sl@0: sl@0: // Signals that the message is destined for the DevSound sl@0: const TUid KUidInterfaceMMFDevSound = {0x10207ABA}; sl@0: const TInt KMMFObjectHandleDevSound = -3; sl@0: sl@0: // Addresses the chunk states sl@0: enum TChunkOp sl@0: { sl@0: ENull, sl@0: EOpen sl@0: }; sl@0: sl@0: /** sl@0: * A class representing CMMFBuffer information. sl@0: * Buffers are used for both playback and recording. sl@0: * sl@0: * @lib MmfDevSoundAdaptation.lib sl@0: */ sl@0: class TMMFDevSoundProxyHwBuf sl@0: { sl@0: public: sl@0: TUid iBufferType; sl@0: TInt iRequestSize; sl@0: TBool iLastBuffer; sl@0: TUint iBufferSize; sl@0: TChunkOp iChunkOp; sl@0: }; sl@0: sl@0: typedef TPckgBuf TMMFDevSoundProxyHwBufPckg; sl@0: sl@0: /** sl@0: * A class representing settings information used to send configuration sl@0: * information to DevSound server. sl@0: * Buffers are used for both playback and recording digital audio. sl@0: * sl@0: * @lib MmfDevSoundAdaptation.lib sl@0: */ sl@0: class TMMFDevSoundProxySettings 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: TUid iInterface; sl@0: }; sl@0: sl@0: // Packages a DevSound object information into a modifiable buffer descriptor. sl@0: // Provides a type safe way of transferring an object or data structure which is contained within a modifiable buffer descriptor. sl@0: typedef TPckgBuf TMMFDevSoundProxySettingsPckg; sl@0: sl@0: // Tone Fixed Sequence Max Length sl@0: const TInt KMaxFixedSequenceNameLength = 1024; sl@0: sl@0: /** sl@0: * TMMFDevSoundQueueItem is used to pass asynch messages between the devsound sl@0: * proxy and server for the observer's BufferToBeFilled, BufferToBeEmptied, sl@0: * PlayError, RecordError, ToneFinished, InitializeComplete and sl@0: * SendEventToClient events. sl@0: */ sl@0: class TMMFDevSoundQueueItem sl@0: { sl@0: public: 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 //MMFAUDIOCLIENTSERVER_H sl@0: sl@0: // End of File