epoc32/include/exifread.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 parser ( reader ) class
    15 *
    16 */
    17 
    18 
    19 #ifndef EXIFREAD_H
    20 #define EXIFREAD_H
    21 
    22 //  INCLUDES
    23 #include <e32base.h>
    24 
    25 // CONSTANTS
    26 
    27 // MACROS
    28 
    29 // DATA TYPES
    30 enum TExifIfdType
    31     {
    32 	EIfd0 = 0,
    33 	EIfdExif,
    34 	EIfd1,
    35 	EIfdGps,
    36 	EIfdIntOp
    37     };
    38 
    39 
    40 // FUNCTION PROTOTYPES
    41 
    42 // FORWARD DECLARATIONS
    43 class CExifTag;
    44 
    45 // CLASS DECLARATION
    46 
    47 /**
    48 * CExifRead
    49 * Interface class for parsing Exif v2.2 file format. An instance of this class 
    50 * can be instantiated providing valid Exif data. 
    51 *
    52 * @lib ExifLib
    53 * @since 2.6 
    54 */
    55 NONSHARABLE_CLASS( CExifRead ): public CBase
    56     {
    57 
    58     public:  // Enumerations
    59         enum TExifReadOption
    60         {
    61 	    ENoOptions          = 0x0000, // Original, safe full parsing
    62 	    ENoJpeg             = 0x0001, // No main JPEG included, no parsing for main image
    63 	    EFastJpegParsing    = 0x0002, // Fast JPEG marker parsing
    64 	    ENoTagChecking      = 0x0004  // Ignore unknown EXIF tags and mandatory tag checking
    65         };
    66 
    67     public:  // Constructors and destructor
    68         
    69         /**
    70         * Two-phased constructor.
    71         */
    72     	IMPORT_C static CExifRead* NewL( const TDesC8& aExifData );
    73 
    74     	IMPORT_C static CExifRead* NewL( const TDesC8& aExifData, TUint aExifReadOption );
    75         
    76         /**
    77         * Destructor.
    78         */
    79     	virtual ~CExifRead();
    80 
    81     public: // New functions
    82 
    83         /**
    84         * Returns the Tag instance, which has the specified ID from the 
    85         * requested IFD.
    86         * @since 2.6
    87         * @param aIfdType The hosting IFD type
    88         * @param aTagId The queried tag ID.
    89         * @return Unmodifiable tag instance returned.
    90         */
    91     	virtual const CExifTag* GetTagL( 
    92             TExifIfdType aIfdType, 
    93             TUint16 aTagId ) const = 0;
    94 
    95         /**
    96         * Returns the IDs of all the tags that are stored in the Exif data.
    97         * @since 2.6
    98         * @param aIfdType The hosting IFD type.
    99         * @param aNoTags Number of tag IDs returned.
   100         * @return Pointer to the tag IDs.
   101         */
   102     	virtual TUint16* GetTagIdsL( 
   103             TExifIfdType aIfdType, 
   104             TInt& aNoTags ) const = 0;
   105 
   106         /**
   107         * Returns the types of the IFDs stored in the Exif data.
   108         * @since 2.6
   109         * @param aNoIfd Number of IFD types returned.
   110         * @return Pointer to the IFD types.
   111         */
   112     	virtual TExifIfdType* GetIfdTypesL( TInt& aNoIfd ) const = 0;
   113 
   114         /**
   115         * Returns pointer to a copy of the thumbnail image data.
   116         * @since 2.6
   117         * @return Pointer to the descriptor containing a copy of the 
   118         * Exif thumbnail image.
   119         */
   120     	virtual HBufC8* GetThumbnailL() const = 0;
   121 
   122         /**
   123         * Returns a boolean stating if the queried IFD structure exists in the 
   124         * Exif data.
   125         * @since 2.6
   126         * @param aIfdType The queried IFD type.
   127         * @return Boolean stating if the specified IFD exists or not.
   128         */
   129     	virtual TBool IfdExists( TExifIfdType aIfdType ) const = 0;
   130 
   131         /**
   132         * Returns a boolean stating if the queried tag exists in the specified 
   133         * IFD structure.
   134         * @since 2.6
   135         * @param aTagId Queried tag ID.
   136         * @param aIfdType The hosting IFD type.
   137         * @return Boolean stating if the specified tag exists or not.
   138         */
   139     	virtual TBool TagExists( 
   140             TUint16 aTagId, 
   141             TExifIfdType aIfdType ) const = 0;
   142 
   143         /**
   144         * Gets the Image Description tag data.
   145         * @since 2.6
   146         * @return Pointer to the descriptor containing copy of the Image 
   147         * Description data.
   148         */
   149     	virtual HBufC8* GetImageDescriptionL() const = 0;
   150 
   151         /**
   152         * Gets the Make tag data.
   153         * @since 2.6
   154         * @return Pointer to the descriptor containing copy of the Make data.
   155         */
   156     	virtual HBufC8* GetMakeL() const = 0;
   157     	
   158         /**
   159         * Gets the Model tag data.
   160         * @since 2.6
   161         * @return Pointer to the descriptor containing copy of the Model data.
   162         */
   163         virtual HBufC8* GetModelL() const = 0;
   164     	
   165         /**
   166         * Gets the Transfer Function tag data.
   167         * @since 2.6
   168         * @return Pointer to the descriptor containing copy of the Transfer 
   169         * Function data.
   170         */
   171         virtual HBufC8* GetTransferFunctionL() const = 0; 
   172     	
   173         /**
   174         * Gets the Date Time tag data.
   175         * @since 2.6
   176         * @return Pointer to the descriptor containing copy of the Date Time 
   177         * data.
   178         */
   179         virtual HBufC8* GetDateTimeL() const = 0; 
   180     	
   181         /**
   182         * Gets the Software tag data.
   183         * @since 2.6
   184         * @return Pointer to the descriptor containing copy of the Software 
   185         * data.
   186         */
   187         virtual HBufC8* GetSoftwareL() const = 0; 
   188     	
   189         /**
   190         * Gets the Copyright tag data.
   191         * @since 2.6
   192         * @return Pointer to the descriptor containing copy of the Copyright 
   193         * data.
   194         */
   195         virtual HBufC8* GetCopyrightL() const = 0; 
   196 
   197         /**
   198         * Gets the Orientation tag data.
   199         * @since 2.6
   200         * @param aOrientation Returned Orientation data.
   201         * @return Error code.
   202         */
   203     	virtual TInt GetOrientation( TUint16& aOrientation ) const = 0;
   204     	
   205         /**
   206         * Gets the X Resolution tag data.
   207         * @since 2.6
   208         * @param aXResolution1 Returned X Resolution numerator.
   209         * @param aXResolution2 Returned X Resolution denominator.
   210         * @return Error code. 
   211         */
   212         virtual TInt GetXResolution( 
   213             TUint32& aXResolution1, 
   214             TUint32& aXResolution2 ) const = 0;
   215     	
   216         /**
   217         * Gets the Y Resolution tag data.
   218         * @since 2.6
   219         * @param aYResolution1 Returned Y Resolution numerator.
   220         * @param aYResolution2 Returned Y Resolution denominator.
   221         * @return Error code.
   222         */
   223         virtual TInt GetYResolution( 
   224             TUint32& aYResolution1, 
   225             TUint32& aYResolution2 ) const = 0;
   226     	
   227         /**
   228         * Gets the Resolution Unit tag data.
   229         * @since 2.6
   230         * @param aResolutionUnit Returned Resolution Unit data.
   231         * @return Error code. 
   232         */
   233         virtual TInt GetResolutionUnit( TUint16& aResolutionUnit ) const = 0; 
   234     	
   235         /**
   236         * Gets the YCbCr Positioning tag data.
   237         * @since 2.6
   238         * @param aYCbCrPositioning Returned YCbCr Positioning data.
   239         * @return Error code.
   240         */
   241         virtual TInt GetYCbCrPositioning( 
   242             TUint16& aYCbCrPositioning ) const = 0; 
   243     	
   244         /**
   245         * Gets the Exif Ifd Pointer tag data.
   246         * @since 2.6
   247         * @param aExifIfdPointer Returned Exif Ifd Pointer data.
   248         * @return Error code.
   249         */
   250         virtual TInt GetExifIfdPointer( TUint32& aExifIfdPointer ) const = 0; 
   251     	
   252         /**
   253         * Gets the Gps Info Ifd Pointer tag data.
   254         * @since 2.6
   255         * @param aGpsInfoIfdPointer Returned Gps Info Ifd Pointer data.
   256         * @return Error code.
   257         */
   258         virtual TInt GetGpsInfoIfdPointer( 
   259             TUint32& aGpsInfoIfdPointer ) const = 0; 
   260 
   261         /**
   262         * Gets the Iso Speed Ratings tag data.
   263         * @since 2.6
   264         * @return Pointer to the descriptor containing copy of the Iso Speed 
   265         * Ratings data.
   266         */
   267     	virtual HBufC8* GetIsoSpeedRatingsL() const = 0; 
   268     	
   269         /**
   270         * Gets the Date Time Original tag data.
   271         * @since 2.6
   272         * @return Pointer to the descriptor containing copy of the Date Time 
   273         * Original data.
   274         */
   275         virtual HBufC8* GetDateTimeOriginalL() const = 0;
   276     	
   277         /**
   278         * Gets the Date Time Digitized tag data.
   279         * @since 2.6
   280         * @return Pointer to the descriptor containing copy of the Date Time 
   281         * Digitized data.
   282         */
   283         virtual HBufC8* GetDateTimeDigitizedL() const = 0; 
   284 
   285     	/**
   286         * Gets the Maker Note tag data.
   287         * @since 2.6
   288         * @return Pointer to the descriptor containing copy of the Maker Note 
   289         * data.
   290         */
   291         virtual HBufC8* GetMakerNoteL() const = 0; 
   292     	
   293         /**
   294         * Gets the User Comment tag data.
   295         * @since 2.6
   296         * @return Pointer to the descriptor containing copy of the User 
   297         * Comment data.
   298         */
   299         virtual HBufC8* GetUserCommentL() const = 0; 
   300     	
   301         /**
   302         * Gets the Related Sound File tag data.
   303         * @since 2.6
   304         * @return Pointer to the descriptor containing copy of the Related 
   305         * Sound File data.
   306         */
   307         virtual HBufC8* GetRelatedSoundFileL() const = 0; 
   308 
   309         /**
   310         * Gets the Exposure Time tag data.
   311         * @since 2.6
   312         * @param ExposureTime Returned Exposure Time data.
   313         * @return Error code.
   314         */
   315     	virtual TInt GetExposureTime( 
   316             TUint32& aExposureTime1, 
   317             TUint32& aExposureTime2 ) const = 0; 
   318     	
   319         /**
   320         * Gets the Components Configuration tag data.
   321         * @since 2.6
   322         * @param aComponentsConfiguration Returned Components Configuration 
   323         * data.
   324         * @return Error code.
   325         */
   326         virtual TInt GetComponentsConfiguration( 
   327             TUint8& aFirstComponent, TUint8& aSecondComponent,
   328             TUint8& aThirdComponent, TUint8& aFourthComponent) const = 0; 
   329     	
   330         /**
   331         * Gets the Flash tag data.
   332         * @since 2.6
   333         * @param aFlash Returned Flash data.
   334         * @return Error code.
   335         */
   336         virtual TInt GetFlash( TUint16& aFlash ) const = 0; 
   337     	
   338         /**
   339         * Gets the ColorSpace tag data.
   340         * @since 2.6
   341         * @param aColorSpace Returned ColorSpace data.
   342         * @return Error code.
   343         */
   344         virtual TInt GetColorSpace( TUint16& aColorSpace ) const = 0; 
   345     	
   346         /**
   347         * Gets the Pixel X Dimension tag data.
   348         * @since 2.6
   349         * @param aPixelXDimension Returned Pixel X Dimension data.
   350         * @return Error code.
   351         */
   352         virtual TInt GetPixelXDimension( TUint32& aPixelXDimension ) const = 0; 
   353     	
   354         /**
   355         * Gets the Pixel Y Dimension tag data.
   356         * @since 2.6
   357         * @param aPixelYDimension Returned Pixel Y Dimension data.
   358         * @return Error code.
   359         */
   360         virtual TInt GetPixelYDimension( TUint32& aPixelYDimension ) const = 0; 
   361     	
   362         /**
   363         * Gets the Exposure Mode tag data.
   364         * @since 2.6
   365         * @param aExposureMode Returned Exposure Mode data.
   366         * @return Error code.
   367         */
   368         virtual TInt GetExposureMode( TUint16& aExposureMode ) const = 0; 
   369     	
   370         /**
   371         * Gets the White Balance tag data.
   372         * @since 2.6
   373         * @param aWhiteBalance Returned White Balance data.
   374         * @return Error code.
   375         */
   376         virtual TInt GetWhiteBalance( TUint16& aWhiteBalance ) const = 0; 
   377     	
   378         /**
   379         * Gets the Scene Capture Type tag data.
   380         * @since 2.6
   381         * @param aSceneCaptureType Returned Scene Capture Type data.
   382         * @return Error code.
   383         */
   384         virtual TInt GetSceneCaptureType( 
   385             TUint16& aSceneCaptureType ) const = 0; 
   386     	
   387         /**
   388         * Gets the Exposure Program tag data.
   389         * @since 2.6
   390         * @param aExposureProgram Returned Exposure Program data.
   391         * @return Error code.
   392         */
   393         virtual TInt GetExposureProgram( TUint16& aExposureProgram ) const = 0;
   394     	
   395         /**
   396         * Gets the Aperture Value tag data.
   397         * @since 2.6
   398         * @param aApertureValue1 Returned Aperture Value numerator.
   399         * @param aApertureValue2 Returned Aperture Value denominator.
   400         * @return Error code.
   401         */
   402         virtual TInt GetApertureValue( 
   403             TUint32& aApertureValue1, 
   404             TUint32& aApertureValue2 ) const = 0; 
   405     	
   406         /**
   407         * Gets the Exposure Bias Value tag data.
   408         * @since 2.6
   409         * @param aExposureBiasValue1 Returned Exposure Bias Value numerator.
   410         * @param aExposureBiasValue1 Returned Exposure Bias Value denominator.
   411         * @return Error code.
   412         */
   413         virtual TInt GetExposureBiasValue( 
   414             TInt32& aExposureBiasValue1, 
   415             TInt32& aExposureBiasValue2 ) const = 0; 
   416     	
   417         /**
   418         * Gets the Metering Mode tag data.
   419         * @since 2.6
   420         * @param aMeteringMode Returned Metering Mode data.
   421         * @return Error code.
   422         */
   423         virtual TInt GetMeteringMode( TUint16& aMeteringMode ) const = 0; 
   424     	
   425         /**
   426         * Gets the Light Source tag data.
   427         * @since 2.6
   428         * @param aLightSource Returned Light Source data.
   429         * @return Error code.
   430         */
   431         virtual TInt GetLightSource( TUint16& aLightSource ) const = 0; 
   432     	
   433         /**
   434         * Gets the File Source tag data.
   435         * @since 2.6
   436         * @param aFileSource Returned File Source data.
   437         * @return Error code.
   438         */
   439         virtual TInt GetFileSource( TInt8& aFileSource ) const = 0; 
   440     	
   441         /**
   442         * Gets the Digital Zoom Ratio tag data.
   443         * @since 2.6
   444         * @param aDigitalZoomRatio1 Returned Digital Zoom Ratio numerator.
   445         * @param aDigitalZoomRatio2 Returned Digital Zoom Ratio denominator.
   446         * @return Error code.
   447         */
   448         virtual TInt GetDigitalZoomRatio( 
   449             TUint32& aDigitalZoomRatio1, 
   450             TUint32& aDigitalZoomRatio2 ) const = 0; 
   451     	
   452         /**
   453         * Gets the Contrast tag data.
   454         * @since 2.6
   455         * @param aContrast Returned Contrast data.
   456         * @return Error code.
   457         */
   458         virtual TInt GetContrast( TUint16& aContrast ) const = 0; 
   459     	
   460         /**
   461         * Gets the Saturation tag data.
   462         * @since 2.6
   463         * @param aSaturation Returned Saturation data.
   464         * @return Error code.
   465         */
   466         virtual TInt GetSaturation( TUint16& aSaturation ) const = 0; 
   467     	
   468         /**
   469         * Gets the Sharpness tag data.
   470         * @since 2.6
   471         * @param aSharpness Returned Sharpness data.
   472         * @return Error code.
   473         */
   474         virtual TInt GetSharpness( TUint16& aSharpness ) const = 0; 
   475     	
   476         /**
   477         * Gets the Exif Version tag data.
   478         * @since 2.6
   479         * @param aExifVersion Returned Exif Version data.
   480         * @return Error code.
   481         */
   482         virtual TInt GetExifVersion( TUint32& aExifVersion ) const = 0; 
   483     	
   484         /**
   485         * Gets the Flash Pix Version tag data.
   486         * @since 2.6
   487         * @param aFlashPixVersion Returned Flash Pix Version data.
   488         * @return Error code.
   489         */
   490         virtual TInt GetFlashPixVersion( TUint32& aFlashPixVersion ) const = 0; 
   491     	
   492         /**
   493         * Gets the Interoperability Ifd Pointer tag data.
   494         * @since 2.6
   495         * @param aInteroperabilityIfdPointer Returned Interoperability Ifd 
   496         * Pointer data.
   497         * @return Error code.
   498         */
   499         virtual TInt GetInteroperabilityIfdPointer( 
   500             TUint32& aInteroperabilityIfdPointer ) const = 0; 
   501 
   502         /**
   503         * Gets the thumbnail X Resolution tag data.
   504         * @since 2.6
   505         * @param aXResolution1 Returned thumbnail X Resolution numerator.
   506         * @param aXResolution1 Returned thumbnail X Resolution denominator.
   507         * @return Error code.
   508         */
   509     	virtual TInt GetThumbnailXResolution( 
   510             TUint32& aXResolution1, 
   511             TUint32& aXResolution2 ) const = 0;
   512     	
   513         /**
   514         * Gets the thumbnail Y Resolution tag data.
   515         * @since 2.6
   516         * @param aYResolution1 Returned thumbnail Y Resolution numerator.
   517         * @param aYResolution1 Returned thumbnail Y Resolution denominator.
   518         * @return Error code.
   519         */        
   520         virtual TInt GetThumbnailYResolution( 
   521             TUint32& aYResolution1, 
   522             TUint32& aYResolution2 ) const = 0;
   523     	
   524         /**
   525         * Gets the thumbnail Resolution Unit tag data.
   526         * @since 2.6
   527         * @param aResolutionUnit Returned thumbnail Resolution Unit data.
   528         * @return Error code.
   529         */            
   530         virtual TInt GetThumbnailResolutionUnit( 
   531             TUint16& aResolutionUnit ) const = 0;
   532     	
   533         /**
   534         * Gets the thumbnail Compression tag data.
   535         * @since 2.6
   536         * @param aCompression Returned thumbnail Compression data.
   537         * @return Error code.
   538         */            
   539         virtual TInt GetThumbnailCompression( TUint16& aCompression ) const = 0; 
   540     	
   541         /**
   542         * Gets the thumbnail Jpeg Interchange Format tag data.
   543         * @since 2.6
   544         * @param aJpegInterchangeFormat Returned thumbnail Jpeg Interchange 
   545         * Format data.
   546         * @return Error code.
   547         */            
   548         virtual TInt GetJpegInterchangeFormat( 
   549             TUint32& aJpegInterchangeFormat ) const = 0; 
   550     	
   551         /**
   552         * Gets the thumbnail Jpeg Interchange Format Length tag data.
   553         * @since 2.6
   554         * @param aJpegInterchangeFormatLength Returned thumbnail Jpeg 
   555         * Interchange Format Length data.
   556         * @return Error code.
   557         */    
   558         virtual TInt GetJpegInterchangeFormatLength( 
   559             TUint32& aJpegInterchangeFormatLength ) const = 0;
   560 
   561         /**
   562         * Returns a copy of whole Exif APP1 segment in a descriptor.
   563         * @since 2.6
   564         * @return Descriptor containing the Exif APP1 segment data.
   565         */    
   566         virtual HBufC8* GetExifAppSegmentL() const = 0;
   567 
   568         /**
   569         * Gets the Shutter Speed Value tag data.
   570         * @since 2.6
   571         * @param aShutterSpeedValue1 Shutter Speed Value numerator.
   572         * @param aShutterSpeedValue2 Shutter Speed Value denominator.
   573         * @return Error code.
   574         */
   575         virtual TInt GetShutterSpeedValue( TInt32& aShutterSpeedValue1, 
   576             TInt32& aShutterSpeedValue2 ) const = 0;
   577 
   578         /**
   579         * Gets the Brightness Value tag data.
   580         * @since 2.6
   581         * @param aBrightnessValue1 Brightness Value numerator.
   582         * @param aBrightnessValue2 Brightness Value denominator.
   583         * @return Error code.
   584         */
   585         virtual TInt GetBrightnessValue( TInt32& aBrightnessValue1, 
   586             TInt32& aBrightnessValue2 ) const = 0;
   587 
   588         /**
   589         * Gets the Custom Rendered tag data.
   590         * @since 2.6
   591         * @param aCustomRendered Returned Custom Rendered data.
   592         * @return Error code.
   593         */
   594         virtual TInt GetCustomRendered( TUint16& aCustomRendered ) const = 0;
   595 
   596         /**
   597         * Gets the Gain Control tag data.
   598         * @since 2.6
   599         * @param aGainControl Returned Gain Control data.
   600         * @return Error code.
   601         */
   602         virtual TInt GetGainControl( TUint16& aGainControl ) const = 0;
   603 
   604         /**
   605         * Gets the Gps Version tag data.
   606         * @since 2.6
   607         * @param aGpsVersion Returned Gps Version data.
   608         * @return Error code.
   609         */
   610         virtual TInt GetGpsVersion( TUint32& aGpsVersion ) const = 0; 
   611     };
   612 
   613 #endif      // EXIFREAD_H   
   614             
   615 // End of File