First public contribution.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #ifndef MLOGICALCHAIN_H
21 #define MLOGICALCHAIN_H
24 #include <a3f/a3fbase.h>
28 class MMMFAudioDataSupplier;
29 class MMMFAudioDataConsumer;
30 class MMMFBufferSource;
32 class MAudioGainControl;
33 class MAudioCodecAdaptationObserver;
34 class MStreamPositionControl;
35 class MCustomInterfaceSupport;
36 class MConfigurationHelper;
37 class MStreamBufferControl;
43 ERegisterStreamObserver = 0x0001,
44 ERegisterCodecObserver = 0x0002,
45 ERegisterGainObserver = 0x0004,
47 EComponentCreation = 0x0010,
48 EComponentDestruction = 0x0020,
49 EComponentAlterationGain = 0x0040,
50 EComponentAlterationCodec = 0x0080,
51 EStreamStateChange = 0x0100,
52 EConfigurationRequest = 0x0200
56 const TUid KUidAudioCodecObserver = {0x102834BF};
60 Interface that represent the logical chain
68 Set the type of message to be processed at the adaptation side
69 @ see TMMRCMessageType
70 @param the type of message to be processed
72 virtual void SetMessageType(TMMRCMessageType aMessageType) = 0;
75 Set the type of message to be processed at the adaptation side
76 @ see TMMRCMessageType
77 @param the type of message to be processed
79 virtual void ResetMessage() = 0;
82 Returns the type of message to be processed at the adaptation side
83 @ see TMMRCMessageType
84 @return the type of message to be processed
86 virtual TUint MessageType() = 0;
90 Returns the number of processing units in the current logical chain
91 @return the number of processing units in the current logical chain
93 virtual TInt AudioProcessingUnitsCount() = 0;
96 Returns the UID type of the processing unit of the logical chain
97 This function allows the adaptation side know extra details for logical components
98 @param aIndex indicates the creation order index
99 @return the uid type of the processing unit
101 virtual TUid AudioProcessingUnitUid(TInt aIndex) = 0;
104 Returns the logical chain state
105 @return the logical chain state
107 virtual TAudioState StreamState() = 0;
110 Set the logical chain state
111 @param the logical chain state
113 virtual void SetStreamState(TAudioState aState) = 0;
116 Returns the logical codec format
117 @return the logical codec format
119 virtual TUid CodecFormat() = 0;
123 Returns the logical codec sample rate
124 @return the logical codec sample rate
126 virtual TInt GetSampleRate() = 0;
129 Gets the mode – e.g. mono/stereo.
132 virtual TUid GetMode() = 0;
135 Returns the priority from the stream
136 @return the the priority from the stream
138 virtual TInt Priority() = 0;
141 Returns the ramp time parameters
143 virtual void GetVolumeRampParameters(TUid& aRampOperation, TTimeIntervalMicroSeconds& aRampDuration) = 0;
146 Copies the main configuration parameters of the logical chain
147 @see TLogicalChainConfiguration
148 @param the logical chain from where the parameter will be copied
150 virtual void CopySettings(const MLogicalChain& aChain) = 0;
153 Creates a copy from the current object
154 @return a copy from the current logical chain the ownership is transferred
156 virtual MLogicalChain* CloneL() = 0;
159 Deletes the logical chain cloned
161 virtual void Release() = 0;
164 Deletes the logical chain cloned
166 virtual TAny* GetComponent(TUid aType) = 0;
168 // TODO: Remove those temporary workarounds for data connection
169 // When the MMRC server is fully implemented and
170 // the Control mechanisms & Observation interface extension mechanisms are available
171 virtual void SetAdaptationSource(MMMFBufferSource& aSource) = 0;
172 virtual void SetAdaptationSink(MMMFBufferSink& aSink) = 0;
173 virtual void SetAdaptationGainControl(MAudioGainControl& aGain) = 0;
174 virtual void SetStreamPositionControl(MStreamPositionControl& aControl) = 0;
175 virtual void SetCustomInterfaceProvider(MCustomInterfaceSupport& aControl) = 0;
176 virtual void SetAdaptationStream(MConfigurationHelper& aCodec) = 0;
177 virtual void SetStreamBufferControl(MStreamBufferControl& aStreamBufferControl) = 0;
180 #endif // MLOGICALCHAIN_H