kdsoap-ws-discovery-client 0.2
wsdiscoveryclient.h
1/* Copyright (C) 2019 Casper Meijn <casper@meijn.net>
2 * SPDX-License-Identifier: GPL-3.0-or-later
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef WSDISCOVERYCLIENT_H
18#define WSDISCOVERYCLIENT_H
19
20#include "wsdiscoveryclient_export.h"
21#include <QHash>
22#include <QObject>
23
24class KDSoapHeaders;
25class KDSoapMessage;
26class KDQName;
27class KDSoapUdpClient;
28class QHostAddress;
30
40class WSDISCOVERYCLIENT_EXPORT WSDiscoveryClient : public QObject
41{
42 Q_OBJECT
43public:
48 explicit WSDiscoveryClient(QObject *parent = nullptr);
50
51signals:
57 void probeMatchReceived(const WSDiscoveryTargetService& probeMatchService);
58
63 //TODO: Rename parameter
64 void resolveMatchReceived(const WSDiscoveryTargetService& probeMatchService);
65
66public slots:
71 //TODO: Rename to bind()
72 void start();
73
80 void sendProbe(const QList<KDQName>& typeList, const QList<QUrl> &scopeList);
81
87 void sendResolve(const QString& endpointReference);
88
89private slots:
90 //TODO: Make implementation private
91 void receivedMessage(const KDSoapMessage& replyMessage, const KDSoapHeaders& replyHeaders, const QHostAddress& senderAddress, quint16 senderPort);
92
93private:
94 KDSoapUdpClient * m_soapUdpClient;
95};
96
97#endif // WSDISCOVERYCLIENT_H
WSDiscoveryClient is a low-level helper for sending and receiving WS-Discovery messages.
Definition: wsdiscoveryclient.h:41
void sendResolve(const QString &endpointReference)
WSDiscoveryClient(QObject *parent=nullptr)
void probeMatchReceived(const WSDiscoveryTargetService &probeMatchService)
void sendProbe(const QList< KDQName > &typeList, const QList< QUrl > &scopeList)
void resolveMatchReceived(const WSDiscoveryTargetService &probeMatchService)
Definition: wsdiscoverytargetservice.h:28