kdsoap-ws-discovery-client
0.2
src
wsdiscoveryprobejob.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 WSDISCOVERYPROBEJOB_H
18
#define WSDISCOVERYPROBEJOB_H
19
20
#include "wsdiscoveryclient_export.h"
21
#include <KDSoapClient/KDQName>
22
#include <QTimer>
23
#include <QUrl>
24
#include <QObject>
25
26
class
WSDiscoveryClient
;
27
class
WSDiscoveryTargetService
;
28
36
class
WSDISCOVERYCLIENT_EXPORT
WSDiscoveryProbeJob
:
public
QObject
37
{
38
Q_OBJECT
39
public
:
45
explicit
WSDiscoveryProbeJob
(
WSDiscoveryClient
*parent);
46
50
QList<KDQName> typeList()
const
;
54
void
setTypeList(
const
QList<KDQName> &typeList);
58
void
addType(
const
KDQName& type);
59
63
QList<QUrl> scopeList()
const
;
67
void
setScopeList(
const
QList<QUrl> &scopeList);
71
void
addScope(
const
QUrl& scope);
72
76
int
interval()
const
;
80
void
setInterval(
int
interval);
81
82
signals:
87
void
matchReceived(
const
WSDiscoveryTargetService
& matchedService);
88
89
public
slots:
93
void
start();
97
void
stop();
98
99
//TODO: Hide private interface
100
private
slots:
101
void
timeout();
102
void
probeMatchReceived(
const
WSDiscoveryTargetService
& probeMatchService);
103
104
private
:
105
WSDiscoveryClient
* m_client;
106
QList<KDQName> m_typeList;
107
QList<QUrl> m_scopeList;
108
QTimer m_timer;
109
};
110
111
#endif // WSDISCOVERYPROBEJOB_H
WSDiscoveryClient
WSDiscoveryClient is a low-level helper for sending and receiving WS-Discovery messages.
Definition:
wsdiscoveryclient.h:40
WSDiscoveryProbeJob
Periodically probe the network for WS-Discovery devices.
Definition:
wsdiscoveryprobejob.h:36
WSDiscoveryTargetService
Definition:
wsdiscoverytargetservice.h:27
Generated by
1.8.17