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 "MmfBtDevSoundProxy.h"
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
class CMMFBufferToBeFilledHandler : public CActive
|
sl@0
|
28 |
/**
|
sl@0
|
29 |
*@internalTechnology
|
sl@0
|
30 |
*/
|
sl@0
|
31 |
{
|
sl@0
|
32 |
public:
|
sl@0
|
33 |
static CMMFBufferToBeFilledHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
34 |
~CMMFBufferToBeFilledHandler();
|
sl@0
|
35 |
void ReceiveEvents();
|
sl@0
|
36 |
void CancelReceiveEvents();
|
sl@0
|
37 |
void RunL();
|
sl@0
|
38 |
TInt RunError(TInt aError);
|
sl@0
|
39 |
void DoCancel();
|
sl@0
|
40 |
private:
|
sl@0
|
41 |
CMMFBufferToBeFilledHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
42 |
void ConstructL();
|
sl@0
|
43 |
private:
|
sl@0
|
44 |
enum {EGranularity=8};
|
sl@0
|
45 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
46 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
47 |
TRequestStatus iRequestStatus;
|
sl@0
|
48 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
49 |
};
|
sl@0
|
50 |
|
sl@0
|
51 |
|
sl@0
|
52 |
class CMMFBufferToBeEmptiedHandler : public CActive
|
sl@0
|
53 |
/**
|
sl@0
|
54 |
*@internalTechnology
|
sl@0
|
55 |
*/
|
sl@0
|
56 |
{
|
sl@0
|
57 |
public:
|
sl@0
|
58 |
static CMMFBufferToBeEmptiedHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
59 |
CMMFBufferToBeEmptiedHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
60 |
~CMMFBufferToBeEmptiedHandler();
|
sl@0
|
61 |
void ReceiveEvents();
|
sl@0
|
62 |
void CancelReceiveEvents();
|
sl@0
|
63 |
void RunL();
|
sl@0
|
64 |
TInt RunError(TInt aError);
|
sl@0
|
65 |
void DoCancel();
|
sl@0
|
66 |
public:
|
sl@0
|
67 |
CMMFDataBuffer* iBuffer;
|
sl@0
|
68 |
private:
|
sl@0
|
69 |
void ConstructL();
|
sl@0
|
70 |
private:
|
sl@0
|
71 |
enum {EGranularity=8};
|
sl@0
|
72 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
73 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
74 |
TRequestStatus iRequestStatus;
|
sl@0
|
75 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
76 |
};
|
sl@0
|
77 |
|
sl@0
|
78 |
|
sl@0
|
79 |
class CMMFPlayErrorHandler : public CActive
|
sl@0
|
80 |
/**
|
sl@0
|
81 |
*@internalTechnology
|
sl@0
|
82 |
*/
|
sl@0
|
83 |
{
|
sl@0
|
84 |
public:
|
sl@0
|
85 |
static CMMFPlayErrorHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
86 |
CMMFPlayErrorHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
87 |
~CMMFPlayErrorHandler();
|
sl@0
|
88 |
void ReceiveEvents();
|
sl@0
|
89 |
void CancelReceiveEvents();
|
sl@0
|
90 |
void RunL();
|
sl@0
|
91 |
TInt RunError(TInt aError);
|
sl@0
|
92 |
void DoCancel();
|
sl@0
|
93 |
private:
|
sl@0
|
94 |
void ConstructL();
|
sl@0
|
95 |
private:
|
sl@0
|
96 |
enum {EGranularity=8};
|
sl@0
|
97 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
98 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
99 |
TRequestStatus iRequestStatus;
|
sl@0
|
100 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
101 |
};
|
sl@0
|
102 |
|
sl@0
|
103 |
class CMMFRecordErrorHandler : public CActive
|
sl@0
|
104 |
/**
|
sl@0
|
105 |
*@internalTechnology
|
sl@0
|
106 |
*/
|
sl@0
|
107 |
{
|
sl@0
|
108 |
public:
|
sl@0
|
109 |
static CMMFRecordErrorHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
110 |
CMMFRecordErrorHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
111 |
~CMMFRecordErrorHandler();
|
sl@0
|
112 |
void ReceiveEvents();
|
sl@0
|
113 |
void CancelReceiveEvents();
|
sl@0
|
114 |
void RunL();
|
sl@0
|
115 |
TInt RunError(TInt aError);
|
sl@0
|
116 |
void DoCancel();
|
sl@0
|
117 |
private:
|
sl@0
|
118 |
void ConstructL();
|
sl@0
|
119 |
private:
|
sl@0
|
120 |
enum {EGranularity=8};
|
sl@0
|
121 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
122 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
123 |
TRequestStatus iRequestStatus;
|
sl@0
|
124 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
125 |
};
|
sl@0
|
126 |
|
sl@0
|
127 |
class CMMFToneFinishedHandler : public CActive
|
sl@0
|
128 |
/**
|
sl@0
|
129 |
*@internalTechnology
|
sl@0
|
130 |
*/
|
sl@0
|
131 |
{
|
sl@0
|
132 |
public:
|
sl@0
|
133 |
static CMMFToneFinishedHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
134 |
CMMFToneFinishedHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
135 |
~CMMFToneFinishedHandler();
|
sl@0
|
136 |
void ReceiveEvents();
|
sl@0
|
137 |
void CancelReceiveEvents();
|
sl@0
|
138 |
void RunL();
|
sl@0
|
139 |
TInt RunError(TInt aError);
|
sl@0
|
140 |
void DoCancel();
|
sl@0
|
141 |
private:
|
sl@0
|
142 |
void ConstructL();
|
sl@0
|
143 |
private:
|
sl@0
|
144 |
enum {EGranularity=8};
|
sl@0
|
145 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
146 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
147 |
TRequestStatus iRequestStatus;
|
sl@0
|
148 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
149 |
};
|
sl@0
|
150 |
|
sl@0
|
151 |
class CMMFInitializeCompleteHandler : public CActive
|
sl@0
|
152 |
/**
|
sl@0
|
153 |
*@internalTechnology
|
sl@0
|
154 |
*/
|
sl@0
|
155 |
{
|
sl@0
|
156 |
public:
|
sl@0
|
157 |
static CMMFInitializeCompleteHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
158 |
CMMFInitializeCompleteHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
159 |
~CMMFInitializeCompleteHandler();
|
sl@0
|
160 |
void ReceiveEvents();
|
sl@0
|
161 |
void CancelReceiveEvents();
|
sl@0
|
162 |
void RunL();
|
sl@0
|
163 |
TInt RunError(TInt aError);
|
sl@0
|
164 |
void DoCancel();
|
sl@0
|
165 |
private:
|
sl@0
|
166 |
void ConstructL();
|
sl@0
|
167 |
private:
|
sl@0
|
168 |
enum {EGranularity=8};
|
sl@0
|
169 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
170 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
171 |
TRequestStatus iRequestStatus;
|
sl@0
|
172 |
TMMFDevSoundProxyHwBufPckg iSetPckg;
|
sl@0
|
173 |
};
|
sl@0
|
174 |
|
sl@0
|
175 |
class CMMFSendEventToClientHandler : public CActive
|
sl@0
|
176 |
/**
|
sl@0
|
177 |
*@internalTechnology
|
sl@0
|
178 |
*/
|
sl@0
|
179 |
{
|
sl@0
|
180 |
public:
|
sl@0
|
181 |
static CMMFSendEventToClientHandler* NewL(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
182 |
CMMFSendEventToClientHandler(RMMFDevSoundProxy* aDevSoundProxy, MDevSoundObserver& aDevSoundObserver);
|
sl@0
|
183 |
~CMMFSendEventToClientHandler();
|
sl@0
|
184 |
void ReceiveEvents();
|
sl@0
|
185 |
void CancelReceiveEvents();
|
sl@0
|
186 |
void RunL();
|
sl@0
|
187 |
TInt RunError(TInt aError);
|
sl@0
|
188 |
void DoCancel();
|
sl@0
|
189 |
private:
|
sl@0
|
190 |
void ConstructL();
|
sl@0
|
191 |
private:
|
sl@0
|
192 |
enum {EGranularity=8};
|
sl@0
|
193 |
RMMFDevSoundProxy* iDevSoundProxy;
|
sl@0
|
194 |
MDevSoundObserver& iDevSoundObserver;
|
sl@0
|
195 |
TRequestStatus iRequestStatus;
|
sl@0
|
196 |
TMMFEventPckg iEventPckg;
|
sl@0
|
197 |
};
|
sl@0
|
198 |
|
sl@0
|
199 |
#endif
|