dnssd Library: DNSSD::RemoteService Class Reference (dnssd Library)

| # dnssd Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# DNSSD::RemoteService Class Reference

RemoteService class allows to resolve service announced on remote machine. class representing service announced on remote machine. More...

`#include <remoteservice.h>`

Inheritance diagram for DNSSD::RemoteService:

[legend]
Collaboration diagram for DNSSD::RemoteService:

[legend]
List of all members.

## Public Types
typedef KSharedPtr< RemoteService > | Ptr
## Signals
void | resolved (bool)
## Public Member Functions
| RemoteService (const QString &label)
| RemoteService (const QString &name, const QString &type, const QString &domain)
void | resolveAsync ()
bool | resolve ()
bool | isResolved () const
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)
virtual void | customEvent (QCustomEvent *event)
## Friends
KDNSSD_EXPORT QDataStream & | operator<< (QDataStream &s, const RemoteService &a)
KDNSSD_EXPORT QDataStream & | operator>> (QDataStream &s, RemoteService &a)

## Detailed Description

RemoteService class allows to resolve service announced on remote machine. class representing service announced on remote machine.

In most cases objects of this class are created by ServiceBrowser, but it is not required. Only fields valid before service is resolved are name, type.and domain.

Author:
  Jakub Stachowski

Definition at line 41 of file remoteservice.h.

## Constructor & Destructor Documentation

DNSSD::RemoteService::RemoteService | ( | const QString & | label | ) |

  | Creates unresolved service from given DNS label. Parameters:
  | label | Data returned by PTR query - it is decoded into name, type and domain
Definition at line 58 of file remoteservice.cpp. References DNSSD::ServiceBase::decode().

DNSSD::RemoteService::RemoteService | ( | const QString & | name,
|  | const QString & | type,
|  | const QString & | domain
| ) |

| Creates unresolved remote service with given name, type and domain. Definition at line 63 of file remoteservice.cpp.

## Member Function Documentation

void DNSSD::RemoteService::resolveAsync | ( |  | ) |

| Resolves host name and port of service. Host name is not resolved into numeric address - use KResolver for that. Signal resolved(bool) will be emitted when finished or even before return of this function - in case of immediate failure. Definition at line 82 of file remoteservice.cpp. References QString::ascii(), resolved(), and QString::utf8(). Referenced by resolve().

bool DNSSD::RemoteService::resolve | ( |  | ) |

| Synchronous version of resolveAsync(). Note that resolved(bool) is emitted before this function returns, Returns: TRUE is successful Definition at line 74 of file remoteservice.cpp. References resolveAsync().

bool DNSSD::RemoteService::isResolved | ( |  | ) | const

| Returns true if service has been successfully resolved. Definition at line 96 of file remoteservice.cpp.

void DNSSD::RemoteService::resolved | ( | bool |  | ) | `[signal]`

| Emitted when resolving is complete. Parameter is set to TRUE if it was successful. If operating in asynchronous mode this signal can be emitted several times (when service change) Referenced by resolveAsync().

The documentation for this class was generated from the following files:

- remoteservice.h
- remoteservice.cpp

This file is part of the documentation for dnssd Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:28:25 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003