KD SOAP  1.9.1
KDSoapUdpClient.h
1 /****************************************************************************
2 ** Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDSOAPUDPCLIENT_H
24 #define KDSOAPUDPCLIENT_H
25 
26 #include "KDSoapGlobal.h"
27 #include "KDSoapClientInterface.h"
28 
29 #include <QAbstractSocket>
30 #include <QObject>
31 
32 class KDSoapHeaders;
33 class KDSoapMessage;
34 class KDSoapUdpClientPrivate;
35 QT_BEGIN_NAMESPACE
36 class QHostAddress;
37 QT_END_NAMESPACE
38 
81 class KDSOAP_EXPORT KDSoapUdpClient : public QObject
82 {
83  Q_OBJECT
84 
85 public:
86  explicit KDSoapUdpClient(QObject *parent=nullptr);
87 
88  ~KDSoapUdpClient();
89 
98 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
99  bool bind(quint16 port = 0, QAbstractSocket::BindMode mode = QAbstractSocket::DefaultForPlatform);
100 #else
101  bool bind(quint16 port = 0);
102 #endif
103 
108  void setSoapVersion(KDSoap::SoapVersion version);
109 
110 public Q_SLOTS:
122  bool sendMessage(const KDSoapMessage &message, const KDSoapHeaders &headers, const QHostAddress &address, quint16 port);
123 
124 Q_SIGNALS:
140  void receivedMessage(const KDSoapMessage &message, const KDSoapHeaders &headers, const QHostAddress &address, quint16 port);
141 
142 private:
143  KDSoapUdpClientPrivate *const d_ptr;
144  Q_DECLARE_PRIVATE(KDSoapUdpClient)
145 };
146 
147 #endif // KDSOAPUDPCLIENT_H
Definition: KDSoapMessage.h:195
Definition: KDSoapMessage.h:41
KDSoapUdpClient provides an interface for implementing a SOAP-over-UDP client.
Definition: KDSoapUdpClient.h:81

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/