~ubuntu-branches/ubuntu/natty/libextractor/natty

« back to all changes in this revision

Viewing changes to src/plugins/exiv2/panasonicmn.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-11-17 20:27:32 UTC
  • mfrom: (1.10.4 upstream) (5.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20091117202732-ipm2h3gks5bdw2vx
Tags: 0.5.23+dfsg-3
* Building against libltdl7.
* Updating to standards version 3.8.3.
* Adding maintainer homepage field to control.
* Marking maintainer homepage field to be also included in binary
  packages and changelog.
* Adding README.source.
* Simplifying autotools handling in rules.
* Updating README.source.
* Moving maintainer homepage field from control to copyright.
* Dropping la files.
* Simplyfing debhelper install files.
* Bumping versioned build-depends on debhelper.
* Adding depends to dpkg install info.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// ***************************************************************** -*- C++ -*-
2
 
/*
3
 
 * Copyright (C) 2004, 2005 Andreas Huggel <ahuggel@gmx.net>
4
 
 *
5
 
 * This program is part of the Exiv2 distribution.
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU General Public License
9
 
 * as published by the Free Software Foundation; either version 2
10
 
 * of the License, or (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
 
 */
21
 
/*!
22
 
  @file    panasonicmn.hpp
23
 
  @brief   Panasonic MakerNote implemented using the following references:
24
 
           <a href="http://www.compton.nu/panasonic.html">Panasonic MakerNote Information</a> by Tom Hughes,
25
 
           Panasonic.pm of <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/">ExifTool</a> by Phil Harvey,
26
 
           <a href="http://www.ozhiker.com/electronics/pjmt/jpeg_info/panasonic_mn.html">Panasonic Makernote Format Specification</a> by Evan Hunter.
27
 
  @version $Rev: 581 $
28
 
  @author  Andreas Huggel (ahu)
29
 
           <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
30
 
  @date    11-Jun-05, ahu: created
31
 
 */
32
 
#ifndef PANASONICMN_HPP_
33
 
#define PANASONICMN_HPP_
34
 
 
35
 
// *****************************************************************************
36
 
// included header files
37
 
#include "types.hpp"
38
 
#include "makernote.hpp"
39
 
#include "tags.hpp"
40
 
 
41
 
// + standard includes
42
 
#include <string>
43
 
#include <iosfwd>
44
 
#include <memory>
45
 
 
46
 
// *****************************************************************************
47
 
// namespace extensions
48
 
namespace Exiv2 {
49
 
 
50
 
// *****************************************************************************
51
 
// class declarations
52
 
    class Value;
53
 
 
54
 
// *****************************************************************************
55
 
// free functions
56
 
 
57
 
    /*!
58
 
      @brief Return an auto-pointer to a newly created empty MakerNote
59
 
             initialized to operate in the memory management model indicated.
60
 
             The caller owns this copy and the auto-pointer ensures that it
61
 
             will be deleted.
62
 
 
63
 
      @param alloc Memory management model for the new MakerNote. Determines if
64
 
             memory required to store data should be allocated and deallocated
65
 
             (true) or not (false). If false, only pointers to the buffer
66
 
             provided to read() will be kept. See Ifd for more background on
67
 
             this concept.
68
 
      @param buf Pointer to the makernote character buffer (not used).
69
 
      @param len Length of the makernote character buffer (not used).
70
 
      @param byteOrder Byte order in which the Exif data (and possibly the
71
 
             makernote) is encoded (not used).
72
 
      @param offset Offset from the start of the TIFF header of the makernote
73
 
             buffer (not used).
74
 
 
75
 
      @return An auto-pointer to a newly created empty MakerNote. The caller
76
 
             owns this copy and the auto-pointer ensures that it will be
77
 
             deleted.
78
 
     */
79
 
    MakerNote::AutoPtr createPanasonicMakerNote(bool alloc,
80
 
                                                const byte* buf,
81
 
                                                long len,
82
 
                                                ByteOrder byteOrder,
83
 
                                                long offset);
84
 
 
85
 
// *****************************************************************************
86
 
// class definitions
87
 
 
88
 
    //! MakerNote for Panasonic cameras
89
 
    class PanasonicMakerNote : public IfdMakerNote {
90
 
    public:
91
 
        //! Shortcut for a %PanasonicMakerNote auto pointer.
92
 
        typedef std::auto_ptr<PanasonicMakerNote> AutoPtr;
93
 
 
94
 
        //! @name Creators
95
 
        //@{
96
 
        /*!
97
 
          @brief Constructor. Allows to choose whether or not memory management
98
 
                 is required for the makernote entries.
99
 
         */
100
 
        PanasonicMakerNote(bool alloc =true);
101
 
        //! Copy constructor
102
 
        PanasonicMakerNote(const PanasonicMakerNote& rhs);
103
 
        //! Virtual destructor
104
 
        virtual ~PanasonicMakerNote() {}
105
 
        //@}
106
 
 
107
 
        //! @name Manipulators
108
 
        //@{
109
 
        int readHeader(const byte* buf,
110
 
                       long len,
111
 
                       ByteOrder byteOrder);
112
 
        //@}
113
 
 
114
 
        //! @name Accessors
115
 
        //@{
116
 
        int checkHeader() const;
117
 
        AutoPtr create(bool alloc =true) const;
118
 
        AutoPtr clone() const;
119
 
        //@}
120
 
 
121
 
        //! @name Print functions for Panasonic %MakerNote tags
122
 
        //@{
123
 
        //! Print Quality
124
 
        static std::ostream& print0x0001(std::ostream& os, const Value& value);
125
 
        //! Print WhiteBalance
126
 
        static std::ostream& print0x0003(std::ostream& os, const Value& value);
127
 
        //! Print FocusMode
128
 
        static std::ostream& print0x0007(std::ostream& os, const Value& value);
129
 
        //! Print SpotMode
130
 
        static std::ostream& print0x000f(std::ostream& os, const Value& value);
131
 
        //! Print ImageStabilizer
132
 
        static std::ostream& print0x001a(std::ostream& os, const Value& value);
133
 
        //! Print Macro
134
 
        static std::ostream& print0x001c(std::ostream& os, const Value& value);
135
 
        //! Print ShootingMode
136
 
        static std::ostream& print0x001f(std::ostream& os, const Value& value);
137
 
        //! Print Audio
138
 
        static std::ostream& print0x0020(std::ostream& os, const Value& value);
139
 
        //! Print WhiteBalanceBias
140
 
        static std::ostream& print0x0023(std::ostream& os, const Value& value);
141
 
        //! Print ColorEffect
142
 
        static std::ostream& print0x0028(std::ostream& os, const Value& value);
143
 
        //! Print Contrast
144
 
        static std::ostream& print0x002c(std::ostream& os, const Value& value);
145
 
        //! Print NoiseReduction
146
 
        static std::ostream& print0x002d(std::ostream& os, const Value& value);
147
 
        //@}
148
 
 
149
 
        //! @cond IGNORE
150
 
        // Public only so that we can create a static instance
151
 
        struct RegisterMn {
152
 
            RegisterMn();
153
 
        };
154
 
        //! @endcond
155
 
 
156
 
    private:
157
 
        //! Internal virtual create function.
158
 
        PanasonicMakerNote* create_(bool alloc =true) const;
159
 
        //! Internal virtual copy constructor.
160
 
        PanasonicMakerNote* clone_() const;
161
 
 
162
 
        //! Tag information
163
 
        static const TagInfo tagInfo_[];
164
 
 
165
 
    }; // class PanasonicMakerNote
166
 
 
167
 
    static PanasonicMakerNote::RegisterMn registerPanasonicMakerNote;
168
 
}                                       // namespace Exiv2
169
 
 
170
 
#endif                                  // #ifndef PANASONICMN_HPP_