diff -r 000000000000 -r 40261b775718 mmhais/a3facl/src/buffersink/logicalbuffersink.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmhais/a3facl/src/buffersink/logicalbuffersink.h Tue Feb 02 01:56:55 2010 +0200 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : logicalbuffersink.h +* Part of : ACL Logical Layer +* +*/ + + + +#ifndef LOGICALBUFFERSINK_H +#define LOGICALBUFFERSINK_H + +#include +#include +#include +#include +#include + +#include "audioprocessingunit.h" + +#include + + +class MLogicalSettingObserver; + +/** +This is the implementation of CAudioSink API. + +@see CAudioComponent +*/ +NONSHARABLE_CLASS(CLogicalBufferSink) : public CAudioProcessingUnit, + public MMMFBufferSink, + public MMMFAudioDataConsumer + { +friend class CAudioContext; +friend class CLogicalAudioStream; + +public: + + /** + Destructor. + + Deletes all objects and releases all resource owned by this instance. + */ + virtual ~CLogicalBufferSink(); + + // from class MBufferSink + TInt SetDataConsumer(MMMFAudioDataConsumer& aConsumer); + TInt BufferEmptied(CMMFBuffer* aBuffer); + TInt BuffersDiscarded(); + + // from class CAudioProcessingUnit + virtual TBool IsTypeOf(TUid aTypeId) const; + virtual TAny* Interface(TUid aType); + + // from MMMFAudioDataConsumer + void BufferToBeEmptied(MMMFBufferSink* aSink, CMMFBuffer* aBuffer); + void DiscardBuffers(MMMFBufferSink* aSink); + /** + Create a new instance. + + @return CBufferSink* a pointer to the created instance. + */ + static CLogicalBufferSink* NewL(TAny* aParameters); + +private: + + void ConstructL(); + + CLogicalBufferSink(TAny* aParameters); + +protected: + // The adaptation buffer sink + MMMFBufferSink* iAdaptationBufferSink; + +private: + // The client which requests data + MMMFAudioDataConsumer *iConsumer; + + CMMFBuffer* iBuffer; + }; + +#endif // LOGICALBUFFERSINK_H