KD SOAP  1.10.0
KDSoapJob.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 2010-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8 **
9 ** Licensees holding valid commercial KD Soap licenses may use this file in
10 ** accordance with the KD Soap Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 #ifndef KDSOAPJOB_H
17 #define KDSOAPJOB_H
18 
19 #include "KDSoapGlobal.h"
20 
21 #include <QtCore/QObject>
22 
23 class KDSoapMessage;
24 class KDSoapHeaders;
25 
58 class KDSOAP_EXPORT KDSoapJob : public QObject
59 {
60  Q_OBJECT
61 public:
67  explicit KDSoapJob(QObject *parent = nullptr);
68 
72  ~KDSoapJob();
73 
78  KDSoapHeaders requestHeaders() const;
79 
86  void setRequestHeaders(const KDSoapHeaders &headers);
87 
91  bool isFault() const;
92 
96  QString faultAsString() const;
97 
102  KDSoapMessage reply() const;
103 
110  KDSoapHeaders replyHeaders() const;
111 
115  void start();
116 
121  void setAutoDelete(bool enable);
122 
123 Q_SIGNALS:
132  void finished(KDSoapJob *job);
133 
134 protected:
139  Q_INVOKABLE virtual void doStart() = 0;
140 
145  void emitFinished(const KDSoapMessage &reply, const KDSoapHeaders &replyHeaders);
146 
147 private:
148  class Private;
149  Private *const d;
150 };
151 
152 #endif // KDSOAPJOB_H
Definition: KDSoapMessage.h:188
Definition: KDSoapMessage.h:34
KDSoapJob provides a job-based interface to handle asynchronous KD Soap calls.
Definition: KDSoapJob.h:58

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/