26
|
1 |
// Copyright (c) 2006-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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef CMMFDEVSOUNDCIFILEBLOCKLENGTH_H
|
|
17 |
#define CMMFDEVSOUNDCIFILEBLOCKLENGTH_H
|
|
18 |
|
|
19 |
#include <e32base.h>
|
|
20 |
#include <mmf/common/mmfipc.h>
|
|
21 |
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
|
|
22 |
#include <mmf/common/mmfipcserver.h>
|
|
23 |
#endif
|
|
24 |
#include <mmf/server/mmfdevsoundcustominterface.h>
|
|
25 |
#include <mmf/server/mmfdevsoundcustomcommands.h>
|
|
26 |
#include <mmf/server/devsoundstandardcustominterfaces.h>
|
|
27 |
|
|
28 |
|
|
29 |
enum TMMFDevSoundCIBlockLengthCommands
|
|
30 |
{
|
|
31 |
EMMFDevSoundCIBlockLengthSetFileBlockLength = 0
|
|
32 |
};
|
|
33 |
|
|
34 |
/**
|
|
35 |
* CMMFDevSoundCIFileBlockLengthMux
|
|
36 |
*
|
|
37 |
* implementation of the FileBlockLength custom interface pair
|
|
38 |
*/
|
|
39 |
class CMMFDevSoundCIFileBlockLengthMux : public CBase,
|
|
40 |
public MMMFDevSoundCustomInterfaceMuxPlugin,
|
|
41 |
public MMMFDevSoundCustomInterfaceFileBlockLength
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
/**
|
|
45 |
Attempt to open the interface.
|
|
46 |
@param aInterfaceId
|
|
47 |
The UID of the interface to open.
|
|
48 |
@return one of the system wide error codes
|
|
49 |
*/
|
|
50 |
virtual TInt OpenInterface(TUid aInterfaceId);
|
|
51 |
|
|
52 |
/**
|
|
53 |
Equivalent to destructor. Called to destroy plugin.
|
|
54 |
*/
|
|
55 |
virtual void Release();
|
|
56 |
/**
|
|
57 |
Pass destructor key.
|
|
58 |
Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
|
|
59 |
@param aDestructorKey
|
|
60 |
The Uid returned by REComSession::CreateImplementationL() or similar
|
|
61 |
*/
|
|
62 |
virtual void PassDestructorKey(TUid aDestructorKey);
|
|
63 |
|
|
64 |
/**
|
|
65 |
Complete construction.
|
|
66 |
Pass additional values from the construction phase, used subsequently by the plugin.
|
|
67 |
@param aCustomUtility
|
|
68 |
The custom interface utility used by the plugin to communicate with the remote
|
|
69 |
server side DeMux plugin
|
|
70 |
*/
|
|
71 |
virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility);
|
|
72 |
|
|
73 |
/**
|
|
74 |
Return the custom interface
|
|
75 |
@param aInterfaceId
|
|
76 |
The UID of the required custom interface
|
|
77 |
@return the custom interface supported by this plugin
|
|
78 |
*/
|
|
79 |
virtual TAny* CustomInterface(TUid aInterfaceId);
|
|
80 |
|
|
81 |
/**
|
|
82 |
Instantiate a CMMFDevSoundCIFileBlockLengthMux class
|
|
83 |
@return the pointer to the new class, cast to the Mux plugin mixin
|
|
84 |
*/
|
|
85 |
static MMMFDevSoundCustomInterfaceMuxPlugin* NewL();
|
|
86 |
|
|
87 |
protected:
|
|
88 |
// from MMMFDevSoundCustomInterfaceFileBlockLength
|
|
89 |
virtual void SetFileBlockLength(TUint aBlockAlign);
|
|
90 |
|
|
91 |
CMMFDevSoundCIFileBlockLengthMux();
|
|
92 |
~CMMFDevSoundCIFileBlockLengthMux();
|
|
93 |
|
|
94 |
protected:
|
|
95 |
TUid iKey;
|
|
96 |
TInt iRemoteHandle;
|
|
97 |
MMMFDevSoundCustomInterfaceMuxUtility* iUtility;
|
|
98 |
};
|
|
99 |
|
|
100 |
|
|
101 |
/**
|
|
102 |
* DeMux side of pair
|
|
103 |
*/
|
|
104 |
|
|
105 |
class CMMFDevSoundCIFileBlockLengthDeMux : public CBase,
|
|
106 |
public MMMFDevSoundCustomInterfaceDeMuxPlugin
|
|
107 |
{
|
|
108 |
public:
|
|
109 |
/**
|
|
110 |
Instantiate a CMMFDevSoundCIFileBlockLengthDeMux class
|
|
111 |
@return a pointer to the new class cast to the DeMux plugin mixin
|
|
112 |
*/
|
|
113 |
static MMMFDevSoundCustomInterfaceDeMuxPlugin* NewL();
|
|
114 |
|
|
115 |
/**
|
|
116 |
Attempt to open the interface.
|
|
117 |
@param aInterfaceId
|
|
118 |
The UID of the interface to open.
|
|
119 |
@return a handle to the remote plugin
|
|
120 |
*/
|
|
121 |
virtual TInt OpenInterface(TUid aInterfaceId);
|
|
122 |
|
|
123 |
/**
|
|
124 |
Equivalent to destructor. Called to destroy plugin.
|
|
125 |
*/
|
|
126 |
virtual void Release();
|
|
127 |
/**
|
|
128 |
Pass destructor key.
|
|
129 |
Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
|
|
130 |
@param aDestructorKey
|
|
131 |
The Uid returned by REComSession::CreateImplementationL() or similar
|
|
132 |
*/
|
|
133 |
virtual void PassDestructorKey(TUid aDestructorKey);
|
|
134 |
|
|
135 |
/**
|
|
136 |
Set the target of the custom interface call
|
|
137 |
@param aTarget
|
|
138 |
The DevSound to call the custom interface on.
|
|
139 |
*/
|
|
140 |
virtual void SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget);
|
|
141 |
|
|
142 |
/**
|
|
143 |
Complete construction.
|
|
144 |
@param aUtility
|
|
145 |
The DeMux utility to use
|
|
146 |
*/
|
|
147 |
virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aUtility);
|
|
148 |
|
|
149 |
/**
|
|
150 |
Refresh the current custom interface connections
|
|
151 |
*/
|
|
152 |
virtual void RefreshL();
|
|
153 |
|
|
154 |
// from MMMFDeMuxInterface
|
|
155 |
/**
|
|
156 |
Open the slave
|
|
157 |
@param aInterface
|
|
158 |
The UID of the requested interface
|
|
159 |
@param aPackageBuf
|
|
160 |
A package of data that can be supplied for initialisation
|
|
161 |
@return the result of the operation
|
|
162 |
*/
|
|
163 |
virtual TInt DoOpenSlaveL(TUid aInterface, const TDesC8& aPackageBuf);
|
|
164 |
|
|
165 |
/**
|
|
166 |
Close the slave
|
|
167 |
@param aHandle
|
|
168 |
The handle of the slave plugin
|
|
169 |
*/
|
|
170 |
virtual void DoCloseSlaveL(TInt aHandle);
|
|
171 |
|
|
172 |
// original RMessage is supplied so that remote demux plugin can extract necessary details
|
|
173 |
// using DeMux utility
|
|
174 |
|
|
175 |
/**
|
|
176 |
Relay the synchronous custom command onto the slave
|
|
177 |
@param aMessage
|
|
178 |
The IPC message to be sent to the slave
|
|
179 |
@return the result of the operation
|
|
180 |
*/
|
|
181 |
virtual TInt DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage);
|
|
182 |
|
|
183 |
/**
|
|
184 |
Relay the synchronous custom command onto the slave and obtain a result
|
|
185 |
@param aMessage
|
|
186 |
The IPC message to be sent to the slave
|
|
187 |
@return the result of the operation
|
|
188 |
*/
|
|
189 |
virtual TInt DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage);
|
|
190 |
|
|
191 |
/**
|
|
192 |
Relay an asynchronous command onto the slave
|
|
193 |
@param aMessage
|
|
194 |
The IPC message to be sent to the slave
|
|
195 |
*/
|
|
196 |
virtual void DoSendSlaveAsyncCommandL(const RMmfIpcMessage& aMessage);
|
|
197 |
|
|
198 |
/**
|
|
199 |
Relay an asynchronous command onto the slave and obtain a result
|
|
200 |
@param aMessage
|
|
201 |
The IPC message to be sent to the slave@param aMessage
|
|
202 |
*/
|
|
203 |
virtual void DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage);
|
|
204 |
|
|
205 |
protected:
|
|
206 |
~CMMFDevSoundCIFileBlockLengthDeMux();
|
|
207 |
CMMFDevSoundCIFileBlockLengthDeMux();
|
|
208 |
|
|
209 |
// implementation of FileBlockLength custom interface
|
|
210 |
void DoSetFileBlockLengthL(TUint aBlockAlign);
|
|
211 |
|
|
212 |
protected:
|
|
213 |
MMMFDevSoundCustomInterfaceDeMuxUtility* iUtility;
|
|
214 |
MMMFDevSoundCustomInterfaceTarget* iTarget;
|
|
215 |
MMMFDevSoundCustomInterfaceFileBlockLength* iFileBlockLengthInterface;
|
|
216 |
TUid iKey;
|
|
217 |
|
|
218 |
};
|
|
219 |
|
|
220 |
#endif
|