KDNSSD

dummy-publicservice.cpp
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(false);
80}
81
82void PublicService::virtual_hook(int, void *)
83{
84}
85
86}
87
88#include "moc_publicservice.cpp"
PublicService(const QString &name=QString(), const QString &type=QString(), unsigned int port=0, const QString &domain=QString(), const QStringList &subtypes=QStringList())
Creates a service description that can be published.
Type type(const QSqlDatabase &db)
QString name(StandardAction id)
bool isNull() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.