| 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 | #include "writer.h" |
| 10 | #include "writer_p.h" |
| 11 | #include "writerplugin.h" |
| 12 | |
| 13 | using namespace KFileMetaData; |
| 14 | |
| 15 | Writer::Writer() |
| 16 | : d(new WriterPrivate) |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | Writer::~Writer() = default; |
| 21 | |
| 22 | Writer::Writer(Writer&& other) |
| 23 | { |
| 24 | d = std::move(other.d); |
| 25 | } |
| 26 | |
| 27 | |
| 28 | void Writer::write(const WriteData& data) |
| 29 | { |
| 30 | d->m_plugin->write(data); |
| 31 | } |
| 32 | |
| 33 | QStringList Writer::mimetypes() const |
| 34 | { |
| 35 | return d->m_plugin->writeMimetypes(); |
| 36 | } |
| 37 | |
| 38 | void Writer::setAutoDeletePlugin(WriterPluginOwnership autoDelete) |
| 39 | { |
| 40 | d->m_autoDeletePlugin = autoDelete; |
| 41 | } |
| 42 |
