mmplugins/imagingplugins/codecs/JPEGCodec/Exif/ExifEncoder.h
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
       
     1 // Copyright (c) 2004-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 EXIFENCODER_H
       
    17 #define EXIFENCODER_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include "ifdgeneral.h"
       
    21 #include <iclexif.h>
       
    22 #include "ExifGeneralConsts.h"
       
    23 #include "exifreaderwriter.h"
       
    24 
       
    25 // CExifEncoder - provides specialisation of CExifReaderWriter for use within the 
       
    26 // Jpeg Exif Encoder
       
    27 class CExifEncoder : public CExifReaderWriter
       
    28 	{
       
    29 public:
       
    30 
       
    31 	static CExifEncoder* NewL(TBool aEncodeThumbnail=ETrue);
       
    32 	~CExifEncoder();
       
    33 	
       
    34 	// Functions derived from CExifReaderWriter.
       
    35 	// (Getters not used - this is an encoder).
       
    36 	TInt GetParam8(TUint aTag, TUint aIfd, HBufC8*& aParam) const;
       
    37 	TInt GetParam16(TUint aTag, TUint aIfd, HBufC16*& aParam) const;	
       
    38 	TInt GetIntegerParam(TUint aTag, TUint aIfd, TInt& aParam) const;
       
    39 	TInt GetRationalParam(TUint aTag, TUint aIfd, TInt& aNumerator, TInt& aDenominator) const;	
       
    40 	TInt GetShortParam(TUint aTag, TUint aIfd, TUint16& aParam) const;
       
    41 	TInt GetIntegerArrayParam(TUint aTag, TUint aIfd, CArrayFix<TInt>& aParam) const;
       
    42 	TInt GetShortArrayParam(TUint aTag, TUint aIfd, CArrayFix<TUint16>& aParam) const;
       
    43 	TInt GetRationalArrayParam(TUint aTag, TUint aIfd, CArrayFix<TRational>& aParam) const;
       
    44 
       
    45 	
       
    46 	//Functions not derived from MExifMetaData.	
       
    47 	// Creates the Exif Header, and returns pointer to the block of data.
       
    48 	TPtrC8 CreateExifHeaderL();
       
    49 	void SetEnableThumbnailL(TBool aEnable);
       
    50 
       
    51 	// Returns an offset to the JPEGInterchangeFormatLength tag value/offset field.
       
    52 	TInt ThumbnailLengthOffset();
       
    53 	TInt ExifLengthOffset();
       
    54 
       
    55 private: // Functions
       
    56 	
       
    57 	CExifEncoder(TBool aEncodeThumbnail);
       
    58 	void ConstructL();
       
    59 	virtual void SetIfd1L();
       
    60 		
       
    61 private: // Member variables.
       
    62 
       
    63 	HBufC8* iExifData;
       
    64 	};
       
    65 
       
    66 #endif // EXIFENCODER_H