|
1 // Copyright (c) 2007-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 FWEXTENSIONPARAMS_H |
|
17 #define FWEXTENSIONPARAMS_H |
|
18 |
|
19 #include <imageframe.h> |
|
20 #include "iclextproxystubutil.h" |
|
21 |
|
22 /** |
|
23 @file |
|
24 @internalTechnology |
|
25 |
|
26 Overview: |
|
27 Declaration of message classes used by the framework for the extension |
|
28 mechanism. Each T Class is used to pack-up data in the client thread |
|
29 and then is passed to the plugin thread where it is unpackaged. |
|
30 |
|
31 For all classes except TGetExtensionParams, the packing occurs in the |
|
32 proxy class of the extension mechanism, and unpacking in the paired stub |
|
33 class. |
|
34 */ |
|
35 |
|
36 /* |
|
37 Message class used by the client calls to CImageDecoder::GetExtension() and |
|
38 CImageEncoder::GetExtension(). |
|
39 */ |
|
40 class TGetExtensionParams |
|
41 { |
|
42 public: |
|
43 TUid iUid; |
|
44 MImageConvExtension** iExtension; |
|
45 }; |
|
46 |
|
47 /* |
|
48 Message base class used to store the Uid of the extension being called |
|
49 and the appropriate function number as used by the proxy/stub pair (i.e. |
|
50 the enums TImgConvExtCmd, TImgConvTransformExtCmd, TImgConvScalerExtCmd |
|
51 and TImgConvStreamedDecodeExtCmd). |
|
52 */ |
|
53 class TExecuteCommandParamsBase |
|
54 { |
|
55 protected: |
|
56 TExecuteCommandParamsBase(TUid aUid, TUint aCmd); |
|
57 |
|
58 public: |
|
59 TUid iUid; |
|
60 TUint iCmdNum; |
|
61 }; |
|
62 |
|
63 class TExecuteCommandParamsAsyncBase : public TExecuteCommandParamsBase |
|
64 { |
|
65 protected: |
|
66 TExecuteCommandParamsAsyncBase(TUid aUid, TUint aCmd, TRequestStatus* aRequestStatus); |
|
67 |
|
68 public: |
|
69 TRequestStatus* iRequestStatus; |
|
70 }; |
|
71 |
|
72 /* |
|
73 Message class used when calling the plugin implementation of |
|
74 MImageConvExtension::Uid() |
|
75 */ |
|
76 class TUidExecCmdParams : public TExecuteCommandParamsBase |
|
77 { |
|
78 public: |
|
79 TUidExecCmdParams(TUid aUid, TImgConvExtCmd aCmd); |
|
80 |
|
81 public: |
|
82 TUid iReturn; // Store the return value of the call. |
|
83 }; |
|
84 |
|
85 /* |
|
86 Message class used when calling the plugin implementation of |
|
87 MImageConvOperation::Capabilities() |
|
88 */ |
|
89 class TCapabilitiesExecCmdParams : public TExecuteCommandParamsBase |
|
90 { |
|
91 public: |
|
92 TCapabilitiesExecCmdParams(TUid aUid, TImgConvTransformExtCmd aCmd); |
|
93 |
|
94 public: |
|
95 TUint iReturn; // Store the return value of the call. |
|
96 }; |
|
97 |
|
98 /* |
|
99 Message class used when calling the plugin implementation of |
|
100 MImageConvOperation::AddOperationL() |
|
101 */ |
|
102 class TAddOperationLExecCmdParams : public TExecuteCommandParamsBase |
|
103 { |
|
104 public: |
|
105 TAddOperationLExecCmdParams(TUid aUid, TImgConvTransformExtCmd aCmd, TImageConvOperation::TOperation aOperation); |
|
106 |
|
107 public: |
|
108 TImageConvOperation::TOperation iOperation; |
|
109 }; |
|
110 |
|
111 /* |
|
112 Message class used when calling the plugin implementation of |
|
113 MImageConvOperation::ClearOperationStack() |
|
114 */ |
|
115 class TClearOperationStackExecCmdParams : public TExecuteCommandParamsBase |
|
116 { |
|
117 public: |
|
118 TClearOperationStackExecCmdParams(TUid aUid, TImgConvTransformExtCmd aCmd); |
|
119 }; |
|
120 |
|
121 /* |
|
122 Message class used when calling the plugin implementation of |
|
123 MImageConvScaler::GetCapabilities() |
|
124 */ |
|
125 class TGetCapabilitiesScalerExecCmdParams : public TExecuteCommandParamsBase |
|
126 { |
|
127 public: |
|
128 TGetCapabilitiesScalerExecCmdParams(TUid aUid, TImgConvScalerExtCmd aCmd, TScalerCaps& aCaps); |
|
129 |
|
130 public: |
|
131 TScalerCaps* iCaps; |
|
132 }; |
|
133 |
|
134 /* |
|
135 Message class used when calling the plugin implementation of |
|
136 MImageConvScaler::SetScalingL(TSize& aDesiredSize, TImageConvScaler::TScalerQuality aQuality, TBool aLockAspectRatio) |
|
137 |
|
138 */ |
|
139 class TSetScalingLSizeExecCmdParams : public TExecuteCommandParamsBase |
|
140 { |
|
141 public: |
|
142 TSetScalingLSizeExecCmdParams(TUid aUid, TImgConvScalerExtCmd aCmd, const TSize& aDesiredSize, TImageConvScaler::TScalerQuality aQuality, TBool aLockAspectRatio); |
|
143 |
|
144 public: |
|
145 const TSize* iDesiredSize; |
|
146 TImageConvScaler::TScalerQuality iQuality; |
|
147 TBool iLockAspectRatio; |
|
148 }; |
|
149 |
|
150 /* |
|
151 Message class used when calling the plugin implementation of |
|
152 MImageConvScaler::SetScalingL(TInt aScalingCoeff, TImageConvScaler::TScalerQuality aScalingQuality) |
|
153 |
|
154 */ |
|
155 class TSetScalingLCoeffExecCmdParams : public TExecuteCommandParamsBase |
|
156 { |
|
157 public: |
|
158 TSetScalingLCoeffExecCmdParams(TUid aUid, TImgConvScalerExtCmd aCmd, TInt aScalingCoeff, TImageConvScaler::TScalerQuality aScalingQuality); |
|
159 |
|
160 public: |
|
161 TInt iScalingCoeff; |
|
162 TImageConvScaler::TScalerQuality iScalingQuality; |
|
163 }; |
|
164 |
|
165 /* |
|
166 Message class used when calling the plugin implementation of |
|
167 MImageConvStreamedDecode::GetBlocks() |
|
168 */ |
|
169 class TGetBlocksExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
170 { |
|
171 public: |
|
172 TGetBlocksExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, TRequestStatus* aRequestStatus, CImageFrame* aFrame, TInt aSeqPosition, TInt aNumBlocksToGet, TInt* aNumBlocksRead); |
|
173 |
|
174 public: |
|
175 CImageFrame* iFrame; |
|
176 TInt iSeqPosition; |
|
177 TInt iNumBlocksToGet; |
|
178 TInt* iNumBlocksRead; |
|
179 }; |
|
180 |
|
181 /* |
|
182 Message class used when calling the plugin implementation of |
|
183 MImageConvStreamedDecode::GetBufferSize() |
|
184 */ |
|
185 class TGetBufferSizeExecCmdParams : public TExecuteCommandParamsBase |
|
186 { |
|
187 public: |
|
188 TGetBufferSizeExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, TUid aFormat, TSize& aBlockSizeInPixels, TInt aNumBlocks); |
|
189 |
|
190 public: |
|
191 TInt iReturn; |
|
192 TUid iFormat; |
|
193 TSize* iBlockSizeInPixels; |
|
194 TInt iNumBlocks; |
|
195 }; |
|
196 |
|
197 /* |
|
198 Message class used when calling the plugin implementation of |
|
199 MImageConvStreamedDecode::GetNextBlocks() |
|
200 */ |
|
201 class TGetNextBlocksExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
202 { |
|
203 public: |
|
204 TGetNextBlocksExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, TRequestStatus* aRequestStatus, CImageFrame* aFrame, TInt aNumBlocksToGet, TInt* aNumBlocksRead, TBool* aHaveMoreBlocks); |
|
205 |
|
206 public: |
|
207 CImageFrame* iFrame; |
|
208 TInt iNumBlocksToGet; |
|
209 TInt* iNumBlocksRead; |
|
210 TBool* iHaveMoreBlocks; |
|
211 }; |
|
212 |
|
213 /* |
|
214 Message class used when calling the plugin implementation of |
|
215 MImageConvStreamedDecode::GetCapabilities() |
|
216 */ |
|
217 class TGetCapabilitiesStrDecExecCmdParams : public TExecuteCommandParamsBase |
|
218 { |
|
219 public: |
|
220 TGetCapabilitiesStrDecExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps& aCaps); |
|
221 |
|
222 public: |
|
223 TUid iFormat; |
|
224 TInt iFrameNumber; |
|
225 TDecodeStreamCaps* iCaps; |
|
226 }; |
|
227 |
|
228 /* |
|
229 Message class used when calling the plugin implementation of |
|
230 MImageConvStreamedEncode::GetCapabilities() |
|
231 */ |
|
232 class TGetCapabilitiesStrEncExecCmdParams : public TExecuteCommandParamsBase |
|
233 { |
|
234 public: |
|
235 TGetCapabilitiesStrEncExecCmdParams(TUid aUid, TImgConvStreamedEncodeExtCmd aCmd, TUid aFormat, TEncodeStreamCaps& aCaps); |
|
236 |
|
237 public: |
|
238 TUid iFormat; |
|
239 TEncodeStreamCaps* iCaps; |
|
240 }; |
|
241 |
|
242 /* |
|
243 Message class used when calling the plugin implementation of |
|
244 MImageConvStreamedDecode::GetSupportedFormatsL() |
|
245 */ |
|
246 class TGetSupportedFormatsLStrDecExecCmdParams : public TExecuteCommandParamsBase |
|
247 { |
|
248 public: |
|
249 TGetSupportedFormatsLStrDecExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, RArray<TUid>& aFormats, TUid& aOptimalFormat); |
|
250 |
|
251 public: |
|
252 RArray<TUid>* iFormats; |
|
253 TUid* iOptimalFormat; |
|
254 }; |
|
255 |
|
256 /* |
|
257 Message class used when calling the plugin implementation of |
|
258 MImageConvStreamedEncode::GetSupportedFormatsL() |
|
259 */ |
|
260 class TGetSupportedFormatsLStrEncExecCmdParams : public TExecuteCommandParamsBase |
|
261 { |
|
262 public: |
|
263 TGetSupportedFormatsLStrEncExecCmdParams(TUid aUid, TImgConvStreamedEncodeExtCmd aCmd, RArray<TUid>& aFormats, TUid& aOptimalFormat); |
|
264 |
|
265 public: |
|
266 RArray<TUid>* iFormats; |
|
267 TUid* iOptimalFormat; |
|
268 }; |
|
269 |
|
270 /* |
|
271 Message class used when calling the plugin implementation of |
|
272 MImageConvStreamedDecode::InitFrameL() |
|
273 */ |
|
274 class TInitFrameLStrDecExecCmdParams : public TExecuteCommandParamsBase |
|
275 { |
|
276 public: |
|
277 TInitFrameLStrDecExecCmdParams(TUid aUid, TImgConvStreamedDecodeExtCmd aCmd, TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps::TNavigation aNavigation); |
|
278 |
|
279 public: |
|
280 TUid iFormat; |
|
281 TInt iFrameNumber; |
|
282 TDecodeStreamCaps::TNavigation iNavigation; |
|
283 }; |
|
284 |
|
285 /* |
|
286 Message class used when calling the plugin implementation of |
|
287 MImageConvStreamedEncode::InitFrameL() |
|
288 */ |
|
289 class TInitFrameLStrEncExecCmdParams : public TExecuteCommandParamsBase |
|
290 { |
|
291 public: |
|
292 TInitFrameLStrEncExecCmdParams(TUid aUid, TImgConvStreamedEncodeExtCmd aCmd, TUid aFormat, TInt aFrameNumber, const TSize& aFrameSizeInPixels, const TSize& aBlockSizeInPixels, TEncodeStreamCaps::TNavigation aNavigation, const CFrameImageData* aFrameImageData); |
|
293 |
|
294 public: |
|
295 TUid iFormat; |
|
296 TInt iFrameNumber; |
|
297 TSize iFrameSizeInPixels; |
|
298 TSize iBlockSizeInPixels; |
|
299 TEncodeStreamCaps::TNavigation iNavigation; |
|
300 const CFrameImageData* iFrameImageData; |
|
301 }; |
|
302 |
|
303 /* |
|
304 Message class used when calling the plugin implementation of |
|
305 MImageConvStreamedEncode::AppendBlocks() |
|
306 */ |
|
307 class TAppendBlocksExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
308 { |
|
309 public: |
|
310 TAppendBlocksExecCmdParams(TUid aFormat, TImgConvStreamedEncodeExtCmd aCmd, TRequestStatus* aStatus, const CImageFrame& aBlocks, TInt aNumBlocksToAdd); |
|
311 |
|
312 public: |
|
313 const CImageFrame* iBlocks; |
|
314 TInt iNumBlocksToAdd; |
|
315 }; |
|
316 |
|
317 /* |
|
318 Message class used when calling the plugin implementation of |
|
319 MImageConvStreamedEncode::AddBlocks() |
|
320 */ |
|
321 class TAddBlocksExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
322 { |
|
323 public: |
|
324 TAddBlocksExecCmdParams(TUid aFormat, TImgConvStreamedEncodeExtCmd aCmd, TRequestStatus* aStatus, const CImageFrame& aBlocks, const TInt& aSeqPosition); |
|
325 |
|
326 public: |
|
327 const CImageFrame* iBlocks; |
|
328 const TInt* iSeqPosition; |
|
329 }; |
|
330 |
|
331 /* |
|
332 Message class used when calling the plugin implementation of |
|
333 MImageConvStreamedEncode::Complete() |
|
334 */ |
|
335 class TCompleteExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
336 { |
|
337 public: |
|
338 TCompleteExecCmdParams(TUid aFormat, TImgConvStreamedEncodeExtCmd aCmd, TRequestStatus* aStatus); |
|
339 }; |
|
340 |
|
341 /* |
|
342 Message class used when calling the plugin implementation of |
|
343 MImageConvPrepare::Prepare() |
|
344 */ |
|
345 class TPrepareExecCmdParams : public TExecuteCommandParamsAsyncBase |
|
346 { |
|
347 public: |
|
348 TPrepareExecCmdParams(TUid aFormat, TImgConvPrepareExtCmd aCmd, TRequestStatus* aRequestStatus); |
|
349 }; |
|
350 |
|
351 #endif // FWEXTENSIONPARAMS_H |