| 1 | /* |
| 2 | This file is part of the KFileMetaData project |
| 3 | SPDX-FileCopyrightText: 2016 Varun Joshi <varunj.1011@gmail.com> |
| 4 | SPDX-FileCopyrightText: 2016 Vishesh Handa <me@vhanda.in> |
| 5 | |
| 6 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #ifndef _KFILEMETADTA_WRITERCOLLECTION_H |
| 10 | #define _KFILEMETADTA_WRITERCOLLECTION_H |
| 11 | |
| 12 | #include <QList> |
| 13 | |
| 14 | #include <memory> |
| 15 | |
| 16 | #include "kfilemetadata_export.h" |
| 17 | #include "writer.h" |
| 18 | |
| 19 | namespace KFileMetaData |
| 20 | { |
| 21 | class WriterCollectionPrivate; |
| 22 | /*! |
| 23 | * \class KFileMetaData::WriterCollection |
| 24 | * \inheaderfile KFileMetaData/WriterCollection |
| 25 | * \inmodule KFileMetaData |
| 26 | * |
| 27 | * \brief The WriterCollection is a helper class which internally |
| 28 | * loads all the writer plugins. |
| 29 | * |
| 30 | * It can be used to fetch a certain |
| 31 | * subset of writer plugins based on a given MIME type. |
| 32 | * |
| 33 | * Once the appropriate plugins have been fetched, a WriteData |
| 34 | * should be created and passed to the plugin's write function. |
| 35 | */ |
| 36 | class KFILEMETADATA_EXPORT WriterCollection |
| 37 | { |
| 38 | public: |
| 39 | /*! |
| 40 | * |
| 41 | */ |
| 42 | explicit WriterCollection(); |
| 43 | virtual ~WriterCollection(); |
| 44 | |
| 45 | /*! |
| 46 | * |
| 47 | */ |
| 48 | QList<Writer*> fetchWriters(const QString& mimetype) const; |
| 49 | |
| 50 | private: |
| 51 | const std::unique_ptr<WriterCollectionPrivate> d; |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | #endif // _KFILEMETADTA_WRITERCOLLECTION_H |
| 56 | |