KFileMetaData

extractor.h
1 /*
2  SPDX-FileCopyrightText: 2014 Vishesh Handa <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef KFILEMETADATA_EXTRACTOR_H
8 #define KFILEMETADATA_EXTRACTOR_H
9 
10 #include "kfilemetadata_export.h"
11 #include <QStringList>
12 #include <QVariantMap>
13 
14 #include <memory>
15 
16 namespace KFileMetaData {
17 
18 class ExtractionResult;
19 class ExtractorCollection;
20 class ExtractorPlugin;
21 class ExtractorPrivate;
22 
23 /**
24  * \class Extractor extractor.h <KFileMetaData/Extractor>
25  */
26 class KFILEMETADATA_EXPORT Extractor
27 {
28  enum ExtractorPluginOwnership {
29  AutoDeletePlugin,
30  DoNotDeletePlugin,
31  };
32 
33 public:
34  Extractor(Extractor&&);
35  virtual ~Extractor() noexcept;
36 
37  void extract(ExtractionResult* result);
38  QStringList mimetypes() const;
39  QVariantMap extractorProperties() const;
40 
41 private:
42  Extractor();
43  Extractor(const Extractor&);
44 
45  void operator =(const Extractor&);
46 
47  void setExtractorPlugin(ExtractorPlugin *extractorPlugin);
48 
49  void setAutoDeletePlugin(ExtractorPluginOwnership autoDelete);
50 
51  void setMetaData(const QVariantMap &metaData);
52 
53  friend class ExtractorCollection;
54  friend class ExtractorCollectionPrivate;
55  friend class ExtractorPrivate;
56  std::unique_ptr<ExtractorPrivate> d;
57 };
58 }
59 
60 #endif // KFILEMETADATA_EXTRACTOR_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 26 2022 03:46:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.