Ensure the MakerNote data pointers are initialized with NULL.
[platform/upstream/libexif.git] / libexif / olympus / exif-mnote-data-olympus.h
1 /* mnote-olympus-data.h
2  *
3  * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, 
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details. 
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA  02110-1301  USA.
19  */
20
21 #ifndef __MNOTE_OLYMPUS_CONTENT_H__
22 #define __MNOTE_OLYMPUS_CONTENT_H__
23
24 #include <libexif/exif-mnote-data-priv.h>
25 #include <libexif/olympus/mnote-olympus-entry.h>
26 #include <libexif/exif-byte-order.h>
27 #include <libexif/exif-data.h>
28 #include <libexif/exif-mem.h>
29
30 enum OlympusVersion {
31         unrecognized = 0,
32         nikonV1 = 1,
33         nikonV2 = 2,
34         olympusV1 = 3,
35         olympusV2 = 4,
36         sanyoV1 = 5,
37         epsonV1 = 6,
38         nikonV0 = 7
39 };
40
41
42 typedef struct _ExifMnoteDataOlympus ExifMnoteDataOlympus;
43
44 struct _ExifMnoteDataOlympus {
45         ExifMnoteData parent;
46
47         MnoteOlympusEntry *entries;
48         unsigned int count;
49
50         ExifByteOrder order;
51         unsigned int offset;
52         enum OlympusVersion version;
53 };
54
55 /*! Detect if MakerNote is recognized as one handled by the Olympus module.
56  * 
57  * \param[in] ed image #ExifData to identify as as an Olympus type
58  * \param[in] e #ExifEntry for EXIF_TAG_MAKER_NOTE, from within ed but
59  *   duplicated here for convenience
60  * \return 0 if not recognized, nonzero if recognized. The specific nonzero 
61  *   value returned may identify a subtype unique within this module.
62  */
63 int exif_mnote_data_olympus_identify (const ExifData *ed, const ExifEntry *e);
64
65 ExifMnoteData *exif_mnote_data_olympus_new (ExifMem *);
66
67 #endif /* __MNOTE_OLYMPUS_CONTENT_H__ */