File indexing completed on 2024-05-05 07:54:59
0001 /* 0002 SPDX-FileCopyrightText: 2010 Grégory Oestreicher <greg@kamago.net> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDAV_DAVCOLLECTIONMODIFYJOB_H 0008 #define KDAV_DAVCOLLECTIONMODIFYJOB_H 0009 0010 #include "kdav_export.h" 0011 0012 #include "davjobbase.h" 0013 #include "davurl.h" 0014 0015 namespace KDAV 0016 { 0017 class DavCollectionModifyJobPrivate; 0018 0019 /** 0020 * @class DavCollectionModifyJob davcollectionmodifyjob.h <KDAV/DavCollectionModifyJob> 0021 * 0022 * @short A job that modifies a DAV collection. 0023 * 0024 * This job is used to modify a property of a DAV collection 0025 * on the DAV server. 0026 */ 0027 class KDAV_EXPORT DavCollectionModifyJob : public DavJobBase 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 /** 0033 * Creates a new DAV collection modify job. 0034 * 0035 * @param url The DAV URL that identifies the collection. 0036 * @param parent The parent object. 0037 */ 0038 explicit DavCollectionModifyJob(const DavUrl &url, QObject *parent = nullptr); 0039 0040 /** 0041 * Sets the property that shall be modified by the job. 0042 * 0043 * @param property The name of the property. 0044 * @param value The value of the property. 0045 * @param ns The XML namespace that shall be used for the property name. 0046 */ 0047 void setProperty(const QString &property, const QString &value, const QString &ns = QString()); 0048 0049 /** 0050 * Sets the property that shall be removed by the job. 0051 * 0052 * @param property The name of the property. 0053 * @param ns The XML namespace that shall be used for the property name. 0054 */ 0055 void removeProperty(const QString &property, const QString &ns); 0056 0057 /** 0058 * Starts the job. 0059 */ 0060 void start() override; 0061 0062 private: 0063 Q_DECLARE_PRIVATE(DavCollectionModifyJob) 0064 }; 0065 } 0066 0067 #endif