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_P_H
8#define KDAV_DAVJOBBASE_P_H
9
10#include <QString>
11
12#include <memory>
13
14namespace KDAV
15{
16class DavJobBase;
17
18class DavJobBasePrivate
19{
20public:
21 virtual ~DavJobBasePrivate() = default;
22
23 /**
24 * Sets the latest response code received.
25 *
26 * Only really useful in case of error, though success codes can
27 * also be set.
28 *
29 * @param code The code to set, should be a valid HTTP response code or zero.
30 */
31 void setLatestResponseCode(int code);
32
33 void setJobErrorText(const QString &errorText);
34 void setJobError(int jobErrorCode);
35 void setErrorTextFromDavError();
36 void setDavError(const Error &error);
37
38 // forwarded protected KJob API, so we can use this from subclasses of this
39 void setError(int errorCode);
40 void setErrorText(const QString &errorText);
41 void emitResult();
42
43 DavJobBase *q_ptr = nullptr;
44 int mLatestResponseCode = 0;
45 int mJobErrorCode = 0;
46 QString mInternalErrorText;
47};
48
49}
50
51#endif
52

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