1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/a3facl/src/shared/mlogicalchain.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,180 @@
1.4 +/*
1.5 +* Copyright (c) 2004-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 MLOGICALCHAIN_H
1.24 +#define MLOGICALCHAIN_H
1.25 +
1.26 +#include <e32base.h>
1.27 +#include <a3f/a3fbase.h>
1.28 +
1.29 +// CLASS FORWARD
1.30 +
1.31 +class MMMFAudioDataSupplier;
1.32 +class MMMFAudioDataConsumer;
1.33 +class MMMFBufferSource;
1.34 +class MMMFBufferSink;
1.35 +class MAudioGainControl;
1.36 +class MAudioCodecAdaptationObserver;
1.37 +class MStreamPositionControl;
1.38 +class MCustomInterfaceSupport;
1.39 +class MConfigurationHelper;
1.40 +class MStreamBufferControl;
1.41 +
1.42 +
1.43 +enum TMMRCMessageType
1.44 + {
1.45 + ENoMessage = 0x0000,
1.46 + ERegisterStreamObserver = 0x0001,
1.47 + ERegisterCodecObserver = 0x0002,
1.48 + ERegisterGainObserver = 0x0004,
1.49 +
1.50 + EComponentCreation = 0x0010,
1.51 + EComponentDestruction = 0x0020,
1.52 + EComponentAlterationGain = 0x0040,
1.53 + EComponentAlterationCodec = 0x0080,
1.54 + EStreamStateChange = 0x0100,
1.55 + EConfigurationRequest = 0x0200
1.56 + };
1.57 +
1.58 +
1.59 +const TUid KUidAudioCodecObserver = {0x102834BF};
1.60 +
1.61 +
1.62 +/*
1.63 +Interface that represent the logical chain
1.64 +@class MLogicalChain
1.65 +*/
1.66 +
1.67 +class MLogicalChain
1.68 + {
1.69 +public:
1.70 + /**
1.71 + Set the type of message to be processed at the adaptation side
1.72 + @ see TMMRCMessageType
1.73 + @param the type of message to be processed
1.74 + */
1.75 + virtual void SetMessageType(TMMRCMessageType aMessageType) = 0;
1.76 +
1.77 + /**
1.78 + Set the type of message to be processed at the adaptation side
1.79 + @ see TMMRCMessageType
1.80 + @param the type of message to be processed
1.81 + */
1.82 + virtual void ResetMessage() = 0;
1.83 +
1.84 + /**
1.85 + Returns the type of message to be processed at the adaptation side
1.86 + @ see TMMRCMessageType
1.87 + @return the type of message to be processed
1.88 + */
1.89 + virtual TUint MessageType() = 0;
1.90 +
1.91 +
1.92 + /**
1.93 + Returns the number of processing units in the current logical chain
1.94 + @return the number of processing units in the current logical chain
1.95 + */
1.96 + virtual TInt AudioProcessingUnitsCount() = 0;
1.97 +
1.98 + /**
1.99 + Returns the UID type of the processing unit of the logical chain
1.100 + This function allows the adaptation side know extra details for logical components
1.101 + @param aIndex indicates the creation order index
1.102 + @return the uid type of the processing unit
1.103 + */
1.104 + virtual TUid AudioProcessingUnitUid(TInt aIndex) = 0;
1.105 +
1.106 + /**
1.107 + Returns the logical chain state
1.108 + @return the logical chain state
1.109 + */
1.110 + virtual TAudioState StreamState() = 0;
1.111 +
1.112 + /**
1.113 + Set the logical chain state
1.114 + @param the logical chain state
1.115 + */
1.116 + virtual void SetStreamState(TAudioState aState) = 0;
1.117 +
1.118 + /**
1.119 + Returns the logical codec format
1.120 + @return the logical codec format
1.121 + */
1.122 + virtual TUid CodecFormat() = 0;
1.123 +
1.124 +
1.125 + /**
1.126 + Returns the logical codec sample rate
1.127 + @return the logical codec sample rate
1.128 + */
1.129 + virtual TInt GetSampleRate() = 0;
1.130 +
1.131 + /**
1.132 + Gets the mode – e.g. mono/stereo.
1.133 + @return aMode
1.134 + */
1.135 + virtual TUid GetMode() = 0;
1.136 +
1.137 + /**
1.138 + Returns the priority from the stream
1.139 + @return the the priority from the stream
1.140 + */
1.141 + virtual TInt Priority() = 0;
1.142 +
1.143 + /**
1.144 + Returns the ramp time parameters
1.145 + */
1.146 + virtual void GetVolumeRampParameters(TUid& aRampOperation, TTimeIntervalMicroSeconds& aRampDuration) = 0;
1.147 +
1.148 + /**
1.149 + Copies the main configuration parameters of the logical chain
1.150 + @see TLogicalChainConfiguration
1.151 + @param the logical chain from where the parameter will be copied
1.152 + */
1.153 + virtual void CopySettings(const MLogicalChain& aChain) = 0;
1.154 +
1.155 + /**
1.156 + Creates a copy from the current object
1.157 + @return a copy from the current logical chain the ownership is transferred
1.158 + */
1.159 + virtual MLogicalChain* CloneL() = 0;
1.160 +
1.161 + /**
1.162 + Deletes the logical chain cloned
1.163 + */
1.164 + virtual void Release() = 0;
1.165 +
1.166 + /**
1.167 + Deletes the logical chain cloned
1.168 + */
1.169 + virtual TAny* GetComponent(TUid aType) = 0;
1.170 +
1.171 + // TODO: Remove those temporary workarounds for data connection
1.172 + // When the MMRC server is fully implemented and
1.173 + // the Control mechanisms & Observation interface extension mechanisms are available
1.174 + virtual void SetAdaptationSource(MMMFBufferSource& aSource) = 0;
1.175 + virtual void SetAdaptationSink(MMMFBufferSink& aSink) = 0;
1.176 + virtual void SetAdaptationGainControl(MAudioGainControl& aGain) = 0;
1.177 + virtual void SetStreamPositionControl(MStreamPositionControl& aControl) = 0;
1.178 + virtual void SetCustomInterfaceProvider(MCustomInterfaceSupport& aControl) = 0;
1.179 + virtual void SetAdaptationStream(MConfigurationHelper& aCodec) = 0;
1.180 + virtual void SetStreamBufferControl(MStreamBufferControl& aStreamBufferControl) = 0;
1.181 + };
1.182 +
1.183 +#endif // MLOGICALCHAIN_H