KD SOAP API Documentation: KDSoapJob.cpp Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
KDSoapJob.cpp
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Soap project.
4**
5** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#include "KDSoapJob.h"
12#include "KDSoapMessage.h"
13
14class KDSoapJob::Private
15{
16public:
17 KDSoapHeaders requestHeaders;
18 KDSoapMessage reply;
19 KDSoapHeaders replyHeaders;
20 bool isAutoDelete;
21};
22
23KDSoapJob::KDSoapJob(QObject *parent)
24 : QObject(parent)
25 , d(new Private)
26{
27 d->isAutoDelete = true;
28}
29
30KDSoapJob::~KDSoapJob()
31{
32 delete d;
33}
34
35 KDSoapHeaders KDSoapJob::requestHeaders() const
36{
37 return d->requestHeaders;
38}
39
40 void KDSoapJob::setRequestHeaders(const KDSoapHeaders &headers)
41{
42 d->requestHeaders = headers;
43}
44
45 void KDSoapJob::start()
46{
47 QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection);
48}
49
50 void KDSoapJob::setAutoDelete(bool enable)
51{
52 d->isAutoDelete = enable;
53}
54
55 void KDSoapJob::emitFinished(const KDSoapMessage &reply, const KDSoapHeaders &replyHeaders)
56{
57 d->reply = reply;
58 d->replyHeaders = replyHeaders;
59 emit finished(this);
60 if (d->isAutoDelete) {
61 deleteLater();
62 }
63}
64
65 KDSoapMessage KDSoapJob::reply() const
66{
67 return d->reply;
68}
69
70 KDSoapHeaders KDSoapJob::replyHeaders() const
71{
72 return d->replyHeaders;
73}
74
75 bool KDSoapJob::isFault() const
76{
77 return d->reply.isFault();
78}
79
80 QString KDSoapJob::faultAsString() const
81{
82 if (d->reply.isFault()) {
83 return d->reply.faultAsString();
84 } else {
85 return QString();
86 }
87}
88
89#include "moc_KDSoapJob.cpp"
KDSoapJob.h
KDSoapMessage.h
KDSoapHeaders
Definition KDSoapMessage.h:185
KDSoapJob::start
void start()
Definition KDSoapJob.cpp:45
KDSoapJob::replyHeaders
KDSoapHeaders replyHeaders() const
Definition KDSoapJob.cpp:70
KDSoapJob::reply
KDSoapMessage reply() const
Definition KDSoapJob.cpp:65
KDSoapJob::isFault
bool isFault() const
Definition KDSoapJob.cpp:75
KDSoapJob::requestHeaders
KDSoapHeaders requestHeaders() const
Definition KDSoapJob.cpp:35
KDSoapJob::KDSoapJob
KDSoapJob(QObject *parent=nullptr)
Definition KDSoapJob.cpp:23
KDSoapJob::emitFinished
void emitFinished(const KDSoapMessage &reply, const KDSoapHeaders &replyHeaders)
Definition KDSoapJob.cpp:55
KDSoapJob::setRequestHeaders
void setRequestHeaders(const KDSoapHeaders &headers)
Definition KDSoapJob.cpp:40
KDSoapJob::setAutoDelete
void setAutoDelete(bool enable)
Definition KDSoapJob.cpp:50
KDSoapJob::~KDSoapJob
~KDSoapJob()
Definition KDSoapJob.cpp:30
KDSoapJob::finished
void finished(KDSoapJob *job)
KDSoapJob::faultAsString
QString faultAsString() const
Definition KDSoapJob.cpp:80
KDSoapMessage
Definition KDSoapMessage.h:29
QMetaObject::invokeMethod
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
QObject
QObject::deleteLater
void deleteLater()
QObject::qobject_cast
T qobject_cast(QObject *object)
QString
Qt::QueuedConnection
QueuedConnection

© 2010-2024 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/
Generated on Sun Jan 7 2024 11:47:36 for KD SOAP API Documentation by doxygen 1.9.8