1/*
2 This file is part of the KDE project
3
4 SPDX-FileCopyrightText: 2004, 2005 Jakub Stachowski <qbast@go2.pl>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#include "publicservice.h"
10#include "servicebase_p.h"
11#include <QStringList>
12
13namespace KDNSSD
14{
15PublicService::PublicService(const QString &name, const QString &type, unsigned int port, const QString &domain, const QStringList &)
16 : QObject()
17 , ServiceBase(name, type, QString(), domain, port)
18{
19 if (domain.isNull()) {
20 d->m_domain = QLatin1String("local.");
21 }
22}
23
24PublicService::~PublicService()
25{
26}
27
28void PublicService::setServiceName(const QString &serviceName)
29{
30 d->m_serviceName = serviceName;
31}
32
33void PublicService::setDomain(const QString &domain)
34{
35 d->m_domain = domain;
36}
37
38void PublicService::setTextData(const QMap<QString, QByteArray> &textData)
39{
40 d->m_textData = textData;
41}
42
43void PublicService::setType(const QString &type)
44{
45 d->m_type = type;
46}
47
48void PublicService::setSubTypes(const QStringList &)
49{
50 // dummy and empty
51}
52
53void PublicService::setPort(unsigned short port)
54{
55 d->m_port = port;
56}
57
58QStringList PublicService::subtypes() const
59{
60 return QStringList();
61}
62
63bool PublicService::isPublished() const
64{
65 return false;
66}
67
68bool PublicService::publish()
69{
70 return false;
71}
72
73void PublicService::stop()
74{
75}
76
77void PublicService::publishAsync()
78{
79 Q_EMIT published(successful: false);
80}
81
82void PublicService::virtual_hook(int, void *)
83{
84}
85
86}
87
88#include "moc_publicservice.cpp"
89

source code of kdnssd/src/dummy-publicservice.cpp