KFileMetaData

extractorcollection.h
1 /*
2  SPDX-FileCopyrightText: 2012 Vishesh Handa <[email protected]>
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 
15 namespace KFileMetaData
16 {
17 class 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 <[email protected]>
29  */
30 class KFILEMETADATA_EXPORT ExtractorCollection
31 {
32 public:
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 
47 private:
48  friend class ExtractorCollectionTest;
49  QList<Extractor*> allExtractors();
50  const std::unique_ptr<ExtractorCollectionPrivate> d;
51 };
52 }
53 
54 #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-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.