Exiv2
exiv2.hpp
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2021 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
20 #ifndef EXIV2_HPP_
21 #define EXIV2_HPP_
22 
23 // *****************************************************************************
24 // included header files
25 #include "exiv2/config.h"
26 #include "exiv2/datasets.hpp"
27 #include "exiv2/basicio.hpp"
28 #include "exiv2/bmffimage.hpp"
29 #include "exiv2/bmpimage.hpp"
30 #include "exiv2/convert.hpp"
31 #include "exiv2/cr2image.hpp"
32 #include "exiv2/crwimage.hpp"
33 #include "exiv2/easyaccess.hpp"
34 #include "exiv2/epsimage.hpp"
35 #include "exiv2/error.hpp"
36 #include "exiv2/exif.hpp"
37 #include "exiv2/futils.hpp"
38 #include "exiv2/gifimage.hpp"
39 #include "exiv2/http.hpp"
40 #include "exiv2/image.hpp"
41 #include "exiv2/ini.hpp"
42 #include "exiv2/iptc.hpp"
43 #include "exiv2/jp2image.hpp"
44 #include "exiv2/jpgimage.hpp"
45 #include "exiv2/metadatum.hpp"
46 #include "exiv2/mrwimage.hpp"
47 #include "exiv2/orfimage.hpp"
48 #include "exiv2/pgfimage.hpp"
49 
50 #ifdef EXV_HAVE_LIBZ
51 #include "exiv2/pngimage.hpp"
52 #endif
53 
54 #include "exiv2/preview.hpp"
55 #include "exiv2/properties.hpp"
56 #include "exiv2/psdimage.hpp"
57 #include "exiv2/rafimage.hpp"
58 #include "exiv2/rw2image.hpp"
59 
60 #ifdef EXV_USE_SSH
61 #include "exiv2/ssh.hpp"
62 #endif
63 
64 #include "exiv2/tags.hpp"
65 #include "exiv2/tgaimage.hpp"
66 #include "exiv2/tiffimage.hpp"
67 #include "exiv2/types.hpp"
68 #include "exiv2/value.hpp"
69 #include "exiv2/version.hpp"
70 #include "exiv2/xmp_exiv2.hpp"
71 #include "exiv2/xmpsidecar.hpp"
72 
73 #endif//ifndef EXIV2_HPP_
Params::timestamp_
bool timestamp_
Rename also sets the file timestamp.
Definition: exiv2app.hpp:227
Params::directory_
std::string directory_
Location for files to extract/insert.
Definition: exiv2app.hpp:246
Exiv2::XmpProperties::propertyType
static TypeId propertyType(const XmpKey &key)
Return the type for property key. The default for unknown keys is xmpText.
Exiv2::ImageType::xmp
const int xmp
XMP sidecar files (see class XmpSidecar)
Definition: xmpsidecar.hpp:38
ModifyCmds
std::vector< ModifyCmd > ModifyCmds
Container for modification commands.
Definition: exiv2app.hpp:96
CmdIdAndString
Structure to link command identifiers to strings.
Definition: exiv2app.hpp:98
Exiv2::DataBuf::pData_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
exif.hpp
Encoding and decoding of Exif data.
crwimage.hpp
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Params::adjustment_
long adjustment_
Adjustment in seconds.
Definition: exiv2app.hpp:238
Params::YodAdjust::flag_
bool flag_
Adjustment flag.
Definition: exiv2app.hpp:215
bmpimage.hpp
Windows Bitmap (BMP) image.
ModifyCmd::metadataId_
MetadataId metadataId_
Metadata identifier.
Definition: exiv2app.hpp:89
Params::cmdFiles_
CmdFiles cmdFiles_
Names of the modification command files.
Definition: exiv2app.hpp:242
Params::preserve_
bool preserve_
Preserve timestamps flag.
Definition: exiv2app.hpp:226
CmdId
CmdId
Command identifiers.
Definition: exiv2app.hpp:70
ModifyCmd
Structure for one parsed modification command.
Definition: exiv2app.hpp:82
Params::printItems_
unsigned long printItems_
Print items.
Definition: exiv2app.hpp:232
Exiv2::LogMsg::setLevel
static void setLevel(Level level)
Set the log level. Only log messages with a level greater or equal level are sent to the log message ...
Definition: error.cpp:193
Exiv2::AnyError
Error class interface. Allows the definition and use of a hierarchy of error classes which can all be...
Definition: error.hpp:174
Params::cleanup
void cleanup()
Destructor.
Definition: exiv2.cpp:211
Params::verbose_
bool verbose_
Verbose (talkative) option flag.
Definition: exiv2app.hpp:222
Params::fileExistsPolicy_
FileExistsPolicy fileExistsPolicy_
What to do if file to rename exists.
Definition: exiv2app.hpp:229
Params::binary_
bool binary_
Suppress long binary values.
Definition: exiv2app.hpp:224
Params::keys_
Keys keys_
List of keys to match from the metadata.
Definition: exiv2app.hpp:251
ModifyCmd::value_
std::string value_
Data.
Definition: exiv2app.hpp:93
Params::cmdLines_
CmdLines cmdLines_
Commands from the command line.
Definition: exiv2app.hpp:243
Params::previewNumbers_
PreviewNumbers previewNumbers_
List of preview numbers.
Definition: exiv2app.hpp:249
Exiv2::XmpKey
Concrete keys for XMP metadata.
Definition: properties.hpp:230
Params::printMode_
PrintMode printMode_
Print mode.
Definition: exiv2app.hpp:231
Params::modifyCmds_
ModifyCmds modifyCmds_
Parsed modification commands.
Definition: exiv2app.hpp:244
Params::version_
bool version_
Version option flag.
Definition: exiv2app.hpp:221
cr2image.hpp
Class Cr2Image.
Exiv2::Internal::Tag::all
const uint32_t all
Special tag: all tags in a group.
Definition: tiffcomposite_int.hpp:75
Exiv2::IptcDataSets::dataSetType
static TypeId dataSetType(uint16_t number, uint16_t recordId)
Return the type for dataSet number and Record id.
Definition: datasets.cpp:478
Params::help_
bool help_
Help option flag.
Definition: exiv2app.hpp:220
Params::timestampOnly_
bool timestampOnly_
Rename only sets the file timestamp.
Definition: exiv2app.hpp:228
Params::printTarget
static std::string printTarget(const std::string &before, int target, bool bPrint=false, std::ostream &os=std::cout)
Print target_.
Definition: exiv2.cpp:248
Exiv2::TypeInfo::typeId
static TypeId typeId(const std::string &typeName)
Return the type id for a type name.
Definition: types.cpp:109
Exiv2::getProcessPath
EXIV2API std::string getProcessPath()
Return the path of the current process.
Definition: futils.cpp:434
Exiv2::convertStringCharset
EXIV2API bool convertStringCharset(std::string &str, const char *from, const char *to)
Convert character encoding of str from from to to. If the function succeeds, str contains the result ...
Definition: convert.cpp:1351
Exiv2::XmpParser::terminate
static void terminate()
Terminate the XMP Toolkit and unregister custom namespaces.
Definition: xmp.cpp:703
Exiv2::invalidTypeId
@ invalidTypeId
Invalid type id.
Definition: types.hpp:146
Params::YodAdjust::option_
const char * option_
Adjustment option string.
Definition: exiv2app.hpp:216
Exiv2::byte
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:94
Params::PreviewNumbers
std::set< int > PreviewNumbers
Container for preview image numbers.
Definition: exiv2app.hpp:150
Exiv2::XmpProperties::unregisterNs
static void unregisterNs()
Unregister all custom namespaces.
MetadataId
MetadataId
Metadata identifiers.
Definition: exiv2app.hpp:75
ModifyCmd::key_
std::string key_
Exiv2 key string.
Definition: exiv2app.hpp:88
exiv2app.hpp
Defines class Params, used for the command line handling of exiv2.
Params::CmdLines
std::vector< std::string > CmdLines
Container for commands from the command line.
Definition: exiv2app.hpp:146
Params::formatSet_
bool formatSet_
Whether the format is set with -r.
Definition: exiv2app.hpp:241
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
Exiv2::DataBuf::alloc
void alloc(long size)
Allocate a data buffer of at least the given size. Note that if the requested size is less than the c...
Definition: types.cpp:156
Params::help
void help(std::ostream &os=std::cout) const
Print further usage explanations to an output stream.
Definition: exiv2.cpp:267
Exiv2::ExifKey
Concrete keys for Exif metadata and access to Exif tag reference data.
Definition: tags.hpp:140
Exiv2::DataBuf::size_
long size_
The current size of the buffer.
Definition: types.hpp:260
Params::charset_
std::string charset_
Charset to use for UNICODE Exif user comment.
Definition: exiv2app.hpp:252
Params::YodAdjust
Structure for year, month and day adjustment command line arguments.
Definition: exiv2app.hpp:214
Params::unknown_
bool unknown_
Suppress unknown tags.
Definition: exiv2app.hpp:225
Params::instance
static Params & instance()
Controls all access to the global Params instance.
Definition: exiv2.cpp:195
Util::strtol
bool strtol(const char *nptr, long &n)
Convert a C string to a long value, which is returned in n. Returns true if the conversion is success...
Definition: utils.cpp:99
Params::usage
void usage(std::ostream &os=std::cout) const
Print a minimal usage note to an output stream.
Definition: exiv2.cpp:241
Params::yodAdjust_
YodAdjust yodAdjust_[3]
Year, month and day adjustment info.
Definition: exiv2app.hpp:239
convert.hpp
Exif and IPTC conversions to and from XMP.
Params::printTags_
unsigned long printTags_
Print tags (bitmap of MetadataId flags). Action (integer rather than TaskType to avoid dependency).
Definition: exiv2app.hpp:233
Exiv2::TypeId
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
Params::target_
int target_
What common target to process.
Definition: exiv2app.hpp:236
Exiv2::XmpProperties::registerNs
static void registerNs(const std::string &ns, const std::string &prefix)
Register namespace ns with preferred prefix prefix.
Params::adjust_
bool adjust_
Adjustment flag.
Definition: exiv2app.hpp:230
Exiv2_grep_key_t
exv_grep_key_t is a simple string and the ignore flag
Definition: version.hpp:41
Params::greps_
Greps greps_
List of keys to 'grep' from the metadata.
Definition: exiv2app.hpp:250
easyaccess.hpp
Provides easy (high-level) access to some Exif meta data.
Params::getopt
int getopt(int argc, char *const argv[])
Call Getopt::getopt() with optstring, to inititate command line argument parsing, perform consistency...
Params::format_
std::string format_
Filename format (-r option arg).
Definition: exiv2app.hpp:240
Params::files_
Files files_
List of non-option arguments.
Definition: exiv2app.hpp:248
Params::getStdin
void getStdin(Exiv2::DataBuf &buf)
getStdin binary data read from stdin to DataBuf
Params
Implements the command line handling for the program.
Definition: exiv2app.hpp:138
Exiv2::time
@ time
IPTC time type.
Definition: types.hpp:138
Params::suffix_
std::string suffix_
File extension of the file to insert.
Definition: exiv2app.hpp:247
Exiv2::dumpLibraryInfo
EXIV2API void dumpLibraryInfo(std::ostream &os, const exv_grep_keys_t &keys)
dumpLibraryInfo implements the exiv2 option –version –verbose used by exiv2 test suite to inspect...
Definition: version.cpp:235
Params::YodAdjust::adjustment_
long adjustment_
Adjustment value.
Definition: exiv2app.hpp:217
epsimage.hpp
EPS image. References: [1] Adobe PostScript Language Document Structuring Conventions Specification...
Params::option
virtual int option(int opt, const std::string &optarg, int optopt)
Handle options and their arguments.
Exiv2::Error
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:324
Exiv2::IptcKey
Concrete keys for IPTC metadata.
Definition: datasets.hpp:275
ModifyCmd::cmdId_
CmdId cmdId_
Command identifier.
Definition: exiv2app.hpp:87
Params::CmdFiles
std::vector< std::string > CmdFiles
Container for command files.
Definition: exiv2app.hpp:144
Exiv2::XmpParser::initialize
static bool initialize(XmpParser::XmpLockFct xmpLockFct=0, void *pLockData=0)
Initialize the XMP Toolkit.
Definition: xmp.cpp:641
Params::nonoption
virtual int nonoption(const std::string &argv)
Handle non-option parameters.
Params::jpegComment_
std::string jpegComment_
Jpeg comment to set in the image.
Definition: exiv2app.hpp:245
Params::force_
bool force_
Force overwrites flag.
Definition: exiv2app.hpp:223
datasets.hpp
IPTC dataset and type information.
Exiv2::toString
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:510
Params::stdinBuf
Exiv2::DataBuf stdinBuf
DataBuf with the binary bytes from stdin.
Definition: exiv2app.hpp:254
ModifyCmd::typeId_
Exiv2::TypeId typeId_
Exiv2 type identifier Flag to indicate if the type was explicitly specified (true)
Definition: exiv2app.hpp:90
error.hpp
Error class for exceptions, log message class.
iptc.hpp
Encoding and decoding of IPTC data.
Params::version
void version(bool verbose=false, std::ostream &os=std::cout) const
Print version information to an output stream.
Definition: exiv2.cpp:217