KDNSSD

publicservice.h
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2004, 2005 Jakub Stachowski <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KDNSSDPUBLICSERVICE_H
10 #define KDNSSDPUBLICSERVICE_H
11 
12 #include <QObject>
13 #include <dnssd/servicebase.h>
14 #include <QStringList>
15 
16 namespace KDNSSD
17 {
18 class PublicServicePrivate;
19 
47 class KDNSSD_EXPORT PublicService : public QObject, public ServiceBase
48 {
49  Q_OBJECT
50 
51 public:
79  explicit PublicService(const QString &name = QString(),
80  const QString &type = QString(),
81  unsigned int port = 0,
82  const QString &domain = QString(),
83  const QStringList &subtypes = QStringList());
84 
85  ~PublicService() override;
86 
95  void stop();
96 
108  bool publish();
109 
116  bool isPublished() const;
117 
125  void publishAsync();
126 
137  void setTextData(const QMap<QString, QByteArray> &textData);
138 
147  void setServiceName(const QString &serviceName);
148 
159  void setType(const QString &type);
160 
172  void setSubTypes(const QStringList &subtypes);
173 
182  void setPort(unsigned short port);
183 
195  void setDomain(const QString &domain);
196 
202  QStringList subtypes() const;
203 
204 Q_SIGNALS:
212  void published(bool successful);
213 
214 private:
215  friend class PublicServicePrivate;
216 
217 protected:
218  void virtual_hook(int, void *) override;
219 };
220 
221 }
222 
223 #endif
Describes a service.
Definition: servicebase.h:39
Represents a service to be published.
Definition: publicservice.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:41:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.