~noskcaj/ubuntu/trusty/libextractor/merge

« back to all changes in this revision

Viewing changes to src/plugins/exiv2/sonymn.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) 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    sonymn.hpp
23
 
  @brief   Basic Sony MakerNote implementation
24
 
  @version $Rev: 569 $
25
 
  @author  Andreas Huggel (ahu)
26
 
           <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
27
 
  @date    18-Apr-05, ahu: created
28
 
 */
29
 
#ifndef SONYMN_HPP_
30
 
#define SONYMN_HPP_
31
 
 
32
 
// *****************************************************************************
33
 
// included header files
34
 
#include "types.hpp"
35
 
#include "makernote.hpp"
36
 
#include "tags.hpp"
37
 
 
38
 
// + standard includes
39
 
#include <string>
40
 
#include <iosfwd>
41
 
#include <memory>
42
 
 
43
 
// *****************************************************************************
44
 
// namespace extensions
45
 
namespace Exiv2 {
46
 
 
47
 
// *****************************************************************************
48
 
// class declarations
49
 
    class Value;
50
 
 
51
 
// *****************************************************************************
52
 
// free functions
53
 
 
54
 
    /*!
55
 
      @brief Return an auto-pointer to a newly created empty MakerNote
56
 
             initialized to operate in the memory management model indicated.
57
 
             The caller owns this copy and the auto-pointer ensures that it
58
 
             will be deleted.
59
 
 
60
 
      @param alloc Memory management model for the new MakerNote. Determines if
61
 
             memory required to store data should be allocated and deallocated
62
 
             (true) or not (false). If false, only pointers to the buffer
63
 
             provided to read() will be kept. See Ifd for more background on
64
 
             this concept.
65
 
      @param buf Pointer to the makernote character buffer (not used).
66
 
      @param len Length of the makernote character buffer (not used).
67
 
      @param byteOrder Byte order in which the Exif data (and possibly the
68
 
             makernote) is encoded (not used).
69
 
      @param offset Offset from the start of the TIFF header of the makernote
70
 
             buffer (not used).
71
 
 
72
 
      @return An auto-pointer to a newly created empty MakerNote. The caller
73
 
             owns this copy and the auto-pointer ensures that it will be
74
 
             deleted.
75
 
     */
76
 
    MakerNote::AutoPtr createSonyMakerNote(bool alloc,
77
 
                                            const byte* buf,
78
 
                                            long len,
79
 
                                            ByteOrder byteOrder,
80
 
                                            long offset);
81
 
 
82
 
// *****************************************************************************
83
 
// class definitions
84
 
 
85
 
    //! MakerNote for Sony cameras
86
 
    class SonyMakerNote : public IfdMakerNote {
87
 
    public:
88
 
        //! Shortcut for a %SonyMakerNote auto pointer.
89
 
        typedef std::auto_ptr<SonyMakerNote> AutoPtr;
90
 
 
91
 
        //! @name Creators
92
 
        //@{
93
 
        /*!
94
 
          @brief Constructor. Allows to choose whether or not memory management
95
 
                 is required for the makernote entries.
96
 
         */
97
 
        SonyMakerNote(bool alloc =true);
98
 
        //! Copy constructor
99
 
        SonyMakerNote(const SonyMakerNote& rhs);
100
 
        //! Virtual destructor
101
 
        virtual ~SonyMakerNote() {}
102
 
        //@}
103
 
 
104
 
        //! @name Manipulators
105
 
        //@{
106
 
        int readHeader(const byte* buf,
107
 
                       long len,
108
 
                       ByteOrder byteOrder);
109
 
        //@}
110
 
 
111
 
        //! @name Accessors
112
 
        //@{
113
 
        int checkHeader() const;
114
 
        AutoPtr create(bool alloc =true) const;
115
 
        AutoPtr clone() const;
116
 
        //@}
117
 
 
118
 
        //! @cond IGNORE
119
 
        // Public only so that we can create a static instance
120
 
        struct RegisterMn {
121
 
            RegisterMn();
122
 
        };
123
 
        //! @endcond
124
 
 
125
 
    private:
126
 
        //! Internal virtual create function.
127
 
        SonyMakerNote* create_(bool alloc =true) const;
128
 
        //! Internal virtual copy constructor.
129
 
        SonyMakerNote* clone_() const;
130
 
 
131
 
        //! Tag information
132
 
        static const TagInfo tagInfo_[];
133
 
 
134
 
    }; // class SonyMakerNote
135
 
 
136
 
    static SonyMakerNote::RegisterMn registerSonyMakerNote;
137
 
}                                       // namespace Exiv2
138
 
 
139
 
#endif                                  // #ifndef SONYMN_HPP_