KFileMetaData

extractorplugin.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 _KFILEMETADATA_EXTRACTOR_PLUGIN_H
9 #define _KFILEMETADATA_EXTRACTOR_PLUGIN_H
10 
11 #include <QStringList>
12 #include <QDateTime>
13 
14 #include "kfilemetadata_export.h"
15 #include "extractionresult.h"
16 
17 namespace KFileMetaData
18 {
19 
33 class KFILEMETADATA_EXPORT ExtractorPlugin : public QObject
34 {
35  Q_OBJECT
36 public:
37  explicit ExtractorPlugin(QObject* parent);
38  virtual ~ExtractorPlugin();
39 
51  virtual QStringList mimetypes() const = 0;
52 
63  virtual void extract(ExtractionResult* result) = 0;
64 
65  //
66  // Helper functions
67  //
68 
72  static QDateTime dateTimeFromString(const QString& dateString);
73 
78  static QStringList contactsFromString(const QString& string);
79 
80 protected:
95  QString getSupportedMimeType(const QString& mimetype) const;
96 
97 private:
98  class Private;
99  Private* d;
100 };
101 }
102 
103 Q_DECLARE_INTERFACE(KFileMetaData::ExtractorPlugin, "org.kde.kf5.kfilemetadata.ExtractorPlugin")
104 
105 #endif // _KFILEMETADATA_EXTRACTOR_PLUGIN_H
The ExtractorPlugin is the base class for all file metadata extractors.
The ExtractionResult class is where all the data extracted by the indexer is saved.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:52:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.