KDNSSD

mdnsd-responder.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 MDNSD_RESPONDER_H
10#define MDNSD_RESPONDER_H
11
12#include <QObject>
13#include <QSocketNotifier>
14#include <dns_sd.h>
15
16namespace KDNSSD
17{
18/**
19This class should not be used directly.
20
21@author Jakub Stachowski
22@short Internal class wrapping dns_sd.h interface
23 */
24class Responder : public QObject
25{
27
28public:
29 explicit Responder(DNSServiceRef ref = 0, QObject *parent = nullptr);
30
31 ~Responder();
32
33 /**
34 Returns true if it is possible to use mDNS service publishing and discovery.
35 It needs mDNSResponder running.
36 */
37 bool isRunning() const;
38 void setRef(DNSServiceRef ref);
39 void stop();
40public Q_SLOTS:
41 void process();
42
43protected:
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
52QByteArray domainToDNS(const QString &domain);
53QString DNSToDomain(const char *domain);
54
55}
56
57#endif
This class should not be used directly.
bool isRunning() const
Returns true if it is possible to use mDNS service publishing and discovery.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:48 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.