dnssd Library API Documentation

publicservice.h

00001 /* This file is part of the KDE project 00002 * 00003 * Copyright (C) 2004 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., 59 Temple Place - Suite 330, 00018 * Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef DNSSDPUBLICSERVICE_H 00022 #define DNSSDPUBLICSERVICE_H 00023 00024 #include <qobject.h> 00025 #include <dnssd/servicebase.h> 00026 00027 namespace DNSSD 00028 { 00029 class PublicServicePrivate; 00030 00055 class KDNSSD_EXPORT PublicService : public QObject, public ServiceBase 00056 { 00057 Q_OBJECT 00058 public: 00067 PublicService(const QString& name=QString::null,const QString& type=QString::null, 00068 unsigned int port=0,const QString& domain=QString::null); 00069 00070 ~PublicService(); 00071 00076 void stop(); 00077 00082 bool publish(); 00083 00087 bool isPublished() const; 00088 00094 void publishAsync(); 00095 00099 void setTextData(const QMap<QString,QString>& textData); 00100 00104 void setServiceName(const QString& serviceName); 00105 00110 void setType(const QString& type); 00111 00115 void setPort(unsigned short port); 00116 00121 void setDomain(const QString& domain); 00122 00123 signals: 00128 void published(bool); 00129 private: 00130 PublicServicePrivate *d; 00131 00132 protected: 00133 virtual void customEvent(QCustomEvent* event); 00134 virtual void virtual_hook(int, void*); 00135 }; 00136 00137 00138 } 00139 00140 #endif
KDE Logo
This file is part of the documentation for dnssd Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:30:31 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003