DNSSD
dummy-publicservice.cpp
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 * 00003 * Copyright (C) 2004, 2005 Jakub Stachowski <qbast@go2.pl> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #include "publicservice.h" 00022 #include "servicebase_p.h" 00023 #include <QtCore/QStringList> 00024 00025 namespace DNSSD 00026 { 00027 00028 PublicService::PublicService(const QString& name, const QString& type, unsigned int port, 00029 const QString& domain, const QStringList&) 00030 : QObject(), ServiceBase(name, type, QString(), domain, port) 00031 { 00032 if (domain.isNull()) d->m_domain=QLatin1String("local."); 00033 } 00034 00035 00036 PublicService::~PublicService() 00037 {} 00038 00039 void PublicService::setServiceName(const QString& serviceName) 00040 { 00041 d->m_serviceName = serviceName; 00042 } 00043 00044 void PublicService::setDomain(const QString& domain) 00045 { 00046 d->m_domain = domain; 00047 } 00048 00049 void PublicService::setTextData(const QMap<QString,QByteArray>& textData) 00050 { 00051 d->m_textData = textData; 00052 } 00053 00054 void PublicService::setType(const QString& type) 00055 { 00056 d->m_type = type; 00057 } 00058 00059 void PublicService::setSubTypes(const QStringList&) 00060 { 00061 // dummy and empty 00062 } 00063 00064 void PublicService::setPort(unsigned short port) 00065 { 00066 d->m_port = port; 00067 } 00068 00069 QStringList PublicService::subtypes() const 00070 { 00071 return QStringList(); 00072 } 00073 00074 bool PublicService::isPublished() const 00075 { 00076 return false; 00077 } 00078 00079 bool PublicService::publish() 00080 { 00081 return false; 00082 } 00083 00084 void PublicService::stop() 00085 {} 00086 00087 void PublicService::publishAsync() 00088 { 00089 emit published(false); 00090 } 00091 00092 void PublicService::virtual_hook(int, void*) 00093 { 00094 } 00095 00096 } 00097 00098 #include "publicservice.moc"
KDE 4.6 API Reference