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. It can be used to fetch a certain
23 * subset of these plugins based on a given mimetype.
24 *
25 * Once the appropriate plugins have been fetched, an ExtractionResult
26 * should be created and passed to the plugin's extract function.
27 *
28 * \author Vishesh Handa <me@vhanda.in>
29 */
30class KFILEMETADATA_EXPORT ExtractorCollection
31{
32public:
33 explicit ExtractorCollection();
34 virtual ~ExtractorCollection();
35
36 /**
37 * Fetch the extractors which can be used to extract
38 * data for the respective file with the given mimetype.
39 *
40 * If no match is found then the best matching plugins
41 * are returned, determined by mimetype inheritance.
42 *
43 * \sa QMimeType::allAncestors
44 */
45 QList<Extractor*> fetchExtractors(const QString& mimetype) const;
46
47private:
48 friend class ExtractorCollectionTest;
49 // exported for ExtractorCollectionTest
50 QList<Extractor*> allExtractors();
51
52 const std::unique_ptr<ExtractorCollectionPrivate> d;
53};
54}
55
56#endif
The ExtractorCollection is a helper class which internally loads all the extractor plugins.
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.