KDAV 5.109.0
|
base class for the jobs used by the resource. More...
#include <KDAV/DavJobBase>
Public Member Functions | |
DavJobBase (QObject *parent=nullptr) | |
bool | canRetryLater () const |
Check if the job can be retried later. | |
Error | davError () const |
Returns a instance of the KDAV:Error to be able to translate the error. | |
bool | hasConflict () const |
Check if the job failed because of a conflict. | |
int | latestResponseCode () const |
Get the latest response code. | |
Protected Member Functions | |
DavJobBase (DavJobBasePrivate *dd, QObject *parent=nullptr) | |
Protected Attributes | |
std::unique_ptr< DavJobBasePrivate > | d_ptr |
base class for the jobs used by the resource.
bool KDAV::DavJobBase::canRetryLater | ( | ) | const |
Check if the job can be retried later.
This will return true for transient errors, i.e. if the response code is either zero and error() is set or if the HTTP response code hints at a temporary error.
The HTTP response codes considered retryable are:
Error KDAV::DavJobBase::davError | ( | ) | const |
bool KDAV::DavJobBase::hasConflict | ( | ) | const |
Check if the job failed because of a conflict.
int KDAV::DavJobBase::latestResponseCode | ( | ) | const |
Get the latest response code.
If no response code has been set then 0 will be returned, but will be meaningless unless error() is non-zero. In that case this means that the latest error was not at the HTTP level.