KDAV::DavJobBase Class
class KDAV::DavJobBasebase class for the jobs used by the resource. More...
Header: | #include <KDAV/DavJobBase> |
CMake: | find_package(KF6 REQUIRED COMPONENTS DAV) target_link_libraries(mytarget PRIVATE KF6::DAV) |
Inherits: | KJob |
Inherited By: | KDAV::DavCollectionDeleteJob, KDAV::DavCollectionModifyJob, KDAV::DavCollectionsFetchJob, KDAV::DavItemCreateJob, KDAV::DavItemDeleteJob, KDAV::DavItemFetchJob, KDAV::DavItemModifyJob, KDAV::DavItemsFetchJob, KDAV::DavItemsListJob, KDAV::DavPrincipalHomeSetsFetchJob, and KDAV::DavPrincipalSearchJob |
Public Functions
bool | canRetryLater() const |
KDAV::Error | davError() const |
bool | hasConflict() const |
int | latestResponseCode() const |
Detailed Description
Member Function Documentation
bool 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:
- 401
- 402
- 407
- 408
- 423
- 429
- 501 to 504, inclusive
- 507
- 511
KDAV::Error DavJobBase::davError() const
Returns a instance of the KDAV:Error to be able to translate the error
bool DavJobBase::hasConflict() const
Check if the job failed because of a conflict
int 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.