Exiv2
convert.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 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  */
30 #ifndef CONVERT_HPP_
31 #define CONVERT_HPP_
32 
33 #include "exiv2lib_export.h"
34 
35 // included header files
36 #include "config.h"
37 
38 // + standard includes
39 #include <string>
40 
41 // *****************************************************************************
42 // namespace extensions
43 namespace Exiv2 {
44 
45 // *****************************************************************************
46 // class declarations
47  class ExifData;
48  class IptcData;
49  class XmpData;
50 
51 // *****************************************************************************
52 // free functions, template and inline definitions
53 
55  EXIV2API void copyExifToXmp(const ExifData& exifData, XmpData& xmpData);
57  EXIV2API void moveExifToXmp(ExifData& exifData, XmpData& xmpData);
58 
60  EXIV2API void copyXmpToExif(const XmpData& xmpData, ExifData& exifData);
62  EXIV2API void moveXmpToExif(XmpData& xmpData, ExifData& exifData);
63 
65  EXIV2API void syncExifWithXmp(ExifData& exifData, XmpData& xmpData);
66 
68  EXIV2API void copyIptcToXmp(const IptcData& iptcData, XmpData& xmpData, const char *iptcCharset = 0);
70  EXIV2API void moveIptcToXmp(IptcData& iptcData, XmpData& xmpData, const char *iptcCharset = 0);
71 
73  EXIV2API void copyXmpToIptc(const XmpData& xmpData, IptcData& iptcData);
75  EXIV2API void moveXmpToIptc(XmpData& xmpData, IptcData& iptcData);
76 
111  EXIV2API bool convertStringCharset(std::string& str, const char* from, const char* to);
112 
113 } // namespace Exiv2
114 
115 #endif // #ifndef CONVERT_HPP_
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:1348
EXIV2API void copyExifToXmp(const ExifData &exifData, XmpData &xmpData)
Convert (copy) Exif tags to XMP properties.
Definition: convert.cpp:1285
EXIV2API void syncExifWithXmp(ExifData &exifData, XmpData &xmpData)
Detect which metadata are newer and perform a copy in appropriate direction.
Definition: convert.cpp:1311
EXIV2API void moveXmpToIptc(XmpData &xmpData, IptcData &iptcData)
Convert (move) XMP properties to IPTC tags, remove converted XMP properties.
Definition: convert.cpp:1341
EXIV2API void moveIptcToXmp(IptcData &iptcData, XmpData &xmpData, const char *iptcCharset=0)
Convert (move) IPTC datasets to XMP properties, remove converted IPTC datasets.
Definition: convert.cpp:1326
EXIV2API void copyXmpToIptc(const XmpData &xmpData, IptcData &iptcData)
Convert (copy) XMP properties to IPTC datasets.
Definition: convert.cpp:1335
IPTC string type.
Definition: types.hpp:147
EXIV2API void copyXmpToExif(const XmpData &xmpData, ExifData &exifData)
Convert (copy) XMP properties to Exif tags.
Definition: convert.cpp:1298
EXIV2API void moveExifToXmp(ExifData &exifData, XmpData &xmpData)
Convert (move) Exif tags to XMP properties, remove converted Exif tags.
Definition: convert.cpp:1291
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
EXIV2API void copyIptcToXmp(const IptcData &iptcData, XmpData &xmpData, const char *iptcCharset=0)
Convert (copy) IPTC datasets to XMP properties.
Definition: convert.cpp:1317
EXIV2API void moveXmpToExif(XmpData &xmpData, ExifData &exifData)
Convert (move) XMP properties to Exif tags, remove converted XMP properties.
Definition: convert.cpp:1304