KFileMetaData
5.109.0
kfilemetadata-9999_git1689299653
src
extractorplugin.h
1
/*
2
SPDX-FileCopyrightText: 2012 Vishesh Handa <me@vhanda.in>
3
4
SPDX-License-Identifier: LGPL-2.1-or-later
5
*/
6
7
8
#ifndef _KFILEMETADATA_EXTRACTOR_PLUGIN_H
9
#define _KFILEMETADATA_EXTRACTOR_PLUGIN_H
10
11
#include <QStringList>
12
#include <QDateTime>
13
14
#include "kfilemetadata_export.h"
15
#include "extractionresult.h"
16
17
namespace
KFileMetaData
18
{
19
33
class
KFILEMETADATA_EXPORT
ExtractorPlugin
:
public
QObject
34
{
35
Q_OBJECT
36
public
:
37
explicit
ExtractorPlugin
(QObject* parent);
38
~ExtractorPlugin
()
override
;
39
51
virtual
QStringList
mimetypes
()
const
= 0;
52
63
virtual
void
extract
(
ExtractionResult
* result) = 0;
64
65
//
66
// Helper functions
67
//
68
72
static
QDateTime
dateTimeFromString
(
const
QString& dateString);
73
78
static
QStringList
contactsFromString
(
const
QString&
string
);
79
80
protected
:
95
QString
getSupportedMimeType
(
const
QString& mimetype)
const
;
96
97
private
:
98
class
ExtractorPluginPrivate;
99
ExtractorPluginPrivate *d_placeholder;
// Placeholder for future binary compatible extensions
100
};
101
}
102
103
Q_DECLARE_INTERFACE(
KFileMetaData::ExtractorPlugin
,
"org.kde.kf5.kfilemetadata.ExtractorPlugin"
)
104
105
#endif
// _KFILEMETADATA_EXTRACTOR_PLUGIN_H
KFileMetaData::ExtractionResult
The ExtractionResult class is where all the data extracted by the indexer is saved.
Definition
extractionresult.h:35
KFileMetaData::ExtractorPlugin
The ExtractorPlugin is the base class for all file metadata extractors.
Definition
extractorplugin.h:34
KFileMetaData::ExtractorPlugin::dateTimeFromString
static QDateTime dateTimeFromString(const QString &dateString)
Tries to extract a valid date time from the string provided.
KFileMetaData::ExtractorPlugin::getSupportedMimeType
QString getSupportedMimeType(const QString &mimetype) const
Return the inherited mimetype which the extractor directly supports.
KFileMetaData::ExtractorPlugin::mimetypes
virtual QStringList mimetypes() const =0
Provide a list of mimetypes which are supported by this plugin.
KFileMetaData::ExtractorPlugin::contactsFromString
static QStringList contactsFromString(const QString &string)
Tries to split the string into names.
KFileMetaData::ExtractorPlugin::extract
virtual void extract(ExtractionResult *result)=0
The main function of the plugin that is responsible for extracting the data and filling up the Extrac...
Generated by
1.9.7