epoc32/include/imagetransform.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/imagetransform.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/imagetransform.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,99 @@
     1.4 -imagetransform.h
     1.5 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// This is the public client API for the Image Transform Library
    1.19 +// 
    1.20 +//
    1.21 +/**
    1.22 + @file
    1.23 + @publishedAll
    1.24 + @released
    1.25 +*/
    1.26 +
    1.27 +#ifndef __IMAGETRANSFORM_H__
    1.28 +#define __IMAGETRANSFORM_H__
    1.29 +
    1.30 +#include <e32base.h>
    1.31 +#include <fbs.h>
    1.32 +
    1.33 +// fwd refs
    1.34 +class CImageTransformFramework;	//fwd ref
    1.35 +class CImageTransformPluginExtension;
    1.36 +
    1.37 +/**
    1.38 +The public API for clients to call the Image Transform (scaling) library.
    1.39 +This class provides functions to scale images held in files or descriptors.
    1.40 +
    1.41 +@publishedAll
    1.42 +@released
    1.43 +*/
    1.44 +class CImageTransform : public CBase
    1.45 +	{
    1.46 +public:
    1.47 +	/**
    1.48 +	Flags to control how the image is transformed.
    1.49 +	The EThumbnail and EIgnoreExifMetadataProcessing are mutually exclusive,
    1.50 +	and SHOULD NOT be used together. If they are, then EThumbnail is used.
    1.51 +	*/
    1.52 +	enum TOptions
    1.53 +		{
    1.54 +		/** No flag set. This is the default option*/
    1.55 +		EOptionNone = 0x00,
    1.56 +		/** If set, the destination image will always have a thumbnail.
    1.57 +		If the source already has a thumbnail, then this is the one that will appear
    1.58 +		in the destination, otherwise one will be generated. */
    1.59 +		EThumbnail	= 0x01,
    1.60 +		/** If set, then the Exif data is not parsed and ExifMetaData() will always return NULL. If the source image is EXIF, 
    1.61 +		then the EXIF information is copied without modification (i.e. without parsing) to the destination. In cases where 
    1.62 +		the source is JFIF, the destination image is also JFIF.
    1.63 +		*/
    1.64 +		EIgnoreExifMetadataProcessing = 0x02,
    1.65 +		/**
    1.66 +		TOptions should not be set greater than or equal to this value.
    1.67 +		*/
    1.68 +		EEnumBoundary = 0x04
    1.69 +		};
    1.70 +
    1.71 +public:
    1.72 +	IMPORT_C static CImageTransform* NewL(RFs& aFs);
    1.73 +	IMPORT_C ~CImageTransform();
    1.74 +	IMPORT_C void SetPluginUidL(TUid aPluginUid);
    1.75 +	IMPORT_C void SetSourceFilenameL(const TDesC& aFilename);
    1.76 +	IMPORT_C void SetSourceDataL(const TDesC8& aData);
    1.77 +	IMPORT_C void SetSourceMimeTypeL(const TDesC8& aMIMEType);
    1.78 +	IMPORT_C void SetSourceImageTypeL(TUid aImageType, TUid aImageSubType = KNullUid);
    1.79 +	IMPORT_C void SetSourceRect(const TRect& aRect);
    1.80 +	IMPORT_C void ClearSourceRect();
    1.81 +
    1.82 +	IMPORT_C void SetDestFilenameL(const TDesC& aFilename);
    1.83 +	IMPORT_C void SetDestDataL(HBufC8*& aData);
    1.84 +	IMPORT_C void SetDestSizeInPixelsL(const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue);
    1.85 +
    1.86 +	IMPORT_C void SetOptionsL(TUint aOptions);
    1.87 +	IMPORT_C void SetPreserveImageData(TBool aPreserveImageData);
    1.88 +
    1.89 +	IMPORT_C void SetupL();
    1.90 +	IMPORT_C void Transform(TRequestStatus& aStatus);
    1.91 +	IMPORT_C void CancelTransform();
    1.92 +	IMPORT_C void Reset();
    1.93 +	IMPORT_C CImageTransformPluginExtension* Extension() const;
    1.94 +
    1.95 +private:
    1.96 +	CImageTransform();
    1.97 +	void ConstructL(RFs& aFs);
    1.98 +
    1.99 +private:
   1.100 +	CImageTransformFramework* iBody;
   1.101 +	};
   1.102 +
   1.103 +#endif // __IMAGETRANSFORM_H__