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_DAVITEMFETCHJOB_H |
8 | #define KDAV_DAVITEMFETCHJOB_H |
9 | |
10 | #include "kdav_export.h" |
11 | |
12 | #include "davitem.h" |
13 | #include "davjobbase.h" |
14 | #include "davurl.h" |
15 | |
16 | namespace KDAV |
17 | { |
18 | class DavItemFetchJobPrivate; |
19 | |
20 | /** |
21 | * @class DavItemFetchJob davitemfetchjob.h <KDAV/DavItemFetchJob> |
22 | * |
23 | * @short A job that fetches a DAV item from the DAV server. |
24 | */ |
25 | class KDAV_EXPORT DavItemFetchJob : public DavJobBase |
26 | { |
27 | Q_OBJECT |
28 | |
29 | public: |
30 | /** |
31 | * Creates a new DAV item fetch job. |
32 | * |
33 | * @param item The item that shall be fetched. |
34 | * @param parent The parent object. |
35 | */ |
36 | explicit DavItemFetchJob(const DavItem &item, QObject *parent = nullptr); |
37 | |
38 | /** |
39 | * Starts the job. |
40 | */ |
41 | void start() override; |
42 | |
43 | /** |
44 | * Returns the fetched item including current ETag information. |
45 | */ |
46 | Q_REQUIRED_RESULT DavItem item() const; |
47 | |
48 | private: |
49 | Q_DECLARE_PRIVATE(DavItemFetchJob) |
50 | }; |
51 | } |
52 | |
53 | #endif |
54 | |