KDNSSD

servicebrowser.h
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2004 Jakub Stachowski <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KDNSSDSERVICEBROWSER_H
10 #define KDNSSDSERVICEBROWSER_H
11 
12 #include <QObject>
13 #include <QHostAddress>
14 
15 #include <dnssd/remoteservice.h>
16 
17 namespace KDNSSD
18 {
19 class DomainBrowser;
20 class ServiceBrowserPrivate;
21 
53 class KDNSSD_EXPORT ServiceBrowser : public QObject
54 {
55  Q_OBJECT
56 
57 public:
61  enum State {
67  Unsupported
68  };
69 
102  explicit ServiceBrowser(const QString &type,
103  bool autoResolve = false,
104  const QString &domain = QString(),
105  const QString &subtype = QString());
106 
107  ~ServiceBrowser();
108 
116  QList<RemoteService::Ptr> services() const;
117 
130  virtual void startBrowse();
131 
173  static State isAvailable();
174 
182  bool isAutoResolving() const;
183 
197  static QHostAddress resolveHostName(const QString &hostname);
198 
209  static QString getLocalHostName();
210 
211 Q_SIGNALS:
222  void serviceAdded(KDNSSD::RemoteService::Ptr service);
223 
237  void serviceRemoved(KDNSSD::RemoteService::Ptr service);
238 
269  void finished();
270 
271 protected:
272  virtual void virtual_hook(int, void *);
273 
274 private:
275  friend class ServiceBrowserPrivate;
276  ServiceBrowserPrivate *const d;
277 
278 };
279 
280 }
281 
282 #endif
not available because mDnsd or Avahi daemon is not running
State
Availability of DNS-SD services.
Browses for network services advertised over DNS-SD.
the service is available
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Oct 22 2020 22:44:40 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.