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 KDAV::DavCollectionModifyJob |
21 | * \inheaderfile KDAV/DavCollectionModifyJob |
22 | * \inmodule KDAV |
23 | * |
24 | * \brief A job that modifies a DAV collection. |
25 | * |
26 | * This job is used to modify a property of a DAV collection |
27 | * on the DAV server. |
28 | */ |
29 | class KDAV_EXPORT DavCollectionModifyJob : public DavJobBase |
30 | { |
31 | Q_OBJECT |
32 | |
33 | public: |
34 | /*! |
35 | * Creates a new DAV collection modify job. |
36 | * |
37 | * \a url The DAV URL that identifies the collection. |
38 | * |
39 | * \a parent The parent object. |
40 | */ |
41 | explicit DavCollectionModifyJob(const DavUrl &url, QObject *parent = nullptr); |
42 | |
43 | /*! |
44 | * Sets the property that shall be modified by the job. |
45 | * |
46 | * \a property The name of the property. |
47 | * |
48 | * \a value The value of the property. |
49 | * |
50 | * \a ns The XML namespace that shall be used for the property name. |
51 | */ |
52 | void setProperty(const QString &property, const QString &value, const QString &ns = QString()); |
53 | |
54 | /*! |
55 | * Sets the property that shall be removed by the job. |
56 | * |
57 | * \a property The name of the property. |
58 | * |
59 | * \a ns The XML namespace that shall be used for the property name. |
60 | */ |
61 | void removeProperty(const QString &property, const QString &ns); |
62 | |
63 | /*! |
64 | * Starts the job. |
65 | */ |
66 | void start() override; |
67 | |
68 | private: |
69 | Q_DECLARE_PRIVATE(DavCollectionModifyJob) |
70 | }; |
71 | } |
72 | |
73 | #endif |
74 | |