1/*
2 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KDAV_DAVITEMCREATEJOB_H
8#define KDAV_DAVITEMCREATEJOB_H
9
10#include "kdav_export.h"
11
12#include "davitem.h"
13#include "davjobbase.h"
14#include "davurl.h"
15
16namespace KDAV
17{
18class DavItemCreateJobPrivate;
19
20/**
21 * @class DavItemCreateJob davitemcreatejob.h <KDAV/DavItemCreateJob>
22 *
23 * @short A job to create a DAV item on the DAV server.
24 */
25class KDAV_EXPORT DavItemCreateJob : public DavJobBase
26{
27 Q_OBJECT
28
29public:
30 /**
31 * Creates a new DAV item create job.
32 *
33 * @param item The item that shall be created.
34 * @param parent The parent object.
35 */
36 explicit DavItemCreateJob(const DavItem &item, QObject *parent = nullptr);
37
38 /**
39 * Starts the job.
40 */
41 void start() override;
42
43 /**
44 * Returns the created DAV item including the correct identifier URL
45 * and current ETag information.
46 */
47 Q_REQUIRED_RESULT DavItem item() const;
48
49 Q_REQUIRED_RESULT QUrl itemUrl() const;
50
51private:
52 Q_DECLARE_PRIVATE(DavItemCreateJob)
53};
54}
55
56#endif
57

source code of kdav/src/common/davitemcreatejob.h