publicservice.h
/* This file is part of the KDE project
*
* Copyright (C) 2004, 2005 Jakub Stachowski <qbast@go2.pl>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef DNSSDPUBLICSERVICE_H
#define DNSSDPUBLICSERVICE_H
#include <qobject.h>
#include <dnssd/servicebase.h>
class KURL;
namespace DNSSD
{
class PublicServicePrivate;
class KDNSSD_EXPORT PublicService : public QObject, public ServiceBase
{
Q_OBJECT
public:
PublicService(const QString& name=QString::null,const QString& type=QString::null,
unsigned int port=0,const QString& domain=QString::null);
~PublicService();
void stop();
bool publish();
bool isPublished() const;
void publishAsync();
void setTextData(const QMap<QString,QString>& textData);
void setServiceName(const QString& serviceName);
void setType(const QString& type);
void setPort(unsigned short port);
void setDomain(const QString& domain);
const KURL toInvitation(const QString& host=QString::null);
signals:
void published(bool);
private:
PublicServicePrivate *d;
protected:
virtual void customEvent(QCustomEvent* event);
virtual void virtual_hook(int, void*);
};
}
#endif
DNSSD::ServiceBase
This class is used to carry information about service.
Definition: servicebase.h:40
DNSSD::PublicService
This class is most important for application that wants to announce its service on network...
Definition: publicservice.h:56

KDE Home | KDE Accessibility Home | Description of Access Keys