servicebase.h
/* This file is part of the KDE project
*
* Copyright (C) 2004 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 DNSSDSERVICEBASE_H
#define DNSSDSERVICEBASE_H
#include <qmap.h>
#include <ksharedptr.h>
class QString;
class QDataStream;
namespace DNSSD
{
class ServiceBasePrivate;
class KDNSSD_EXPORT ServiceBase : public KShared
{
public:
typedef KSharedPtr<ServiceBase> Ptr;
ServiceBase(const QString& name=QString::null,const QString& type=QString::null,
const QString& domain=QString::null, const QString& host=QString::null,
unsigned short port=0);
virtual ~ServiceBase();
const QString& serviceName() const;
const QString& type() const;
const QString& domain() const;
const QString& hostName() const;
unsigned short port() const;
const QMap<QString,QString>& textData() const;
protected:
QString m_serviceName;
QString m_type;
QString m_domain;
QString m_hostName;
unsigned short m_port;
QMap<QString,QString> m_textData;
QString encode();
void decode(const QString& name);
friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const ServiceBase & a);
friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, ServiceBase & a);
virtual void virtual_hook(int, void*);
private:
ServiceBasePrivate* d;
};
}
#endif
DNSSD::ServiceBase
This class is used to carry information about service.
Definition: servicebase.h:40
DNSSD::ServiceBase::m_textData
QMap< QString, QString > m_textData
Map of TXT properties.
Definition: servicebase.h:99

KDE Home | KDE Accessibility Home | Description of Access Keys