| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef KFILEMETADATA_SimpleExtractionResult_H |
| 8 | #define |
| 9 | |
| 10 | #include "extractionresult.h" |
| 11 | #include <QList> |
| 12 | #include <QString> |
| 13 | |
| 14 | #include <memory> |
| 15 | |
| 16 | namespace KFileMetaData { |
| 17 | |
| 18 | class ; |
| 19 | |
| 20 | /*! |
| 21 | * \class KFileMetaData::SimpleExtractionResult |
| 22 | * \inheaderfile KFileMetaData/SimpleExtractionResult |
| 23 | * \inmodule KFileMetaData |
| 24 | * |
| 25 | * \brief A simple ExtractionResult implementation which stores |
| 26 | * all the data in memory. |
| 27 | * |
| 28 | * This should ideally not be used in production applications as |
| 29 | * it holds all of the plain text in memory, and that can get quite large |
| 30 | * when extracting certain documents. |
| 31 | */ |
| 32 | class KFILEMETADATA_EXPORT : public ExtractionResult |
| 33 | { |
| 34 | public: |
| 35 | /*! |
| 36 | * |
| 37 | */ |
| 38 | (const QString& url, const QString& mimetype = QString(), const Flags& flags = Flags{ExtractPlainText | ExtractMetaData}); |
| 39 | (const SimpleExtractionResult& rhs); |
| 40 | () override; |
| 41 | |
| 42 | SimpleExtractionResult& (const SimpleExtractionResult& rhs); |
| 43 | |
| 44 | /*! |
| 45 | * |
| 46 | */ |
| 47 | bool (const SimpleExtractionResult& rhs) const; |
| 48 | |
| 49 | /*! |
| 50 | * |
| 51 | */ |
| 52 | void (Property::Property property, const QVariant& value) override; |
| 53 | |
| 54 | /*! |
| 55 | * |
| 56 | */ |
| 57 | void (Type::Type type) override; |
| 58 | |
| 59 | /*! |
| 60 | * |
| 61 | */ |
| 62 | void (const QString& text) override; |
| 63 | |
| 64 | /*! |
| 65 | * Returns the properties of the extraction result. |
| 66 | */ |
| 67 | PropertyMultiMap () const; |
| 68 | |
| 69 | /*! |
| 70 | * |
| 71 | */ |
| 72 | QString () const; |
| 73 | |
| 74 | /*! |
| 75 | * |
| 76 | */ |
| 77 | QList<Type::Type> () const; |
| 78 | |
| 79 | private: |
| 80 | const std::unique_ptr<SimpleExtractionResultPrivate> ; |
| 81 | }; |
| 82 | |
| 83 | } |
| 84 | |
| 85 | #endif // KFILEMETADATA_SimpleExtractionResult_H |
| 86 | |