File indexing completed on 2025-01-12 12:26:25
0001 /* This file is part of the KDE libraries 0002 0003 Copyright (c) 2007 Jos van den Oever <jos@vandenoever.info> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License (LGPL) as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 Boston, MA 02110-1301, USA. 0019 */ 0020 #ifndef KFILEWRITEPLUGIN_H 0021 #define KFILEWRITEPLUGIN_H 0022 0023 #include <kdelibs4support_export.h> 0024 #include <QVariant> 0025 0026 class QUrl; 0027 0028 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KFileWritePlugin : public QObject 0029 { 0030 Q_OBJECT 0031 friend class KFileWriterProvider; 0032 public: 0033 /** 0034 * @brief Constructor that initializes the object as a QObject. 0035 **/ 0036 KFileWritePlugin(QObject *parent, const QStringList &args); 0037 /** 0038 * @brief Destructor 0039 **/ 0040 ~KFileWritePlugin() override; 0041 /** 0042 * @brief determine if this plugin can write a value into a particular 0043 * resource. 0044 **/ 0045 virtual bool canWrite(const QUrl &file, const QString &key) = 0; 0046 /** 0047 * @brief Write a set of values into a resource pointed to by @p file. 0048 **/ 0049 virtual bool write(const QUrl &file, const QVariantMap &data) = 0; 0050 0051 private: 0052 class Private; 0053 Private *const d; 0054 }; 0055 0056 #endif