KD SOAP API Documentation 2.2
Loading...
Searching...
No Matches
KDSoapClientThread_p.h
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#ifndef KDSOAPCLIENTTHREAD_P_H
12#define KDSOAPCLIENTTHREAD_P_H
13
15#include "KDSoapMessage.h"
16#include <QtCore/QMutex>
17#include <QtCore/QQueue>
18#include <QtCore/QSemaphore>
19#include <QtCore/QThread>
20#include <QtCore/QWaitCondition>
21#include <QtNetwork/QNetworkAccessManager>
22
25QT_BEGIN_NAMESPACE
26class QEventLoop;
28
30{
31public:
32 KDSoapThreadTaskData(KDSoapClientInterface *iface, const QString &method, const KDSoapMessage &message, const QString &action,
33 const KDSoapHeaders &headers)
34 : m_iface(iface)
35 , m_method(method)
36 , m_message(message)
37 , m_action(action)
38 , m_headers(headers)
39 {
40 }
41
43 {
45 }
47 {
48 return m_response;
49 }
51 {
52 return m_responseHeaders;
53 }
54
55 KDSoapClientInterface *m_iface; // used by KDSoapThreadTask::process()
64};
65
66// clazy:excludeall=ctor-missing-parent-argument
68{
70public:
71 explicit KDSoapThreadTask(KDSoapThreadTaskData *data) // clazy:exclude=ctor-missing-parent-argument
72 : m_data(data)
73 {
74 }
75
76 void process(QNetworkAccessManager &accessManager);
78
80 void taskDone();
81
82private Q_SLOTS:
83 void slotFinished(KDSoapPendingCallWatcher *watcher);
84
85private:
87};
88
90{
92public:
93 explicit KDSoapClientThread(QObject *parent = nullptr);
94
96
97 void stop();
98
99protected:
100 virtual void run() override;
101
102private:
103 QMutex m_mutex;
105 QWaitCondition m_queueNotEmpty;
106 bool m_stopThread;
107};
108
109#endif // KDSOAPCLIENTTHREAD_P_H
virtual void run() override
void enqueue(KDSoapThreadTaskData *taskData)
KDSoapAuthentication m_authentication
KDSoapThreadTaskData(KDSoapClientInterface *iface, const QString &method, const KDSoapMessage &message, const QString &action, const KDSoapHeaders &headers)
KDSoapMessage response() const
KDSoapClientInterface * m_iface
KDSoapHeaders responseHeaders() const
KDSoapThreadTask(KDSoapThreadTaskData *data)
void slotAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
void process(QNetworkAccessManager &accessManager)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
T qobject_cast(QObject *object)
void acquire(int n)

© 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 Sat Apr 20 2024 00:04:25 for KD SOAP API Documentation by doxygen 1.9.8