KFileMetaData

exiv2extractor.h
1 /*
2  SPDX-FileCopyrightText: 2012 Vishesh Handa <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 
8 #ifndef EXIV2EXTRACTOR_H
9 #define EXIV2EXTRACTOR_H
10 
11 #include "extractorplugin.h"
12 #include <exiv2/exiv2.hpp>
13 
14 namespace KFileMetaData
15 {
16 
17 class Exiv2Extractor : public ExtractorPlugin
18 {
19  Q_OBJECT
20  Q_PLUGIN_METADATA(IID "org.kde.kf5.kfilemetadata.ExtractorPlugin"
21  FILE "exiv2extractor.json")
23 
24 public:
25  explicit Exiv2Extractor(QObject* parent = nullptr);
26 
27  void extract(ExtractionResult* result) override;
28  QStringList mimetypes() const override;
29 
30 private:
31  void add(ExtractionResult* result, const Exiv2::ExifData& data,
32  Property::Property prop,
33  const char* name, QVariant::Type type);
34 
35  double fetchGpsDouble(const Exiv2::ExifData& data, const char* name);
36  double fetchGpsAltitude(const Exiv2::ExifData& data);
37  QByteArray fetchByteArray(const Exiv2::ExifData& data, const char* name);
38 };
39 }
40 
41 #endif // EXIV2EXTRACTOR_H
The ExtractorPlugin is the base class for all file metadata extractors.
Q_OBJECTQ_OBJECT
Q_INTERFACES(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 22:54:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.