| 1 | /* |
| 2 | This file is part of the KFileMetaData project |
| 3 | SPDX-FileCopyrightText: 2016 Varun Joshi <varunj.1011@gmail.com> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 6 | */ |
| 7 | |
| 8 | #ifndef EXTERNALWRITER_H |
| 9 | #define EXTERNALWRITER_H |
| 10 | |
| 11 | #include "writerplugin.h" |
| 12 | |
| 13 | namespace KFileMetaData { |
| 14 | class ExternalWriterPrivate; |
| 15 | class ExternalWriter : public WriterPlugin |
| 16 | { |
| 17 | Q_OBJECT |
| 18 | |
| 19 | public: |
| 20 | explicit ExternalWriter(QObject* parent = nullptr); |
| 21 | explicit ExternalWriter(const QString& pluginPath); |
| 22 | ~ExternalWriter() override; |
| 23 | |
| 24 | void write(const WriteData& data) override; |
| 25 | QStringList writeMimetypes() const override; |
| 26 | |
| 27 | private: |
| 28 | bool runtimeInstalled() const; |
| 29 | bool dependenciesSatisfied() const; |
| 30 | |
| 31 | std::unique_ptr<ExternalWriterPrivate> d_ptr; |
| 32 | Q_DECLARE_PRIVATE(ExternalWriter) |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | #endif // EXTERNALWRITER_H |
| 37 | |