Libkdav2

davitemmodifyjob.h
1/*
2 Copyright (c) 2010 Tobias Koenig <tokoe@kde.org>
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_DAVITEMMODIFYJOB_H
20#define KDAV2_DAVITEMMODIFYJOB_H
21
22#include "kpimkdav2_export.h"
23
24#include "davitem.h"
25#include "davjobbase.h"
26#include "davurl.h"
27
28namespace KDAV2
29{
30
31/**
32 * @short A job that modifies a DAV item on the DAV server.
33 */
34class KPIMKDAV2_EXPORT DavItemModifyJob : public DavJobBase
35{
36 Q_OBJECT
37
38public:
39 /**
40 * Creates a new dav item modify job.
41 *
42 * @param item The item that shall be modified.
43 * @param parent The parent object.
44 */
45 DavItemModifyJob(const DavItem &item, QObject *parent = nullptr);
46
47 /**
48 * Starts the job.
49 */
50 void start() Q_DECL_OVERRIDE;
51
52 /**
53 * Returns the modified item including the updated etag information.
54 */
55 DavItem item() const;
56
57 QUrl itemUrl() const;
58
59 /**
60 * Returns the item that triggered the conflict, if any.
61 */
62 DavItem freshItem() const;
63
64 /**
65 * Returns the http response code we got when fetching the fresh item.
66 */
67 int freshResponseCode() const;
68
69private Q_SLOTS:
70 void davJobFinished(KJob *);
71 void itemRefreshed(KJob *);
72 void conflictingItemFetched(KJob *);
73
74private:
75 DavItem mItem;
76 DavItem mFreshItem;
77 int mFreshResponseCode;
78};
79
80}
81
82#endif
A job that modifies a DAV item on the DAV server.
A helper class to store information about DAV resources.
Definition davitem.h:52
base class for the jobs used by the resource.
Definition davjobbase.h:38
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:38:36 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.