1 | /* |
2 | SPDX-FileCopyrightText: 2010 Grégory Oestreicher <greg@kamago.net> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KDAV_DAVCOLLECTIONMODIFYJOB_H |
8 | #define KDAV_DAVCOLLECTIONMODIFYJOB_H |
9 | |
10 | #include "kdav_export.h" |
11 | |
12 | #include "davjobbase.h" |
13 | #include "davurl.h" |
14 | |
15 | namespace KDAV |
16 | { |
17 | class DavCollectionModifyJobPrivate; |
18 | |
19 | /** |
20 | * @class DavCollectionModifyJob davcollectionmodifyjob.h <KDAV/DavCollectionModifyJob> |
21 | * |
22 | * @short A job that modifies a DAV collection. |
23 | * |
24 | * This job is used to modify a property of a DAV collection |
25 | * on the DAV server. |
26 | */ |
27 | class KDAV_EXPORT DavCollectionModifyJob : public DavJobBase |
28 | { |
29 | Q_OBJECT |
30 | |
31 | public: |
32 | /** |
33 | * Creates a new DAV collection modify job. |
34 | * |
35 | * @param url The DAV URL that identifies the collection. |
36 | * @param parent The parent object. |
37 | */ |
38 | explicit DavCollectionModifyJob(const DavUrl &url, QObject *parent = nullptr); |
39 | |
40 | /** |
41 | * Sets the property that shall be modified by the job. |
42 | * |
43 | * @param property The name of the property. |
44 | * @param value The value of the property. |
45 | * @param ns The XML namespace that shall be used for the property name. |
46 | */ |
47 | void setProperty(const QString &property, const QString &value, const QString &ns = QString()); |
48 | |
49 | /** |
50 | * Sets the property that shall be removed by the job. |
51 | * |
52 | * @param property The name of the property. |
53 | * @param ns The XML namespace that shall be used for the property name. |
54 | */ |
55 | void removeProperty(const QString &property, const QString &ns); |
56 | |
57 | /** |
58 | * Starts the job. |
59 | */ |
60 | void start() override; |
61 | |
62 | private: |
63 | Q_DECLARE_PRIVATE(DavCollectionModifyJob) |
64 | }; |
65 | } |
66 | |
67 | #endif |
68 | |