epoc32/include/exifmodify.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2003, 2004 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Exif file format creator/modifier class
    15 *
    16 */
    17 
    18 
    19 #ifndef EXIFMODIFY_H
    20 #define EXIFMODIFY_H
    21 
    22 // INCLUDES
    23 #include <e32base.h>
    24 #include "ExifRead.h"
    25 
    26 // CONSTANTS
    27 
    28 // MACROS
    29 
    30 // DATA TYPES
    31 
    32 // FUNCTION PROTOTYPES
    33 
    34 // FORWARD DECLARATIONS
    35 class TExifTagInfo;
    36 
    37 // CLASS DECLARATION
    38 
    39 /**
    40 *  CExifModify
    41 *  Interface class for modifying existing Exif v2.2 (or prior) file format or 
    42 *  creating Exif v2.2 file format using valid Jpeg image. 
    43 *  An instance of this class can be instantiated in one of two ways:
    44 *  by providing valid Exif data or by providing valid Jpeg image.
    45 * 
    46 *  @lib ExifLib
    47 *  @since 2.6 
    48 */
    49 NONSHARABLE_CLASS( CExifModify ): public CBase
    50     {
    51 	public:  // Enumerations
    52 
    53         /**
    54         *  The operation mode enumeration specifying the create or modify modes.
    55         */
    56     	enum TOperationMode
    57             {
    58         	EModify = 0,
    59         	ECreate
    60             };
    61             
    62         public:
    63             enum TExifModifyOption
    64             {
    65             ENoOptions        = 0x0000,
    66             ENoJpegParsing    = 0x0001, // No jpeg validity checking is done
    67             ENoTagChecking    = 0x0002  // Ignore unknown EXIF tags and mandatory tag checking
    68             };
    69 
    70 	public:  // Constructors and destructor
    71 
    72         /**
    73         * Two-phased constructor.
    74         */
    75     	IMPORT_C static CExifModify* NewL( 
    76             const TDesC8& aInData, 
    77             CExifModify::TOperationMode aOperationMode = EModify );
    78 
    79     	IMPORT_C static CExifModify* NewL( 
    80             const TDesC8& aInData, 
    81             CExifModify::TOperationMode aOperationMode,
    82             TUint aExifModifyOption );
    83 
    84 
    85         /**
    86         * Two-phased constructor.
    87         */
    88     	IMPORT_C static CExifModify* NewL();
    89             
    90         /**
    91         * Destructor.
    92         */
    93     	virtual ~CExifModify();
    94 
    95 	public: // New functions
    96         
    97         /**
    98         * Returns a constant pointer to a CExifRead instance that can be used 
    99         * to parse the associated Exif image.
   100         * @since 2.6 
   101         * @return Unmodifiable pointer to Exif reader instance.
   102         */
   103     	virtual const CExifRead* Reader() const = 0;
   104 
   105         /**
   106         * Inserts/Updates the given tag in the specified IFD structure of the 
   107         * Exif data.
   108         * @since 2.6 
   109         * @param aIfdType The hosting IFD type.
   110         * @param aExifTagInfo The informative fields of tag that is updated.
   111         * @param aExifData Data of the tag that is updated.
   112         * @return void
   113         */
   114     	virtual void SetTagL( 
   115             TExifIfdType aIfdType, 
   116             TExifTagInfo aExifTagInfo, 
   117             const TDesC8& aTagData ) = 0;
   118 
   119         /**
   120         * Removes the tag with the given tag ID from the specified IFD 
   121         * structure in the Exif data.
   122         * @since 2.6 
   123         * @param aIfdType The hosting IFD type.
   124         * @param aTagId The target tag ID.
   125         * @return Error code.
   126         */
   127     	virtual TInt DeleteTag( TExifIfdType aIfdType, TUint16 aTagId ) = 0;
   128 
   129         /**
   130         * Removes the specified IFD structure and all its tags from the Exif 
   131         * data.
   132         * @since 2.6 
   133         * @param aIfdType The target IFD type.
   134         * @return Error code.
   135         */
   136     	virtual TInt DeleteIfd( TExifIfdType aIfdType ) = 0;
   137 
   138         /**
   139         * Inserts/Updates the given thumbnail Jpeg image data into the 1st IFD 
   140         * structure in the Exif data.
   141         * @since 2.6 
   142         * @param aThumbnailData The Exif thumbnail image data that is updated.
   143         * @return void
   144         */
   145     	virtual void SetThumbnailL( const TDesC8& aThumbnailData ) = 0;
   146         
   147         /**
   148         * Removes the thumbnail Jpeg image data from the 1st IFD structure in 
   149         * the Exif data.
   150         * @since 2.6 
   151         * @return Error code.
   152         */
   153     	virtual TInt RemoveThumbnail() = 0;
   154         
   155         /**
   156         * Flushes the Exif data into the given data buffer, and releases the 
   157         * internal structures.
   158         * @since 2.6 
   159         * @param aInData The original Exif image data, which contains identical 
   160         * data provided while calling the NewL function.
   161         * @return Pointer to descriptor containing new Exif image data.
   162         */
   163     	virtual HBufC8* WriteDataL( const TDesC8& aInData ) = 0;
   164 
   165         /**
   166         * Inserts/Updates given Image Description in the Exif data.
   167         * @since 2.6
   168         * @param aImageDescription Updated Image Description data.
   169         * @return void
   170         */
   171     	virtual void SetImageDescriptionL( const TDesC8& aImageDescription ) = 0;
   172 
   173         /**
   174         * Inserts/Updates given Make in the Exif data.
   175         * @since 2.6
   176         * @param aMake Updated Make data.
   177         * @return void
   178         */
   179         virtual void SetMakeL( const TDesC8& aMake ) = 0; 
   180     	
   181         /**
   182         * Inserts/Updates given Model in the Exif data.
   183         * @since 2.6
   184         * @param aModel Updated Model data.
   185         * @return void
   186         */        
   187         virtual void SetModelL( const TDesC8& aModel ) = 0; 
   188     	
   189         /**
   190         * Inserts/Updates given Orientation in the Exif data.
   191         * @since 2.6
   192         * @param aOrientation Updated Orientation data.
   193         * @return void
   194         */
   195         virtual void SetOrientationL( TUint16 aOrientation ) = 0; 
   196     	
   197         /**
   198         * Inserts/Updates given X Resolution in the Exif data.
   199         * @since 2.6
   200         * @param aXResolution1 Updated X Resolution numerator.
   201         * @param aXResolution2 Updated X Resolution denominator.
   202         * @return void
   203         */        
   204         virtual void SetXResolutionL( 
   205             TUint32 aXResolution1, 
   206             TUint32 aXResolution2 ) = 0; 
   207     	
   208         /**
   209         * Inserts/Updates given Y Resolution in the Exif data.
   210         * @since 2.6
   211         * @param aYResolution1 Updated Y Resolution numerator.
   212         * @param aYResolution2 Updated Y Resolution denominator.
   213         * @return void
   214         */        
   215         virtual void SetYResolutionL( 
   216             TUint32 aYResolution1, 
   217             TUint32 aYResolution2 ) = 0; 
   218     	
   219         /**
   220         * Inserts/Updates given Resolution Unit in the Exif data.
   221         * @since 2.6
   222         * @param aResolutionUnit Updated Resolution Unit data.
   223         * @return void
   224         */        
   225         virtual void SetResolutionUnitL( TUint16 aResolutionUnit ) = 0; 
   226     	
   227         /**
   228         * Inserts/Updates given Transfer Function in the Exif data.
   229         * @since 2.6
   230         * @param aTransferFunction Updated Transfer Function data.
   231         * @return void
   232         */        
   233         virtual void SetTransferFunctionL( 
   234             const TDesC8& aTransferFunction ) = 0; 
   235     	
   236         /**
   237         * Inserts/Updates given Date Time in the Exif data.
   238         * @since 2.6
   239         * @param aDateTime Updated Date Time data.
   240         * @return void
   241         */        
   242         virtual void SetDateTimeL( const TDesC8& aDateTime ) = 0; 
   243     	
   244         /**
   245         * Inserts/Updates given YCbCr Positioning in the Exif data.
   246         * @since 2.6
   247         * @param aYCbCrPositioning YCbCr Positioning data.
   248         * @return void
   249         */        
   250         virtual void SetYCbCrPositioningL( TUint16 aYCbCrPositioning) = 0; 
   251     	
   252         /**
   253         * Inserts/Updates given Software in the Exif data.
   254         * @since 2.6
   255         * @param aSoftware Updated Software data.
   256         * @return void
   257         */        
   258         virtual void SetSoftwareL( const TDesC8& aSoftware ) = 0; 
   259     	
   260         /**
   261         * Inserts/Updates given Copyright in the Exif data.
   262         * @since 2.6
   263         * @param aCopyright Updated Copyright data.
   264         * @return void
   265         */        
   266         virtual void SetCopyrightL( const TDesC8& aCopyright ) = 0;
   267 
   268         /**
   269         * Inserts/Updates given Exposure Time in the Exif data.
   270         * @since 2.6
   271         * @param aExposureTime1 Updated Exposure Time numerator.
   272         * @param aExposureTime2 Updated Exposure Time denominator.
   273         * @return void
   274         */
   275     	virtual void SetExposureTimeL( 
   276             TUint32 aExposureTime1, 
   277             TUint32 aExposureTime2 ) = 0;
   278 
   279         /**
   280         * Inserts/Updates given Components Configuration in the Exif data.
   281         * @since 2.6
   282         * @param aComponentsConfiguration Updated Components Configuration data.
   283         * @return void
   284         */    	
   285         virtual void SetComponentsConfigurationL( 
   286             TUint8 aFirstComponent, TUint8 aSecondComponent, 
   287             TUint8 aThirdComponent, TUint8 aFourthComponent ) = 0; 
   288     	
   289         /**
   290         * Inserts/Updates given Flash in the Exif data.
   291         * @since 2.6
   292         * @param aFlash Updated Flash data.
   293         * @return void
   294         */        
   295         virtual void SetFlashL( TUint16 aFlash ) = 0; 
   296     	
   297         /**
   298         * Inserts/Updates given Color Space in the Exif data.
   299         * @since 2.6
   300         * @param aColorSpace Updated Color Space data.
   301         * @return void
   302         */        
   303         virtual void SetColorSpaceL( TUint16 aColorSpace ) = 0;
   304     	
   305         /**
   306         * Inserts/Updates given Pixel X Dimension in the Exif data.
   307         * @since 2.6
   308         * @param aPixelXDimension Updated Pixel X Dimension data.
   309         * @return void
   310         */        
   311         virtual void SetPixelXDimensionL( TUint32 aPixelXDimension ) = 0;
   312     	
   313         /**
   314         * Inserts/Updates given Pixel Y Dimension in the Exif data.
   315         * @since 2.6
   316         * @param aPixelYDimension Updated Pixel Y Dimension data.
   317         * @return void
   318         */        
   319         virtual void SetPixelYDimensionL( TUint32 aPixelYDimension ) = 0;
   320     	
   321         /**
   322         * Inserts/Updates given Exposure Mode in the Exif data.
   323         * @since 2.6
   324         * @param aExposureMode Updated Exposure Mode data.
   325         * @return void
   326         */        
   327         virtual void SetExposureModeL( TUint16 aExposureMode ) = 0;
   328     	
   329         /**
   330         * Inserts/Updates given White Balance in the Exif data.
   331         * @since 2.6
   332         * @param aWhiteBalance Updated White Balance data.
   333         * @return void
   334         */        
   335         virtual void SetWhiteBalanceL( TUint16 aWhiteBalance ) = 0; 
   336     	
   337         /**
   338         * Inserts/Updates given Scene Capture Type in the Exif data.
   339         * @since 2.6
   340         * @param aSceneCaptureType Updated Scene Capture Type data.
   341         * @return void
   342         */        
   343         virtual void SetSceneCaptureTypeL( TUint16 aSceneCaptureType ) = 0; 
   344     	
   345         
   346         /**
   347         * Inserts/Updates given Exposure Program in the Exif data.
   348         * @since 2.6
   349         * @param aExposureProgram Updated Exposure Program data.
   350         * @return void
   351         */virtual void SetExposureProgramL( TUint16 aExposureProgram ) = 0; 
   352     	
   353         /**
   354         * Inserts/Updates given Iso Speed Ratings in the Exif data.
   355         * @since 2.6
   356         * @param aIsoSpeedRatings Updated Iso Speed Ratings data.
   357         * @return void
   358         */        
   359         virtual void SetIsoSpeedRatingsL( const TDesC8& aIsoSpeedRatings ) = 0; 
   360     	
   361         /**
   362         * Inserts/Updates given Date Time Original in the Exif data.
   363         * @since 2.6
   364         * @param aDateTimeOriginal Updated Date Time Original data.
   365         * @return void
   366         */        
   367         virtual void SetDateTimeOriginalL( 
   368             const TDesC8& aDateTimeOriginal ) = 0;
   369     	
   370         /**
   371         * Inserts/Updates given Date Time Digitized in the Exif data.
   372         * @since 2.6
   373         * @param aDateTimeDigitized Updated Date Time Digitized data.
   374         * @return void
   375         */        
   376         virtual void SetDateTimeDigitizedL( 
   377             const TDesC8& aDateTimeDigitized ) = 0;
   378     	
   379         /**
   380         * Inserts/Updates given Aperture Value in the Exif data.
   381         * @since 2.6
   382         * @param aApertureValue1 Updated Aperture Value numerator.
   383         * @param aApertureValue2 Updated Aperture Value denominator.
   384         * @return void
   385         */        
   386         virtual void SetApertureValueL( 
   387             TUint32 aApertureValue1, 
   388             TUint32 aApertureValue2 ) = 0; 
   389     	
   390         /**
   391         * Inserts/Updates given  Exposure Bias Value in the Exif data.
   392         * @since 2.6
   393         * @param aExposureBiasValue1 Updated Exposure Bias Value numerator.
   394         * @param aExposureBiasValue2 Updated Exposure Bias Value denominator.
   395         * @return void
   396         */        
   397         virtual void SetExposureBiasValueL( 
   398             TInt32 aExposureBiasValue1, 
   399             TInt32 aExposureBiasValue2 ) = 0;
   400     	
   401         /**
   402         * Inserts/Updates given Metering Mode in the Exif data.
   403         * @since 2.6
   404         * @param aMeteringMode Updated Metering Mode data.
   405         * @return void
   406         */        
   407         virtual void SetMeteringModeL( TUint16 aMeteringMode ) = 0; 
   408     	
   409         /**
   410         * Inserts/Updates given Light Source in the Exif data.
   411         * @since 2.6
   412         * @param aLightSource Updated Light Source data.
   413         * @return void
   414         */        
   415         virtual void SetLightSourceL( TUint16 aLightSource ) = 0; 
   416     	
   417         /**
   418         * Inserts/Updates given Maker Note in the Exif data.
   419         * @since 2.6
   420         * @param aMakerNote Updated Maker Note data.
   421         * @return void
   422         */        
   423         virtual void SetMakerNoteL( const TDesC8& aMakerNote ) = 0; 
   424     	
   425         /**
   426         * Inserts/Updates given User Comment in the Exif data.
   427         * @since 2.6
   428         * @param aUserComment Updated User Comment data.
   429         * @return void
   430         */        
   431         virtual void SetUserCommentL( const TDesC8& aUserComment ) = 0;
   432     	
   433         /**
   434         * Inserts/Updates given Related Sound File in the Exif data.
   435         * @since 2.6
   436         * @param aRelatedSoundFile Updated Related Sound File data.
   437         * @return void
   438         */        
   439         virtual void SetRelatedSoundFileL( 
   440             const TDesC8& aRelatedSoundFile ) = 0; 
   441     	
   442         /**
   443         * Inserts/Updates given File Source in the Exif data.
   444         * @since 2.6
   445         * @param aFileSource Updated File Source data.
   446         * @return void
   447         */        
   448         virtual void SetFileSourceL( TInt8 aFileSource ) = 0; 
   449     	
   450         /**
   451         * Inserts/Updates given Digital Zoom Ratio in the Exif data.
   452         * @since 2.6
   453         * @param aDigitalZoomRatio1 Updated Digital Zoom Ratio numerator.
   454         * @param aDigitalZoomRatio2 Updated Digital Zoom Ratio denominator.
   455         * @return void
   456         */        
   457         virtual void SetDigitalZoomRatioL( 
   458             TUint32 aDigitalZoomRatio1, 
   459             TUint32 aDigitalZoomRatio2 ) = 0; 
   460     	
   461         /**
   462         * Inserts/Updates given Contrast in the Exif data.
   463         * @since 2.6
   464         * @param aContrast Updated Contrast data.
   465         * @return void
   466         */        
   467         virtual void SetContrastL( TUint16 aContrast ) = 0; 
   468     	
   469         /**
   470         * Inserts/Updates given Saturation in the Exif data.
   471         * @since 2.6
   472         * @param aSaturation Updated Saturation data.
   473         * @return void
   474         */        
   475         virtual void SetSaturationL( TUint16 aSaturation ) = 0; 
   476     	
   477         /**
   478         * Inserts/Updates given Sharpness in the Exif data.
   479         * @since 2.6
   480         * @param aSharpness Updated Sharpness data.
   481         * @return void
   482         */        
   483         virtual void SetSharpnessL( TUint16 aSharpness ) = 0; 
   484 
   485         /**
   486         * Inserts/Updates given thumbnail X Resolution in the Exif data.
   487         * @since 2.6
   488         * @param aXResolution1 Updated thumbnail X Resolution numerator.
   489         * @param aXResolution2 Updated thumbnail X Resolution denominator.
   490         * @return void
   491         */
   492     	virtual void SetThumbnailXResolutionL( 
   493             TUint32 aXResolution1, 
   494             TUint32 aXResolution2 ) = 0;
   495     	
   496         /**
   497         * Inserts/Updates given thumbnail Y Resolution in the Exif data.
   498         * @since 2.6
   499         * @param aYResolution1 Updated thumbnail Y Resolution numerator.
   500         * @param aYResolution2 Updated thumbnail Y Resolution denominator.
   501         * @return void
   502         */
   503         virtual void SetThumbnailYResolutionL( 
   504             TUint32 aYResolution1, 
   505             TUint32 aYResolution2 ) = 0;
   506     	
   507         /**
   508         * Inserts/Updates given thumbnail Resolution Unit in the Exif data.
   509         * @since 2.6
   510         * @param aResolutionUnit Updated thumbnail Resolution Unit data.
   511         * @return void
   512         */        
   513         virtual void SetThumbnailResolutionUnitL( TUint16 aResolutionUnit ) = 0;
   514 
   515         /**
   516         * Inserts/Updates given Shutter Speed Value in the Exif data.
   517         * @since 2.6
   518         * @param aShutterSpeedValue1 Updated Shutter Speed Value numerator.
   519         * @param aShutterSpeedValue2 Updated Shutter Speed Value denominator.
   520         * @return void
   521         */
   522     	virtual void SetShutterSpeedValueL( 
   523             TInt32 aShutterSpeedValue1, 
   524             TInt32 aShutterSpeedValue2 ) = 0;
   525 
   526         /**
   527         * Inserts/Updates given Brightness Value in the Exif data.
   528         * @since 2.6
   529         * @param aBrightnessValue1 Updated Brightness Value numerator.
   530         * @param aBrightnessValue2 Updated Brightness Value denominator.
   531         * @return void
   532         */
   533     	virtual void SetBrightnessValueL( 
   534             TInt32 aBrightnessValue1, 
   535             TInt32 aBrightnessValue2 ) = 0;
   536 
   537         /**
   538         * Inserts/Updates given Custom Rendered in the Exif data.
   539         * @since 2.6
   540         * @param aCustomRendered Updated Custom Rendered data.
   541         * @return void
   542         */        
   543         virtual void SetCustomRenderedL( TUint16 aCustomRendered ) = 0; 
   544 
   545         /**
   546         * Inserts/Updates given Gain Control in the Exif data.
   547         * @since 2.6
   548         * @param aGainControl Updated Gain Control data.
   549         * @return void
   550         */        
   551         virtual void SetGainControlL( TUint16 aGainControl ) = 0; 
   552 
   553     }; 
   554 
   555 #endif // EXIFMODIFY_H
   556 
   557 // End of File