KFileMetaData

extractorcollection.h
1/*
2 SPDX-FileCopyrightText: 2012 Vishesh Handa <me@vhanda.in>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef _KFILEMETADATA_EXTRACTORCOLLECTION_H
8#define _KFILEMETADATA_EXTRACTORCOLLECTION_H
9
10#include "extractor.h"
11#include "kfilemetadata_export.h"
12
13#include <memory>
14
15namespace KFileMetaData
16{
17class ExtractorCollectionPrivate;
18/**
19 * \class ExtractorCollection extractorcollection.h <KFileMetaData/ExtractorCollection>
20 *
21 * \brief The ExtractorCollection is a helper class which internally
22 * loads all the extractor plugins.
23 *
24 * It can be used to fetch a certain
25 * subset of these plugins based on a given mimetype.
26 *
27 * Once the appropriate plugins have been fetched, an ExtractionResult
28 * should be created and passed to the plugin's extract function.
29 *
30 * \author Vishesh Handa <me@vhanda.in>
31 */
32class KFILEMETADATA_EXPORT ExtractorCollection
33{
34public:
35 explicit ExtractorCollection();
36 virtual ~ExtractorCollection();
37
38 /**
39 * Fetch the extractors which can be used to extract
40 * data for the respective file with the given MIME type.
41 *
42 * If no match is found then the best matching plugins
43 * are returned, determined by MIME type inheritance.
44 *
45 * \sa QMimeType::allAncestors
46 */
47 QList<Extractor*> fetchExtractors(const QString& mimetype) const;
48
49private:
50 friend class ExtractorCollectionTest;
51 // exported for ExtractorCollectionTest
52 QList<Extractor*> allExtractors();
53
54 const std::unique_ptr<ExtractorCollectionPrivate> d;
55};
56}
57
58#endif
The ExtractorCollection is a helper class which internally loads all the extractor plugins.
The KFileMetaData namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:09:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.