KD SOAP  1.10.0
KDSoapUdpClient.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 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 
17 #ifndef KDSOAPUDPCLIENT_H
18 #define KDSOAPUDPCLIENT_H
19 
20 #include "KDSoapGlobal.h"
21 #include "KDSoapClientInterface.h"
22 
23 #include <QAbstractSocket>
24 #include <QObject>
25 
26 class KDSoapHeaders;
27 class KDSoapMessage;
28 class KDSoapUdpClientPrivate;
29 QT_BEGIN_NAMESPACE
30 class QHostAddress;
31 QT_END_NAMESPACE
32 
75 class KDSOAP_EXPORT KDSoapUdpClient : public QObject
76 {
77  Q_OBJECT
78 
79 public:
80  explicit KDSoapUdpClient(QObject *parent=nullptr);
81 
82  ~KDSoapUdpClient();
83 
92 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
93  bool bind(quint16 port = 0, QAbstractSocket::BindMode mode = QAbstractSocket::DefaultForPlatform);
94 #else
95  bool bind(quint16 port = 0);
96 #endif
97 
102  void setSoapVersion(KDSoap::SoapVersion version);
103 
104 public Q_SLOTS:
116  bool sendMessage(const KDSoapMessage &message, const KDSoapHeaders &headers, const QHostAddress &address, quint16 port);
117 
118 Q_SIGNALS:
134  void receivedMessage(const KDSoapMessage &message, const KDSoapHeaders &headers, const QHostAddress &address, quint16 port);
135 
136 private:
137  KDSoapUdpClientPrivate *const d_ptr;
138  Q_DECLARE_PRIVATE(KDSoapUdpClient)
139 };
140 
141 #endif // KDSOAPUDPCLIENT_H
Definition: KDSoapMessage.h:188
Definition: KDSoapMessage.h:34
KDSoapUdpClient provides an interface for implementing a SOAP-over-UDP client.
Definition: KDSoapUdpClient.h:75

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/