KDNSSD

mdnsd-responder.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 MDNSD_RESPONDER_H
10 #define MDNSD_RESPONDER_H
11 
12 #include <QObject>
13 #include <QSocketNotifier>
14 #include <dns_sd.h>
15 
16 namespace KDNSSD
17 {
18 
25 class Responder : public QObject
26 {
27  Q_OBJECT
28 
29 public:
30  explicit Responder(DNSServiceRef ref = 0, QObject *parent = nullptr);
31 
32  ~Responder();
33 
38  bool isRunning() const;
39  void setRef(DNSServiceRef ref);
40  void stop();
41 public Q_SLOTS:
42  void process();
43 protected:
44  DNSServiceRef m_ref;
45  bool m_running;
46  QSocketNotifier *m_socket;
47 };
48 
49 /* Utils functions */
50 
51 // Encodes domain name using utf8() or IDN
52 QByteArray domainToDNS(const QString &domain);
53 QString DNSToDomain(const char *domain);
54 
55 }
56 
57 #endif
This class should not be used directly.
Q_OBJECTQ_OBJECT
bool isRunning() const
Returns true if it is possible to use mDNS service publishing and discovery.
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Sep 25 2020 22:40:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.