KFileMetaData

extractor.cpp
1/*
2 SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in>
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
13using namespace KFileMetaData;
14
15Extractor::Extractor()
16 : d(new ExtractorPrivate)
17{
18}
19
20Extractor::~Extractor() = default;
21
22Extractor::Extractor(Extractor&& other)
23{
24 d = std::move(other.d);
25}
26
27void Extractor::extract(ExtractionResult* result)
28{
29 d->m_plugin->extract(result);
30}
31
32QStringList Extractor::mimetypes() const
33{
34 return d->m_plugin->mimetypes();
35}
36
37QVariantMap Extractor::extractorProperties() const
38{
39 return d->m_metaData;
40}
41
42void Extractor::setExtractorPlugin(ExtractorPlugin *extractorPlugin)
43{
44 d->m_plugin = extractorPlugin;
45}
46
47void Extractor::setAutoDeletePlugin(ExtractorPluginOwnership autoDelete)
48{
49 d->m_autoDeletePlugin = autoDelete;
50}
51
52void 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.
The Extractor class is used to extract data from a file.
Definition extractor.h:29
The KFileMetaData namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.