KDNSSD 5.109.0
servicetypebrowser.h
1/*
2 This file is part of the KDE project
3
4 SPDX-FileCopyrightText: 2004 Jakub Stachowski <qbast@go2.pl>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KDNSSDSERVICETYPEBROWSER_H
10#define KDNSSDSERVICETYPEBROWSER_H
11
12#include "remoteservice.h"
13#include <QObject>
14#include <QtContainerFwd>
15#include <memory>
16
17namespace KDNSSD
18{
19class ServiceTypeBrowserPrivate;
20
36class KDNSSD_EXPORT ServiceTypeBrowser : public QObject
37{
38 Q_OBJECT
39
40public:
55 explicit ServiceTypeBrowser(const QString &domain = QString(), QObject *parent = nullptr);
56
57 ~ServiceTypeBrowser() override;
58
64 QStringList serviceTypes() const;
65
79
80#if KDNSSD_ENABLE_DEPRECATED_SINCE(4, 0)
86 KDNSSD_DEPRECATED_VERSION(4, 0, "Just call ServiceTypeBrowser::startBrowse() again")
87 bool isRunning() const
88 {
89 return false;
90 }
91#endif
92
93Q_SIGNALS:
105 void serviceTypeRemoved(const QString &type);
106
114 void serviceTypeAdded(const QString &type);
115
138 void finished();
139
140private:
141 friend class ServiceTypeBrowserPrivate;
142 std::unique_ptr<ServiceTypeBrowserPrivate> const d;
143 Q_DECLARE_PRIVATE_D(d, ServiceTypeBrowser)
144};
145
146}
147
148#endif
Browses the service types being published on a domain.
Definition servicetypebrowser.h:37
void finished()
Emitted when the list of published service types has settled.
QStringList serviceTypes() const
All the service types currently being published.
void startBrowse()
Starts browsing.
ServiceTypeBrowser(const QString &domain=QString(), QObject *parent=nullptr)
Create a ServiceTypeBrowser for a domain.
void serviceTypeRemoved(const QString &type)
Emitted when there are no more services of this type.
void serviceTypeAdded(const QString &type)
A new type of service has been found.