KDAV 5.109.0
davjobbase.h
1/*
2 SPDX-FileCopyrightText: 2014 Gregory Oestreicher <greg@kamago.net>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KDAV_DAVJOBBASE_H
8#define KDAV_DAVJOBBASE_H
9
10#include "kdav_export.h"
11
12#include <KJob>
13
14#include <memory>
15
16namespace KDAV
17{
18class DavJobBasePrivate;
19class Error;
20
26class KDAV_EXPORT DavJobBase : public KJob
27{
28 Q_OBJECT
29
30public:
31 explicit DavJobBase(QObject *parent = nullptr);
32 ~DavJobBase() override;
33
41 Q_REQUIRED_RESULT int latestResponseCode() const;
42
61 Q_REQUIRED_RESULT bool canRetryLater() const;
62
66 Q_REQUIRED_RESULT bool hasConflict() const;
67
71 Q_REQUIRED_RESULT Error davError() const;
72
73protected:
74 Q_DECL_HIDDEN explicit DavJobBase(DavJobBasePrivate *dd, QObject *parent = nullptr);
75 std::unique_ptr<DavJobBasePrivate> d_ptr;
76
77private:
78 Q_DECLARE_PRIVATE(DavJobBase)
79};
80}
81
82#endif
base class for the jobs used by the resource.
Definition davjobbase.h:27
Error davError() const
Returns a instance of the KDAV:Error to be able to translate the error.
int latestResponseCode() const
Get the latest response code.
bool canRetryLater() const
Check if the job can be retried later.
bool hasConflict() const
Check if the job failed because of a conflict.
DAV operation error.
Definition daverror.h:47
The KDAV namespace.
Definition davjobbase.h:17