Libkdav2

davcollectionmodifyjob.h
1 /*
2  Copyright (c) 2010 GrĂ©gory Oestreicher <[email protected]>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef KDAV2_DAVCOLLECTIONMODIFYJOB_H
20 #define KDAV2_DAVCOLLECTIONMODIFYJOB_H
21 
22 #include "kpimkdav2_export.h"
23 
24 #include "davjobbase.h"
25 #include "davurl.h"
26 
27 #include <QtCore/QList>
28 #include <QtXml/QDomDocument>
29 
30 #include <KCoreAddons/KJob>
31 
32 namespace KDAV2
33 {
34 
41 class KPIMKDAV2_EXPORT DavCollectionModifyJob : public DavJobBase
42 {
43  Q_OBJECT
44 
45 public:
52  explicit DavCollectionModifyJob(const DavUrl &url, QObject *parent = nullptr);
53 
61  void setProperty(const QString &property, const QString &value, const QString &ns = QString());
62 
69  void removeProperty(const QString &property, const QString &ns);
70 
74  void start() Q_DECL_OVERRIDE;
75 
76 private Q_SLOTS:
77  void davJobFinished(KJob *job);
78 
79 private:
80  DavUrl mUrl;
81  QDomDocument mQuery;
82 
83  QVector<QDomElement> mSetProperties;
84  QVector<QDomElement> mRemoveProperties;
85 };
86 
87 }
88 
89 #endif
base class for the jobs used by the resource.
Definition: davjobbase.h:37
A helper class to combine url and protocol of a DAV url.
Definition: davurl.h:35
A job that modifies a DAV collection.
QCA_EXPORT void setProperty(const QString &name, const QVariant &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 1 2020 23:16:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.