Changeset View
Changeset View
Standalone View
Standalone View
smb/kdsoap-ws-discovery-client/src/wsdiscoveryprobejob.h
- This file was added.
1 | /* Copyright (C) 2019 Casper Meijn <casper@meijn.net> | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * This program is free software: you can redistribute it and/or modify | ||||
4 | * it under the terms of the GNU General Public License as published by | ||||
5 | * the Free Software Foundation, either version 3 of the License, or | ||||
6 | * (at your option) any later version. | ||||
7 | * | ||||
8 | * This program is distributed in the hope that it will be useful, | ||||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
11 | * GNU General Public License for more details. | ||||
12 | * | ||||
13 | * You should have received a copy of the GNU General Public License | ||||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
15 | */ | ||||
16 | #ifndef WSDISCOVERYPROBEJOB_H | ||||
17 | #define WSDISCOVERYPROBEJOB_H | ||||
18 | | ||||
19 | #include "wsdiscoveryclient_export.h" | ||||
20 | #include <KDSoapClient/KDQName> | ||||
21 | #include <QTimer> | ||||
22 | #include <QUrl> | ||||
23 | #include <QObject> | ||||
24 | | ||||
25 | class WSDiscoveryClient; | ||||
26 | class WSDiscoveryTargetService; | ||||
27 | | ||||
28 | class WSDISCOVERYCLIENT_EXPORT WSDiscoveryProbeJob : public QObject | ||||
29 | { | ||||
30 | Q_OBJECT | ||||
31 | public: | ||||
32 | explicit WSDiscoveryProbeJob(WSDiscoveryClient *parent = nullptr); | ||||
33 | | ||||
34 | QList<KDQName> typeList() const; | ||||
35 | void setTypeList(const QList<KDQName> &typeList); | ||||
36 | void addType(const KDQName& type); | ||||
37 | | ||||
38 | QList<QUrl> scopeList() const; | ||||
39 | void setScopeList(const QList<QUrl> &scopeList); | ||||
40 | void addScope(const QUrl& scope); | ||||
41 | | ||||
42 | int interval() const; | ||||
43 | void setInterval(int interval); | ||||
44 | | ||||
45 | signals: | ||||
46 | void matchReceived(const QSharedPointer<WSDiscoveryTargetService>& matchedService); | ||||
47 | | ||||
48 | public slots: | ||||
49 | void start(); | ||||
50 | void stop(); | ||||
51 | | ||||
52 | private slots: | ||||
53 | void timeout(); | ||||
54 | void probeMatchReceived(const QSharedPointer<WSDiscoveryTargetService>& probeMatchService); | ||||
55 | | ||||
56 | private: | ||||
57 | WSDiscoveryClient * m_client; | ||||
58 | QList<KDQName> m_typeList; | ||||
59 | QList<QUrl> m_scopeList; | ||||
60 | QTimer m_timer; | ||||
61 | }; | ||||
62 | | ||||
63 | #endif // WSDISCOVERYPROBEJOB_H |