Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2001-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // BC Version that uses CImageDecode/Encode objects but is essentially source
15 // compatible with the old MdaImageConverter calls
22 #ifndef __MDAIMAGECONVERTER_H__
23 #define __MDAIMAGECONVERTER_H__
27 #include <icl/imagedata.h>
28 #include <mda/client/resource.h>
29 #include <mda/client/utility.h>
30 #include <mda/common/video.h>
37 @deprecated 7.0s - Replaced by Image Conversion library - no direct equivalent
39 This class has been deprecated in 7.0s.
41 An interface to a set of image conversion utility callback functions.
43 The class is a mixin and is intended to be inherited by the client
44 classes which observe the image conversion operations. The functions
45 encapsulated by this class are called when the open, create and
46 conversion operations complete.The interface is also used by the
47 bitmap image rotator and the bitmap image re-scaler. A reference to
48 this object is passed as a parameter when constructing image
49 conversion utility, image rotator and image re-scaler objects.
53 class MMdaImageUtilObserver
58 Defines required client behaviour when a create operation has
62 A value identifying the status of the create
63 operation. KErrNone or one of the system
66 virtual void MiuoCreateComplete(TInt aError) = 0;
69 Defines required client behaviour when an open operation has
73 A value identifying the status of the create
74 operation. KErrNone or one of the system
77 virtual void MiuoOpenComplete(TInt aError) = 0;
80 Defines required client behaviour when a conversion, image rotation or
81 image re-scaling operation has completed.
84 A value identifying the status of the operation.
85 KErrNone or one of the system wide error
88 virtual void MiuoConvertComplete(TInt aError) = 0;
91 // Note: TFrameInfo is now declared via ImageClientApi - was previously here
94 class CMdaImageUtilityPriv;
98 @deprecated 7.0s - Replaced by Image Conversion library - no direct equivalent
100 Defines the public interface to image conversion.
102 This class has been deprecated in 7.0s, it's functionality is now part of the
103 Image Converter Library. For more information see CImageEncoder and CImageDecoder.
105 Clients of the concrete conversion classes call the functions provided
106 by this interface to perform the conversion. The implementation of
107 these functions is provided either by the concrete conversion classes
108 themselves or by private implementation classes.
114 class CMdaImageUtility : public CActive, private MMdaObjectStateChangeObserver
116 friend class CMdaImageUtilityPriv;
119 virtual ~CMdaImageUtility();
120 IMPORT_C virtual void Close();
123 Begins the image conversion operation for the specified frame
126 The operation is asynchronous. When the conversion operation is
127 complete, successfully or otherwise, the callback function
128 MMdaImageUtilObserver::MiuoConvertComplete() is
129 called.When converting from a file or descriptor to a bitmap, the
130 operation can complete with KErrUnderflow, if there is
131 insufficient information in the file or descriptor. Typically, this
132 occurs when using the file or descriptor as a cache. In this
133 situation, the conversion operation should be performed repeatedly
134 until the file or descriptor has accumulated enough information for
135 the operation to complete with KErrNone. As much of the
136 image as is present is converted and written to the target bitmap at
137 each call to this function.
140 A reference to a bitmap. This may be a source or a
141 target for the conversion process, depending on the
142 concrete conversion class utility being used.
144 The frame number. This value is relative to zero. For
145 those concrete conversion classes which perform
146 conversion from a bitmap, this value must always be
147 zero. For those concrete conversion classes which
148 perform conversion to a bitmap, this value must be
149 less than the number of frames in the image.
151 virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0) = 0;
154 Begins the image conversion operation for the specified frame overloaded function.
156 The operation is asynchronous. When the conversion operation is complete, successfully or otherwise, the
157 callback function MMdaImageUtilObserver::MiuoConvertComplete() is called.When converting from a file or
158 descriptor to a bitmap, the operation can complete with KErrUnderflow, if there is insufficient information
159 in the file or descriptor. Typically, this occurs when using the file or descriptor as a cache. In this
160 situation, the conversion operation should be performed repeatedly until the file or descriptor has accumulated
161 enough information for the operation to complete with KErrNone. As much of the image as is present is converted
162 and written to the target bitmap at each call to this function.
165 A reference to a bitmap. This may be a source or a target for the conversion process, depending on
166 the concrete conversion class utility being used.
168 A source or target mask bitmap, if present.
170 The frame number. This value is relative to zero. For those concrete conversion classes which perform
171 conversion from a bitmap, this value must always be zero. For those concrete conversion classes which
172 perform conversion to a bitmap, this value must be less than the number of frames in the image.
174 @see CMdaImageUtility::ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0)
176 virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0) = 0;
179 Cancels the conversion operation.
181 The callback function MMdaImageUtilObserver::MiuoConvertComplete() is not called.
183 virtual void CancelConvertL() = 0;
184 IMPORT_C virtual void FrameInfo(TInt aFrame,TFrameInfo& aInfo) const;
185 IMPORT_C virtual TInt FrameCount() const;
187 // Reserved functions - do not call
188 virtual void ImageUtil_Reserved1();
189 virtual void ImageUtil_Reserved2();
190 virtual void ImageUtil_Reserved3();
191 virtual void ImageUtil_Reserved4();
197 virtual void DoClose();
198 // From MMdaObjectStateChangeObserver
199 virtual void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
203 void SelfComplete(TInt aError);
209 /**@internalTechnology*/
210 CMdaImageUtilityPriv* iProperties;
215 class CMdaImageDataReadUtilityPriv;
221 Base class used in the derivation of
222 CMdaImageDescToBitmapUtility and
223 CMdaImageFileToBitmapUtility.
225 It has no user accessible functions.
227 Replaced by Image Conversion library - see CImageDecoder
232 class CMdaImageDataReadUtility : public CMdaImageUtility
234 friend class CMdaImageDataReadUtilityPriv;
237 virtual ~CMdaImageDataReadUtility();
238 // From CMdaImageUtility
239 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0);
240 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0);
241 IMPORT_C virtual void CancelConvertL();
244 virtual void DoCancel();
245 IMPORT_C virtual const TDesC& FrameCommentL(TInt aFrameNumber);
247 // Reserved functions - do not call
248 virtual void ImageReadUtil_Reserved2();
249 virtual void ImageReadUtil_Reserved3();
250 virtual void ImageReadUtil_Reserved4();
252 // Creates relevant iDecoder property - depending on subclass.
253 // Called by "background" AO processing.
258 // From CMdaImageUtility
259 virtual void DoClose();
261 inline CMdaImageDataReadUtilityPriv* Properties() const;
266 class CMdaImageDataWriteUtilityPriv;
270 @deprecated 7.0s - Replaced by Image Conversion library - see CImageEncoder
272 Base class used in the derivation of CMdaImageBitmapToDescUtility and CMdaImageBitmapToFileUtility.
274 It has no user accessible functions.
278 @see CMdaImageBitmapToDescUtility
279 @see CMdaImageBitmapToFileUtility
281 class CMdaImageDataWriteUtility : public CMdaImageUtility
283 friend class CMdaImageDataWriteUtilityPriv;
286 virtual ~CMdaImageDataWriteUtility();
287 // From CMdaImageUtility
288 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0);
289 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,const TRect& aSourceRect,TInt aFrameNumber = 0);
290 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0);
291 IMPORT_C virtual void CancelConvertL();
294 virtual void DoCancel();
296 virtual CImageEncoder* Encoder() const;
298 // Reserved functions - do not call
299 virtual void ImageWriteUtil_Reserved1();
300 virtual void ImageWriteUtil_Reserved2();
301 virtual void ImageWriteUtil_Reserved3();
303 // Creates relevant <code>iEncoder</code> property - depending on subclass.
304 // Called by "background" AO processing.
308 void DoCreateL(TBool aFullCreate=ETrue);
309 // From CMdaImageUtility
310 virtual void DoClose();
312 inline CMdaImageDataWriteUtilityPriv* Properties() const;
316 class CMdaImageFileToBitmapUtilityPriv;
319 @deprecated 7.0s - Replaced by Image Conversion library - use CImageDecoder::FileNewL()
321 Implements format conversion of a file based image to a bitmap.
323 This class has been deprecated in 7.0s, it's functionality is now part of the Image
324 Converter Library. For more information see CImageDecoder.
326 The class provides functions to create an instance of this conversion
327 utility and to open an existing image file. Conversion is performed
328 using the image conversion utility interface.
333 class CMdaImageFileToBitmapUtility : public CMdaImageDataReadUtility
336 IMPORT_C static CMdaImageFileToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
337 IMPORT_C void OpenL(const TDesC& aFileName,TMdaClipFormat* aFormat = NULL,TMdaPackage* aCodec = NULL,TMdaPackage* aExtra = NULL);
339 inline CMdaImageFileToBitmapUtilityPriv* Properties() const;
343 class CMdaImageDescToBitmapUtilityPriv;
347 @deprecated 7.0s - Replaced by Image Conversion library - use CImageDecoder::DataNewL()
349 Implements format conversion of a descriptor-based image to a bitmap.
351 This class has been deprecated in 7.0s, it's functionality is now part of the Image Converter
352 Library. For more information see CImageDecoder.
354 The class provides functions to create an instance of this conversion
355 utility and to open and prepare the image data.Conversion is performed
356 using the image conversion utility interface.
361 class CMdaImageDescToBitmapUtility : public CMdaImageDataReadUtility
364 IMPORT_C static CMdaImageDescToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
365 IMPORT_C void OpenL(const TDesC8& aDescriptor,TMdaClipFormat* aFormat = NULL,TMdaPackage* aCodec = NULL,TMdaPackage* aExtra = NULL);
367 inline CMdaImageDescToBitmapUtilityPriv* Properties() const;
371 class CMdaImageBitmapToFileUtilityPriv;
376 Implements format conversion of a bitmap to a file-based image.
378 Replaced by Image Conversion library - use CImageEncoder::FileNewL()
380 The class provides functions to create an instance of this conversion
381 utility and to create the file. Conversion is performed using the image
382 conversion utility interface.
385 @see CImageEncoder::FileNewL()
387 class CMdaImageBitmapToFileUtility : public CMdaImageDataWriteUtility
390 IMPORT_C static CMdaImageBitmapToFileUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
391 IMPORT_C void CreateL(const TDesC& aFileName,TMdaClipFormat* aFormat,TMdaPackage* aCodec,TMdaPackage* aExtra);
393 inline CMdaImageBitmapToFileUtilityPriv* Properties() const;
397 class CMdaImageBitmapToDescUtilityPriv;
403 This class has been deprecated in 7.0s, it's functionality is now part of the
404 Image Converter Library. For more information see CImageEncoder.
406 @see CImageEncoder::DataNewL
408 class CMdaImageBitmapToDescUtility : public CMdaImageDataWriteUtility
411 IMPORT_C static CMdaImageBitmapToDescUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
412 IMPORT_C void CreateL(TDes8& aDescriptor,TMdaClipFormat* aFormat,TMdaPackage* aCodec,TMdaPackage* aExtra);
414 inline CMdaImageBitmapToDescUtilityPriv* Properties() const;
418 class CMdaImageBitmapToBitmapUtilityPriv;
424 Implements bitmap to bitmap copying and colour depth conversion.
426 Replaced by Image Conversion library - use CImageEncoder::FileNewL()
429 @see CImageEncoder::FileNewL()
431 class CMdaImageBitmapToBitmapUtility : public CMdaImageUtility
433 friend class CMdaImageBitmapToBitmapUtilityPriv;
436 IMPORT_C static CMdaImageBitmapToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver, CMdaServer* aServer = NULL);
437 IMPORT_C ~CMdaImageBitmapToBitmapUtility();
438 IMPORT_C void OpenL(CFbsBitmap& aBitmap);
439 // from CMdaImageUtility
440 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap, TInt aFrameNumber = 0);
441 IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap, CFbsBitmap& aMaskBitmap, TInt aFrameNumber = 0);
442 IMPORT_C virtual void CancelConvertL();
445 virtual void DoCancel();
447 // from CMdaImageUtility
448 virtual void DoClose();
450 inline CMdaImageBitmapToBitmapUtilityPriv* Properties() const;
455 class CMdaBitmapRotatorPriv;
460 Replaced by Image Conversion library - see CBitmapRotator
464 The class offers a simple interface to perform bitmap rotations in
465 clockwise 90 degree increments. The target bitmap is resized as
473 class CMdaBitmapRotator : public CBase
480 /** A clockwise rotation through 90 degrees.
482 ERotation90DegreesClockwise,
483 /** A clockwise rotation through 180 degrees.
485 ERotation180DegreesClockwise,
486 /** A clockwise rotation through 270 degrees.
488 ERotation270DegreesClockwise,
489 /** The bitmap is mirrored about the horizontal axis.
491 EMirrorFlipHorizontal,
492 /** The bitmap is mirrored about the vertical axis.
497 IMPORT_C static CMdaBitmapRotator* NewL();
498 IMPORT_C virtual ~CMdaBitmapRotator();
499 IMPORT_C void RotateL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aSrcBitmap,CFbsBitmap& aTgtBitmap,TRotationAngle aAngle);
500 IMPORT_C void RotateL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aBitmap,TRotationAngle aAngle);
501 IMPORT_C void CancelRotation();
503 CMdaBitmapRotatorPriv* iProperties;
507 class CMdaBitmapScalerPriv;
515 Replaced by Image Conversion library - see CBitmapScaler
517 The class offers a simple interface to perform arbitrary re-scaling of
523 class CMdaBitmapScaler : public CBase
526 IMPORT_C static CMdaBitmapScaler* NewL();
527 IMPORT_C virtual ~CMdaBitmapScaler();
528 IMPORT_C void ScaleL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aSrcBitmap,CFbsBitmap& aTgtBitmap,TBool aMaintainAspectRatio = ETrue);
529 IMPORT_C void ScaleL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aBitmap,TSize aDestSize,TBool aMaintainAspectRatio = ETrue);
530 IMPORT_C void CancelScaling();
532 CMdaBitmapScalerPriv* iProperties;