os/mm/devsound/devsoundrefplugin/src/platsec/SoundDevice/MmfDevSoundCallbackHandler.h
Update contrib.
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #ifndef __MMFDEVSOUNDCALLBACKHANDLER_H
18 #define __MMFDEVSOUNDCALLBACKHANDLER_H
22 #include <mmf/common/mmfcontrollerframeworkbase.h>
23 #include <mmf/server/sounddevice.h>
24 #include "MmfDevSoundProxy.h"
26 #include <e32msgqueue.h>
30 * Class Name: CMsgQueueHandler
32 * AO that manages the message queue
36 class CMsgQueueHandler : public CActive
39 static CMsgQueueHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy,
40 MDevSoundObserver& aDevSoundObserver,
41 RMsgQueue<TMMFDevSoundQueueItem>* aMsgQueue,
42 MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver);
43 void SetObserver(MDevSoundObserver& aDevSoundObserver);
47 TInt RunError(TInt aError);
50 CMsgQueueHandler(RMMFDevSoundProxy* aDevSoundProxy,
51 MDevSoundObserver& aDevSoundObserver,
52 RMsgQueue<TMMFDevSoundQueueItem>* aMsgQueue,
53 MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver);
56 void ReceiveAllEvents();
58 void DoInitComplete();
59 void DoPlayErrorComplete();
60 void DoRecordErrorComplete();
61 void DoBTBFCompleteL();
62 void DoBTBECompleteL();
63 void DoToneFinishedComplete();
64 void DoSendEventToClientComplete();
67 RMMFDevSoundProxy* iDevSoundProxy;
68 MDevSoundObserver* iDevSoundObserver;
69 TMMFDevSoundProxyHwBufPckg iSetPckg;
71 TMMFEventPckg iEventPckg;
73 RMsgQueue<TMMFDevSoundQueueItem>* iMsgQueue;
74 TMMFDevSoundQueueItem iCurrentItem;
75 TMMFDevSoundProxyRequest iCurrentRequest;
77 CMMFDataBuffer* iBuffer; // buffer to be emptied
78 MMMFDevSoundCustomInterfaceObserver& iDevSoundIntfcObserver;