os/mm/devsound/a3fdevsound/src/mmfaudioserver/mmfaudioclientserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/a3fdevsound/src/mmfaudioserver/mmfaudioclientserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,194 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +#ifndef MMFAUDIOCLIENTSERVER_H
    1.24 +#define MMFAUDIOCLIENTSERVER_H
    1.25 +
    1.26 +//  INCLUDES
    1.27 +#include <mmf/common/mmfutilities.h>
    1.28 +#include <mmf/common/mmfbase.h>
    1.29 +#include <mmf/server/sounddevice.h>
    1.30 +
    1.31 +// DATA TYPES
    1.32 +// opcodes used in message passing between client and server
    1.33 +enum TMMFAudioServerRequest
    1.34 +	{
    1.35 +	EMMFAudioLaunchRequests,
    1.36 +	EMMFDevSoundSessionHandle
    1.37 +	};
    1.38 +
    1.39 +// opcodes used in message passing between client and server for DevSound
    1.40 +// operations.
    1.41 +enum TMMFDevSoundProxyRequest
    1.42 +	{
    1.43 +	EMMFDevSoundProxyPostOpen,
    1.44 +	EMMFDevSoundProxyInitialize1,
    1.45 +	EMMFDevSoundProxyInitialize2,
    1.46 +	EMMFDevSoundProxyInitialize3,
    1.47 +	EMMFDevSoundProxyInitialize4,
    1.48 +	EMMFDevSoundProxyCapabilities,
    1.49 +	EMMFDevSoundProxyConfig,
    1.50 +	EMMFDevSoundProxySetConfig,
    1.51 +	EMMFDevSoundProxyMaxVolume,
    1.52 +	EMMFDevSoundProxyVolume,
    1.53 +	EMMFDevSoundProxySetVolume,
    1.54 +	EMMFDevSoundProxyMaxGain,
    1.55 +	EMMFDevSoundProxyGain,
    1.56 +	EMMFDevSoundProxySetGain,
    1.57 +	EMMFDevSoundProxyPlayBalance,
    1.58 +	EMMFDevSoundProxySetPlayBalance,
    1.59 +	EMMFDevSoundProxyRecordBalance,
    1.60 +	EMMFDevSoundProxySetRecordBalance,
    1.61 +	EMMFDevSoundProxyICEvent,
    1.62 +	EMMFDevSoundProxyBTBFEvent,
    1.63 +	EMMFDevSoundProxyBTBEEvent,
    1.64 +	EMMFDevSoundProxyPEEvent,
    1.65 +	EMMFDevSoundProxyREEvent,
    1.66 +	EMMFDevSoundProxyTFEvent,
    1.67 +	EMMFDevSoundProxySETCEvent,
    1.68 +	EMMFDevSoundProxyPlayInit,
    1.69 +	EMMFDevSoundProxyRecordInit,
    1.70 +	EMMFDevSoundProxyPlayData,
    1.71 +	EMMFDevSoundProxyRecordData,
    1.72 +	EMMFDevSoundProxyStop,
    1.73 +	EMMFDevSoundProxyPause,
    1.74 +	EMMFDevSoundProxyPlayTone,
    1.75 +	EMMFDevSoundProxyPlayDualTone,
    1.76 +	EMMFDevSoundProxyPlayDTMFString,
    1.77 +	EMMFDevSoundProxyPlayDTMFStringLength,
    1.78 +	EMMFDevSoundProxyPlayToneSequence,
    1.79 +	EMMFDevSoundProxyPlayFixedSequence,
    1.80 +	EMMFDevSoundProxySetDTMFLengths,
    1.81 +	EMMFDevSoundProxySetVolumeRamp,
    1.82 +	EMMFDevSoundProxyGetSupportedInputDataTypes,
    1.83 +	EMMFDevSoundProxyGetSupportedOutputDataTypes,
    1.84 +	EMMFDevSoundProxyCopyFourCCArrayData,
    1.85 +	EMMFDevSoundProxySamplesRecorded,
    1.86 +	EMMFDevSoundProxySamplesPlayed,
    1.87 +	EMMFDevSoundProxySetToneRepeats,
    1.88 +	EMMFDevSoundProxySetPrioritySettings,
    1.89 +	EMMFDevSoundProxyFixedSequenceName,
    1.90 +	EMMFDevSoundProxyCustomInterface,
    1.91 +	EMMFDevSoundProxyFixedSequenceCount,
    1.92 +	EMMFDevSoundProxyRequestResourceNotification,
    1.93 +	EMMFDevSoundProxyCancelRequestResourceNotification,
    1.94 +	EMMFDevSoundProxyGetResourceNotificationData,	
    1.95 +	EMMFDevSoundProxyWillResumePlay,
    1.96 +	EMMFDevSoundProxyEmptyBuffers,
    1.97 +	EMMFDevSoundProxyCancelInitialize,
    1.98 +	EMMFDevSoundProxyBTBFData,
    1.99 +	EMMFDevSoundProxyBTBEData,
   1.100 +	EMMFDevSoundProxySyncCustomCommand,
   1.101 +	EMMFDevSoundProxySyncCustomCommandResult,
   1.102 +	EMMFDevSoundProxyAsyncCustomCommand,
   1.103 +	EMMFDevSoundProxyAsyncCustomCommandResult,
   1.104 +	EMMFDevSoundCustomCommandCloseMuxDemuxPair,
   1.105 +	EMMFDevSoundProxyClose,
   1.106 +	EMMFDevSoundProxyPausedRecordCompleteEvent,
   1.107 +	EMMFDevSoundProxyGetTimePlayed,
   1.108 +	EMMFDevSoundProxySetClientThreadInfo,
   1.109 +	EMMFDevSoundProxyIsResumeSupported,
   1.110 +	EMMFDevSoundProxyResume,
   1.111 +	EMMFDevSoundProxyMarkEvent
   1.112 +	};
   1.113 +
   1.114 +// Signals that the message is destined for the DevSound
   1.115 +const TUid KUidInterfaceMMFDevSound = {0x10207ABA};
   1.116 +const TInt KMMFObjectHandleDevSound = -3;
   1.117 +
   1.118 +// Addresses the chunk states
   1.119 +enum TChunkOp
   1.120 +	{
   1.121 +	ENull,
   1.122 +	EOpen
   1.123 +	};
   1.124 +
   1.125 +/**
   1.126 +*  A class representing CMMFBuffer information.
   1.127 +*  Buffers are used for both playback and recording.
   1.128 +*
   1.129 +*  @lib MmfDevSoundAdaptation.lib
   1.130 +*/
   1.131 +class TMMFDevSoundProxyHwBuf
   1.132 +	{
   1.133 +public:
   1.134 +	TUid iBufferType;
   1.135 +	TInt iRequestSize;
   1.136 +	TBool iLastBuffer;
   1.137 +	TUint iBufferSize;
   1.138 +	TChunkOp iChunkOp;
   1.139 +	};
   1.140 +
   1.141 +typedef TPckgBuf<TMMFDevSoundProxyHwBuf> TMMFDevSoundProxyHwBufPckg;
   1.142 +
   1.143 +/**
   1.144 +*  A class representing settings information used to send configuration
   1.145 +*  information to DevSound server.
   1.146 +*  Buffers are used for both playback and recording digital audio.
   1.147 +*
   1.148 +*  @lib MmfDevSoundAdaptation.lib
   1.149 +*/
   1.150 +class TMMFDevSoundProxySettings
   1.151 +	{
   1.152 +public:
   1.153 +	TMMFState iMode;
   1.154 +	TUid iHWDev;
   1.155 +	TFourCC iDesiredFourCC;
   1.156 +	TMMFCapabilities iCaps;
   1.157 +	TMMFCapabilities iConfig;
   1.158 +	TInt iMaxVolume;
   1.159 +	TInt iVolume;
   1.160 +	TInt iMaxGain;
   1.161 +	TInt iGain;
   1.162 +	TInt iLeftPercentage;
   1.163 +	TInt iRightPercentage;
   1.164 +	TInt iFrequencyOne;
   1.165 +	TInt iFrequencyTwo;
   1.166 +	TTimeIntervalMicroSeconds iDuration;
   1.167 +	TTimeIntervalMicroSeconds32 iToneOnLength;
   1.168 +	TTimeIntervalMicroSeconds32 iToneOffLength;
   1.169 +	TTimeIntervalMicroSeconds32 iPauseLength;
   1.170 +	TUid iNotificationEventUid;
   1.171 +	TUid iInterface;
   1.172 +	};
   1.173 +
   1.174 +// Packages a DevSound object information into a modifiable buffer descriptor. 
   1.175 +// Provides a type safe way of transferring an object or data structure which is contained within a modifiable buffer descriptor. 
   1.176 +typedef TPckgBuf<TMMFDevSoundProxySettings> TMMFDevSoundProxySettingsPckg;
   1.177 +
   1.178 +// Tone Fixed Sequence Max Length
   1.179 +const TInt KMaxFixedSequenceNameLength = 1024;
   1.180 +
   1.181 +/**
   1.182 +* TMMFDevSoundQueueItem is used to pass asynch messages between the devsound
   1.183 +* proxy and server for the observer's BufferToBeFilled, BufferToBeEmptied,
   1.184 +* PlayError, RecordError, ToneFinished, InitializeComplete and
   1.185 +* SendEventToClient events.
   1.186 +*/
   1.187 +class TMMFDevSoundQueueItem
   1.188 +	{
   1.189 +public:
   1.190 +	TMMFDevSoundProxyRequest    iRequest;
   1.191 +	TMMFEventPckg               iEventPckg; // SendEventToClient message payload
   1.192 +	TInt                        iErrorCode; // InitComplete, ToneFinished, PlayError, RecordError message payload
   1.193 +	};
   1.194 +
   1.195 +#endif	//MMFAUDIOCLIENTSERVER_H
   1.196 +
   1.197 +// End of File