sl@0
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
|
sl@0
|
17 |
#ifndef __MMFDEVSOUNDCALLBACKHANDLER_H
|
sl@0
|
18 |
#define __MMFDEVSOUNDCALLBACKHANDLER_H
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <e32base.h>
|
sl@0
|
21 |
#include <e32std.h>
|
sl@0
|
22 |
#include <mmf/common/mmfcontrollerframeworkbase.h>
|
sl@0
|
23 |
#include <mmf/server/sounddevice.h>
|
sl@0
|
24 |
#include "MmfDevSoundProxy.h"
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <e32msgqueue.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
/*
|
sl@0
|
29 |
*
|
sl@0
|
30 |
* Class Name: CMsgQueueHandler
|
sl@0
|
31 |
*
|
sl@0
|
32 |
* AO that manages the message queue
|
sl@0
|
33 |
* @internalComponent
|
sl@0
|
34 |
*
|
sl@0
|
35 |
*/
|
sl@0
|
36 |
class CMsgQueueHandler : public CActive
|
sl@0
|
37 |
{
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
static CMsgQueueHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy,
|
sl@0
|
40 |
MDevSoundObserver& aDevSoundObserver,
|
sl@0
|
41 |
RMsgQueue<TMMFDevSoundQueueItem>* aMsgQueue,
|
sl@0
|
42 |
MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver);
|
sl@0
|
43 |
void SetObserver(MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
44 |
~CMsgQueueHandler();
|
sl@0
|
45 |
void ReceiveEvents();
|
sl@0
|
46 |
void RunL();
|
sl@0
|
47 |
TInt RunError(TInt aError);
|
sl@0
|
48 |
void DoCancel();
|
sl@0
|
49 |
private:
|
sl@0
|
50 |
CMsgQueueHandler(RMMFDevSoundProxy* aDevSoundProxy,
|
sl@0
|
51 |
MDevSoundObserver& aDevSoundObserver,
|
sl@0
|
52 |
RMsgQueue<TMMFDevSoundQueueItem>* aMsgQueue,
|
sl@0
|
53 |
MMMFDevSoundCustomInterfaceObserver& aDevSoundIntfcObserver);
|
sl@0
|
54 |
void ConstructL();
|
sl@0
|
55 |
|
sl@0
|
56 |
void ReceiveAllEvents();
|
sl@0
|
57 |
|
sl@0
|
58 |
void DoInitComplete();
|
sl@0
|
59 |
void DoPlayErrorComplete();
|
sl@0
|
60 |
void DoRecordErrorComplete();
|
sl@0
|
61 |
void DoBTBFCompleteL();
|
sl@0
|
62 |
void DoBTBECompleteL();
|
sl@0
|
63 |
void DoToneFinishedComplete();
|
sl@0
|
64 |
void DoSendEventToClientComplete();
|
sl@0
|
65 |
|
sl@0
|
66 |
private:
|
sl@0
|
67 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
68 |
MDevSoundObserver* iDevSoundObserver;
|
sl@0
|
69 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
70 |
|
sl@0
|
71 |
TMMFEventPckg iEventPckg;
|
sl@0
|
72 |
|
sl@0
|
73 |
RMsgQueue<TMMFDevSoundQueueItem>* iMsgQueue;
|
sl@0
|
74 |
TMMFDevSoundQueueItem iCurrentItem;
|
sl@0
|
75 |
TMMFDevSoundProxyRequest iCurrentRequest;
|
sl@0
|
76 |
|
sl@0
|
77 |
CMMFDataBuffer* iBuffer; // buffer to be emptied
|
sl@0
|
78 |
MMMFDevSoundCustomInterfaceObserver& iDevSoundIntfcObserver;
|
sl@0
|
79 |
};
|
sl@0
|
80 |
|
sl@0
|
81 |
#endif
|