remoteservice.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 DNSSDREMOTESERVICE_H
#define DNSSDREMOTESERVICE_H
#include <qobject.h>
#include <dnssd/servicebase.h>
class QDataStream;
class KURL;
namespace DNSSD
{
class RemoteServicePrivate;
class KDNSSD_EXPORT RemoteService : public QObject, public ServiceBase
{
Q_OBJECT
public:
typedef KSharedPtr<RemoteService> Ptr;
RemoteService(const QString& label);
RemoteService(const QString& name,const QString& type,const QString& domain);
RemoteService(const KURL& url);
virtual ~RemoteService();
void resolveAsync();
bool resolve();
bool isResolved() const;
signals:
void resolved(bool);
protected:
virtual void virtual_hook(int id, void *data);
virtual void customEvent(QCustomEvent* event);
private:
void resolveError();
void resolved(const char *host, unsigned short port, unsigned short txtlen,
const char* txtRecord);
RemoteServicePrivate *d;
friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const RemoteService & a);
friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, RemoteService & a);
};
}
#endif
DNSSD::ServiceBase
This class is used to carry information about service.
Definition: servicebase.h:40
DNSSD::RemoteService
RemoteService class allows to resolve service announced on remote machine.
Definition: remoteservice.h:42

KDE Home | KDE Accessibility Home | Description of Access Keys