KFileMetaData

extractionresult.h
1 /*
2  SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef _KFILEMETADATA_EXTRACTIONRESULT_H
8 #define _KFILEMETADATA_EXTRACTIONRESULT_H
9 
10 #include <QString>
11 #include <QVariant>
12 
13 #include "kfilemetadata_export.h"
14 #include "properties.h"
15 #include "types.h"
16 
17 namespace KFileMetaData {
18 
31 class KFILEMETADATA_EXPORT ExtractionResult
32 {
33 public:
37  enum Flag {
38  ExtractNothing = 0,
39  ExtractMetaData = 1,
40  ExtractPlainText = 2,
41  ExtractEverything = (ExtractMetaData | ExtractPlainText)
42  };
46  Q_DECLARE_FLAGS(Flags, Flag)
47 
48 
54  ExtractionResult(const QString& url, const QString& mimetype = QString(), const Flags& flags = ExtractEverything);
56  virtual ~ExtractionResult();
57 
61  QString inputUrl() const;
62 
71  QString inputMimetype() const;
72 
77  Flags inputFlags() const;
78 
84  virtual void append(const QString& text) = 0;
85 
96  virtual void add(Property::Property property, const QVariant& value) = 0;
97 
106  virtual void addType(Type::Type type) = 0;
107 
108 private:
109  class Private;
110  Private* d;
111 };
112 
113 }
114 
115 Q_DECLARE_OPERATORS_FOR_FLAGS(KFileMetaData::ExtractionResult::Flags)
116 
117 #endif // _KFILEMETADATA_EXTRACTIONRESULT_H
<KFileMetaData/Properties>
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 Sat Jul 4 2020 22:54:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.