26 #ifndef DIGIKAM_META_ENGINE_PRIVATE_H
27 #define DIGIKAM_META_ENGINE_PRIVATE_H
46 #include <QLatin1String>
48 #include <QSharedData>
49 #include <QMutexLocker>
50 #include <QRecursiveMutex>
51 #include <QMimeDatabase>
58 #if defined(Q_CC_CLANG)
59 # pragma clang diagnostic push
60 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
68 # pragma GCC visibility push(default)
71 #include <exiv2/exv_conf.h>
72 #include <exiv2/error.hpp>
73 #include <exiv2/convert.hpp>
74 #include <exiv2/image.hpp>
75 #include <exiv2/jpgimage.hpp>
76 #include <exiv2/datasets.hpp>
77 #include <exiv2/tags.hpp>
78 #include <exiv2/preview.hpp>
79 #include <exiv2/properties.hpp>
80 #include <exiv2/types.hpp>
81 #include <exiv2/exif.hpp>
82 #include <exiv2/xmpsidecar.hpp>
83 #include <exiv2/version.hpp>
87 #ifdef EXV_HAVE_XMP_TOOLKIT
88 # define _XMP_SUPPORT_ 1
91 #ifndef EXIV2_TEST_VERSION
92 # define EXIV2_TEST_VERSION(major,minor,patch) \
93 ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
96 #if EXIV2_TEST_VERSION(0,27,99)
97 # define AutoPtr UniquePtr
100 #if EXIV2_TEST_VERSION(0,27,4)
101 # include <exiv2/bmffimage.hpp>
109 # pragma GCC visibility pop
133 void copyPrivateData(
const Private*
const other);
135 bool saveToXMPSidecar(
const QFileInfo& finfo)
const;
136 bool saveToFile(
const QFileInfo& finfo)
const;
142 QString convertCommentValue(
const Exiv2::Exifdatum& exifDatum)
const;
147 QString detectEncodingAndDecode(
const std::string&
value)
const;
152 bool isUtf8(
const char*
const buffer)
const;
156 const Exiv2::ExifData& exifMetadata()
const;
157 const Exiv2::IptcData& iptcMetadata()
const;
158 const std::string& itemComments()
const;
160 Exiv2::ExifData& exifMetadata();
161 Exiv2::IptcData& iptcMetadata();
162 std::string& itemComments();
168 const Exiv2::XmpData& xmpMetadata()
const;
169 Exiv2::XmpData& xmpMetadata();
180 QString extractIptcTagString(
const Exiv2::IptcData& iptcData,
const Exiv2::Iptcdatum& iptcTag)
const;
188 static void printExiv2ExceptionError(
const QString& msg, Exiv2::AnyError& e);
194 static void printExiv2MessageHandler(
int lvl,
const char* msg);
215 QExplicitlySharedDataPointer<MetaEngineData::Private>
data;
220 #if defined(Q_CC_CLANG)
221 # pragma clang diagnostic pop
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43
bool s_metaEngineSupportBmff
Flag for Exiv2 Base Media File Format support.
Definition: metaengine_p.cpp:79
QRecursiveMutex s_metaEngineMutex
Mutex to fix no re-entrancy from Exiv2.
Definition: metaengine_p.cpp:73