sl@0
|
1 |
// Copyright (c) 2005-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 |
@file
|
sl@0
|
18 |
@publishedPartner
|
sl@0
|
19 |
@released
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef MDFINPUTPORT_H
|
sl@0
|
23 |
#define MDFINPUTPORT_H
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <e32base.h>
|
sl@0
|
26 |
#include <mdf/mdfcommon.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
class CMdfProcessingUnit;
|
sl@0
|
29 |
class CMMFBuffer;
|
sl@0
|
30 |
class MMdfInputPort;
|
sl@0
|
31 |
class MMdfOutputPort;
|
sl@0
|
32 |
class TPuConfig;
|
sl@0
|
33 |
|
sl@0
|
34 |
/**
|
sl@0
|
35 |
Codec API Input Port observer class.
|
sl@0
|
36 |
*/
|
sl@0
|
37 |
class MMdfInputPortObserver
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
/**
|
sl@0
|
41 |
Called by the Codec API Input Port when MipWriteData() has completed.
|
sl@0
|
42 |
@param aInputPort
|
sl@0
|
43 |
The Input Port which sent the callback.
|
sl@0
|
44 |
@param aBuffer
|
sl@0
|
45 |
The data buffer which was written.
|
sl@0
|
46 |
@param aErrorCode
|
sl@0
|
47 |
An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
48 |
another of the system-wide error codes.
|
sl@0
|
49 |
*/
|
sl@0
|
50 |
virtual void MipoWriteDataComplete(const MMdfInputPort* aInputPort,
|
sl@0
|
51 |
CMMFBuffer* aBuffer, TInt aErrorCode) = 0;
|
sl@0
|
52 |
|
sl@0
|
53 |
/**
|
sl@0
|
54 |
Called by the Codec API Input Port when MipDisconnectTunnel() has completed.
|
sl@0
|
55 |
@param aInputPort
|
sl@0
|
56 |
The Input Port which sent the callback.
|
sl@0
|
57 |
@param aErrorCode
|
sl@0
|
58 |
An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
59 |
another of the system-wide error codes.
|
sl@0
|
60 |
*/
|
sl@0
|
61 |
virtual void MipoDisconnectTunnelComplete(const MMdfInputPort* aInputPort,
|
sl@0
|
62 |
TInt aErrorCode) = 0;
|
sl@0
|
63 |
|
sl@0
|
64 |
/**
|
sl@0
|
65 |
Called by the Codec API Input Port when MipRestartTunnel() has completed.
|
sl@0
|
66 |
@param aInputPort
|
sl@0
|
67 |
The Input Port which sent the callback.
|
sl@0
|
68 |
@param aErrorCode
|
sl@0
|
69 |
An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
70 |
another of the system-wide error codes.
|
sl@0
|
71 |
*/
|
sl@0
|
72 |
virtual void MipoRestartTunnelComplete(const MMdfInputPort* aInputPort,
|
sl@0
|
73 |
TInt aErrorCode) = 0;
|
sl@0
|
74 |
};
|
sl@0
|
75 |
|
sl@0
|
76 |
/**
|
sl@0
|
77 |
Codec API Input Port interface.
|
sl@0
|
78 |
*/
|
sl@0
|
79 |
class MMdfInputPort
|
sl@0
|
80 |
{
|
sl@0
|
81 |
public:
|
sl@0
|
82 |
/**
|
sl@0
|
83 |
Synchronous function used to configure the Input Port.
|
sl@0
|
84 |
@param aConfiguration
|
sl@0
|
85 |
Holds the configuration parameters for the Input Port.
|
sl@0
|
86 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
87 |
another of the system-wide error codes.
|
sl@0
|
88 |
*/
|
sl@0
|
89 |
virtual TInt MipConfigure(const TPuConfig& aConfiguration) = 0;
|
sl@0
|
90 |
|
sl@0
|
91 |
/**
|
sl@0
|
92 |
Synchronous method which gets a configuration structure for the Input Port
|
sl@0
|
93 |
@param aConfigurationSetup
|
sl@0
|
94 |
The reference to the structure that is to contain the configuration information
|
sl@0
|
95 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
96 |
another of the system-wide error codes.
|
sl@0
|
97 |
*/
|
sl@0
|
98 |
virtual TInt MipGetConfig(TPuConfig& aConfigurationSetup) = 0;
|
sl@0
|
99 |
|
sl@0
|
100 |
/**
|
sl@0
|
101 |
Synchronous function used to initialise the Input Port.
|
sl@0
|
102 |
*/
|
sl@0
|
103 |
virtual void MipInitialize() = 0;
|
sl@0
|
104 |
|
sl@0
|
105 |
/**
|
sl@0
|
106 |
Synchronous function used to set the observer for the Input Port.
|
sl@0
|
107 |
@param aInputPortObserver
|
sl@0
|
108 |
The observer of the Input Port.
|
sl@0
|
109 |
*/
|
sl@0
|
110 |
virtual void MipSetObserver(const MMdfInputPortObserver& aInputPortObserver) = 0;
|
sl@0
|
111 |
|
sl@0
|
112 |
/**
|
sl@0
|
113 |
Synchronous function used to instruct the Input Port to create a buffer.
|
sl@0
|
114 |
@param aBufferSize
|
sl@0
|
115 |
The size of the buffer to be created.
|
sl@0
|
116 |
@return A pointer to the new created buffer.
|
sl@0
|
117 |
*/
|
sl@0
|
118 |
virtual CMMFBuffer* MipCreateBuffer(TInt aBufferSize) = 0;
|
sl@0
|
119 |
|
sl@0
|
120 |
/**
|
sl@0
|
121 |
Synchronous function used to instruct the Input Port to use the buffer
|
sl@0
|
122 |
passed in the function's argument.
|
sl@0
|
123 |
@param aBuffer
|
sl@0
|
124 |
The buffer to be used by the Input Port.
|
sl@0
|
125 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
126 |
another of the system-wide error codes.
|
sl@0
|
127 |
*/
|
sl@0
|
128 |
virtual TInt MipUseBuffer(CMMFBuffer& aBuffer) = 0;
|
sl@0
|
129 |
|
sl@0
|
130 |
/**
|
sl@0
|
131 |
Synchronous function used to instruct the Input Port to free the buffer given
|
sl@0
|
132 |
passed in the function's argument.
|
sl@0
|
133 |
@param aBuffer
|
sl@0
|
134 |
The buffer to be freed
|
sl@0
|
135 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
136 |
another of the system-wide error codes.
|
sl@0
|
137 |
*/
|
sl@0
|
138 |
virtual TInt MipFreeBuffer(CMMFBuffer* aBuffer) = 0;
|
sl@0
|
139 |
|
sl@0
|
140 |
/**
|
sl@0
|
141 |
Synchronous function used to request the set up of a tunnel between this Input Port
|
sl@0
|
142 |
and an Output Port.
|
sl@0
|
143 |
@param aOutputPortToBeConnectedTo
|
sl@0
|
144 |
Reference to the Output Port to be connected to.
|
sl@0
|
145 |
@param aTunnelFlags
|
sl@0
|
146 |
Control flags for tunneling
|
sl@0
|
147 |
@param aSupplierType
|
sl@0
|
148 |
Specifies the supplier of the buffers for the tunnel.
|
sl@0
|
149 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
150 |
another of the system-wide error codes.
|
sl@0
|
151 |
*/
|
sl@0
|
152 |
virtual TInt MipTunnelRequest(const MMdfOutputPort& aOutputPortToBeConnectedTo,
|
sl@0
|
153 |
TTunnelFlags& aTunnelFlags, TSupplierType& aSupplierType) = 0;
|
sl@0
|
154 |
|
sl@0
|
155 |
/**
|
sl@0
|
156 |
Asynchronous function used to write data to the Input Port.
|
sl@0
|
157 |
@param aBuffer
|
sl@0
|
158 |
Reference to the buffer containing data.
|
sl@0
|
159 |
*/
|
sl@0
|
160 |
virtual void MipWriteData(CMMFBuffer& aBuffer) = 0;
|
sl@0
|
161 |
|
sl@0
|
162 |
/**
|
sl@0
|
163 |
Asynchronous function used to disconnect a tunnelled port, and thus stop the data processing.
|
sl@0
|
164 |
*/
|
sl@0
|
165 |
virtual void MipDisconnectTunnel() = 0;
|
sl@0
|
166 |
|
sl@0
|
167 |
/**
|
sl@0
|
168 |
Asynchronous function used to restart the data processing of a tunnelled port.
|
sl@0
|
169 |
*/
|
sl@0
|
170 |
virtual void MipRestartTunnel() = 0;
|
sl@0
|
171 |
|
sl@0
|
172 |
/**
|
sl@0
|
173 |
Synchronous function used to find out if an Input Port is tunnelled or not.
|
sl@0
|
174 |
@return ETrue if the Input Port is tunnelled, EFalse otherwise.
|
sl@0
|
175 |
*/
|
sl@0
|
176 |
virtual TBool MipIsTunnelled() const = 0;
|
sl@0
|
177 |
|
sl@0
|
178 |
/**
|
sl@0
|
179 |
Synchronous function used to get the Input Port index
|
sl@0
|
180 |
@return The Input Port index.
|
sl@0
|
181 |
*/
|
sl@0
|
182 |
virtual TInt MipIndex() const = 0;
|
sl@0
|
183 |
|
sl@0
|
184 |
/**
|
sl@0
|
185 |
Synchronous function used to get the size of the buffer(s) used by the Input Port.
|
sl@0
|
186 |
@return The Input Port's buffer size.
|
sl@0
|
187 |
*/
|
sl@0
|
188 |
virtual TUint32 MipBufferSize() const = 0 ;
|
sl@0
|
189 |
|
sl@0
|
190 |
/**
|
sl@0
|
191 |
Request extension feature. This is intended to provide additional features.
|
sl@0
|
192 |
@param aUid
|
sl@0
|
193 |
Used to indicate which interface is required.
|
sl@0
|
194 |
@return Standard error code. KErrNotSupported is used to indicate that the particular
|
sl@0
|
195 |
plugin is used.
|
sl@0
|
196 |
*/
|
sl@0
|
197 |
virtual TInt MipCreateCustomInterface(TUid aUid) = 0;
|
sl@0
|
198 |
|
sl@0
|
199 |
/**
|
sl@0
|
200 |
Return previously created extension.
|
sl@0
|
201 |
This returns a custom interface whose ownership is not transferred to the caller. This
|
sl@0
|
202 |
should only be used if CreateCustomInterface() has already been called for the same UID
|
sl@0
|
203 |
value. This means that any construction for that interface has already been called,
|
sl@0
|
204 |
and thus this call cannot fail.
|
sl@0
|
205 |
@param aUid
|
sl@0
|
206 |
Used to indicate which interface is required.
|
sl@0
|
207 |
@return The requested interface, or NULL if not known.
|
sl@0
|
208 |
@see MipCreateCustomInterface()
|
sl@0
|
209 |
*/
|
sl@0
|
210 |
virtual TAny* MipCustomInterface(TUid aUid) = 0;
|
sl@0
|
211 |
};
|
sl@0
|
212 |
|
sl@0
|
213 |
#endif // MDFINPUTPORT_H
|