KFileMetaData

extractor.h
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_EXTRACTOR_H
8#define KFILEMETADATA_EXTRACTOR_H
9
10#include "kfilemetadata_export.h"
11#include <QStringList>
12#include <QVariantMap>
13
14#include <memory>
15
16namespace KFileMetaData {
17
18class ExtractionResult;
19class ExtractorCollection;
20class ExtractorPlugin;
21class ExtractorPrivate;
22
23/**
24 * \class Extractor extractor.h <KFileMetaData/Extractor>
25 */
26class KFILEMETADATA_EXPORT Extractor
27{
28 enum ExtractorPluginOwnership {
29 AutoDeletePlugin,
30 DoNotDeletePlugin,
31 };
32
33public:
34 Extractor(Extractor&&);
35 virtual ~Extractor() noexcept;
36
37 void extract(ExtractionResult* result);
38 QStringList mimetypes() const;
39 QVariantMap extractorProperties() const;
40
41private:
42 KFILEMETADATA_NO_EXPORT Extractor();
43
44 Extractor(const Extractor&) = delete;
45 void operator =(const Extractor&) = delete;
46
47 KFILEMETADATA_NO_EXPORT void setExtractorPlugin(ExtractorPlugin *extractorPlugin);
48
49 KFILEMETADATA_NO_EXPORT void setAutoDeletePlugin(ExtractorPluginOwnership autoDelete);
50
51 KFILEMETADATA_NO_EXPORT 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-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:44:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.