File indexing completed on 2024-04-28 03:54:03
0001 /* 0002 This file is part of the KDE project 0003 0004 SPDX-FileCopyrightText: 2004, 2005 Jakub Stachowski <qbast@go2.pl> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include "publicservice.h" 0010 #include "servicebase_p.h" 0011 #include <QStringList> 0012 0013 namespace KDNSSD 0014 { 0015 PublicService::PublicService(const QString &name, const QString &type, unsigned int port, const QString &domain, const QStringList &) 0016 : QObject() 0017 , ServiceBase(name, type, QString(), domain, port) 0018 { 0019 if (domain.isNull()) { 0020 d->m_domain = QLatin1String("local."); 0021 } 0022 } 0023 0024 PublicService::~PublicService() 0025 { 0026 } 0027 0028 void PublicService::setServiceName(const QString &serviceName) 0029 { 0030 d->m_serviceName = serviceName; 0031 } 0032 0033 void PublicService::setDomain(const QString &domain) 0034 { 0035 d->m_domain = domain; 0036 } 0037 0038 void PublicService::setTextData(const QMap<QString, QByteArray> &textData) 0039 { 0040 d->m_textData = textData; 0041 } 0042 0043 void PublicService::setType(const QString &type) 0044 { 0045 d->m_type = type; 0046 } 0047 0048 void PublicService::setSubTypes(const QStringList &) 0049 { 0050 // dummy and empty 0051 } 0052 0053 void PublicService::setPort(unsigned short port) 0054 { 0055 d->m_port = port; 0056 } 0057 0058 QStringList PublicService::subtypes() const 0059 { 0060 return QStringList(); 0061 } 0062 0063 bool PublicService::isPublished() const 0064 { 0065 return false; 0066 } 0067 0068 bool PublicService::publish() 0069 { 0070 return false; 0071 } 0072 0073 void PublicService::stop() 0074 { 0075 } 0076 0077 void PublicService::publishAsync() 0078 { 0079 Q_EMIT published(false); 0080 } 0081 0082 void PublicService::virtual_hook(int, void *) 0083 { 0084 } 0085 0086 } 0087 0088 #include "moc_publicservice.cpp"