KFileMetaData

extractor.cpp
1 /*
2  SPDX-FileCopyrightText: 2014 Vishesh Handa <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #include "extractor.h"
8 #include "extractor_p.h"
9 #include "extractorplugin.h"
10 
11 #include <utility>
12 
13 using namespace KFileMetaData;
14 
15 Extractor::Extractor()
16  : d(new ExtractorPrivate)
17 {
18 }
19 
20 Extractor::~Extractor() = default;
21 
22 Extractor::Extractor(Extractor&& other)
23 {
24  d = std::move(other.d);
25 }
26 
27 void Extractor::extract(ExtractionResult* result)
28 {
29  d->m_plugin->extract(result);
30 }
31 
32 QStringList Extractor::mimetypes() const
33 {
34  return d->m_plugin->mimetypes();
35 }
36 
37 QVariantMap Extractor::extractorProperties() const
38 {
39  return d->m_metaData;
40 }
41 
42 void Extractor::setExtractorPlugin(ExtractorPlugin *extractorPlugin)
43 {
44  d->m_plugin = extractorPlugin;
45 }
46 
47 void Extractor::setAutoDeletePlugin(ExtractorPluginOwnership autoDelete)
48 {
49  d->m_autoDeletePlugin = autoDelete;
50 }
51 
52 void Extractor::setMetaData(const QVariantMap &metaData)
53 {
54  d->m_metaData = metaData;
55 }
The ExtractionResult class is where all the data extracted by the indexer is saved....
The ExtractorPlugin is the base class for all file metadata extractors. It is responsible for extract...
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.