kdsoap-ws-discovery-client  0.4.0
wsdiscoveryclient.h
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // SPDX-FileCopyrightText: 2019 Casper Meijn <casper@meijn.net>
3 // SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
4 
5 #ifndef WSDISCOVERYCLIENT_H
6 #define WSDISCOVERYCLIENT_H
7 
8 #include "wsdiscoveryclient_export.h"
9 #include <QHash>
10 #include <QObject>
11 #include <QUrl>
12 
13 #include <KDSoapClient/KDQName>
14 
15 #include "KDSoapClient/kdsoap_version.h"
16 
17 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) && (KDSOAP_VERSION <= KDSOAP_VERSION_CHECK(2, 1, 1))
18 WSDISCOVERYCLIENT_EXPORT QDebug operator<<(QDebug dbg, const KDQName &qn);
19 #endif
20 
21 class KDSoapHeaders;
22 class KDSoapMessage;
23 class KDSoapUdpClient;
24 class QHostAddress;
26 
36 class WSDISCOVERYCLIENT_EXPORT WSDiscoveryClient : public QObject
37 {
38  Q_OBJECT
39 public:
44  explicit WSDiscoveryClient(QObject *parent = nullptr);
46 
47 Q_SIGNALS:
53  void probeMatchReceived(const WSDiscoveryTargetService &probeMatchService);
54 
59  // TODO: Rename parameter
60  void resolveMatchReceived(const WSDiscoveryTargetService &probeMatchService);
61 
62 public Q_SLOTS:
68  // TODO: Rename to bind()
69  void start(quint16 port = 0);
70 
77  void sendProbe(const QList<KDQName> &typeList, const QList<QUrl> &scopeList);
78 
84  void sendResolve(const QString &endpointReference);
85 
86 private Q_SLOTS:
87  // TODO: Make implementation private
88  void receivedMessage(const KDSoapMessage &replyMessage, const KDSoapHeaders &replyHeaders, const QHostAddress &senderAddress, quint16 senderPort);
89 
90 private:
91  KDSoapUdpClient *m_soapUdpClient;
92 };
93 
94 #endif // WSDISCOVERYCLIENT_H
WSDiscoveryClient is a low-level helper for sending and receiving WS-Discovery messages.
Definition: wsdiscoveryclient.h:37
void sendResolve(const QString &endpointReference)
WSDiscoveryClient(QObject *parent=nullptr)
void probeMatchReceived(const WSDiscoveryTargetService &probeMatchService)
void start(quint16 port=0)
void sendProbe(const QList< KDQName > &typeList, const QList< QUrl > &scopeList)
void resolveMatchReceived(const WSDiscoveryTargetService &probeMatchService)
Definition: wsdiscoverytargetservice.h:16