kdsoap-ws-discovery-client: src/wsdiscoveryclient.h Source File

kdsoap-ws-discovery-client 0.4.0

Loading...
Searching...
No Matches
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))
18WSDISCOVERYCLIENT_EXPORT QDebug operator<<(QDebug dbg, const KDQName &qn);
19#endif
20
21class KDSoapHeaders;
22class KDSoapMessage;
23class KDSoapUdpClient;
24class QHostAddress;
25class WSDiscoveryTargetService;
26
36 class WSDISCOVERYCLIENT_EXPORT WSDiscoveryClient : public QObject
37{
38 Q_OBJECT
39public:
44 explicit WSDiscoveryClient(QObject *parent = nullptr);
45 ~WSDiscoveryClient();
46
47Q_SIGNALS:
53 void probeMatchReceived(const WSDiscoveryTargetService &probeMatchService);
54
59 // TODO: Rename parameter
60 void resolveMatchReceived(const WSDiscoveryTargetService &probeMatchService);
61
62public 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
86private Q_SLOTS:
87 // TODO: Make implementation private
88 void receivedMessage(const KDSoapMessage &replyMessage, const KDSoapHeaders &replyHeaders, const QHostAddress &senderAddress, quint16 senderPort);
89
90private:
91 KDSoapUdpClient *m_soapUdpClient;
92};
93
94#endif // WSDISCOVERYCLIENT_H
WSDiscoveryClient::sendResolve
void sendResolve(const QString &endpointReference)
WSDiscoveryClient::WSDiscoveryClient
WSDiscoveryClient(QObject *parent=nullptr)
WSDiscoveryClient::probeMatchReceived
void probeMatchReceived(const WSDiscoveryTargetService &probeMatchService)
WSDiscoveryClient::start
void start(quint16 port=0)
WSDiscoveryClient::sendProbe
void sendProbe(const QList< KDQName > &typeList, const QList< QUrl > &scopeList)
WSDiscoveryClient::resolveMatchReceived
void resolveMatchReceived(const WSDiscoveryTargetService &probeMatchService)
WSDiscoveryTargetService
Definition wsdiscoverytargetservice.h:16