diff -r 000000000000 -r 40261b775718 devsound/devsoundrefplugin/src/platsec/SoundDevice/MmfDevSoundCallbackHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devsound/devsoundrefplugin/src/platsec/SoundDevice/MmfDevSoundCallbackHandler.h Tue Feb 02 01:56:55 2010 +0200 @@ -0,0 +1,81 @@ +// Copyright (c) 2001-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: +// + + +#ifndef __MMFDEVSOUNDCALLBACKHANDLER_H +#define __MMFDEVSOUNDCALLBACKHANDLER_H + +#include +#include +#include +#include +#include "MmfDevSoundProxy.h" + +#include + +/* + * + * Class Name: CMsgQueueHandler + * + * AO that manages the message queue + * @internalComponent + * + */ +class CMsgQueueHandler : public CActive + { +public: + static CMsgQueueHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, + MDevSoundObserver& aDevSoundObserver, + RMsgQueue* aMsgQueue, + MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver); + void SetObserver(MDevSoundObserver& aDevSoundObserver); + ~CMsgQueueHandler(); + void ReceiveEvents(); + void RunL(); + TInt RunError(TInt aError); + void DoCancel(); +private: + CMsgQueueHandler(RMMFDevSoundProxy* aDevSoundProxy, + MDevSoundObserver& aDevSoundObserver, + RMsgQueue* aMsgQueue, + MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver); + void ConstructL(); + + void ReceiveAllEvents(); + + void DoInitComplete(); + void DoPlayErrorComplete(); + void DoRecordErrorComplete(); + void DoBTBFCompleteL(); + void DoBTBECompleteL(); + void DoToneFinishedComplete(); + void DoSendEventToClientComplete(); + +private: + RMMFDevSoundProxy* iDevSoundProxy; + MDevSoundObserver* iDevSoundObserver; + TMMFDevSoundProxyHwBufPckg iSetPckg; + + TMMFEventPckg iEventPckg; + + RMsgQueue* iMsgQueue; + TMMFDevSoundQueueItem iCurrentItem; + TMMFDevSoundProxyRequest iCurrentRequest; + + CMMFDataBuffer* iBuffer; // buffer to be emptied + MMMFDevSoundCustomInterfaceObserver& iDevSoundIntfcObserver; + }; + +#endif