• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

DNSSD

DNSSD::RemoteService

DNSSD::RemoteService Class Reference

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

#include <remoteservice.h>

Inheritance diagram for DNSSD::RemoteService:

Inheritance graph
[legend]

List of all members.


Public Types

typedef KSharedPtr< RemoteService > Ptr

Signals

void resolved (bool)

Public Member Functions

bool isResolved () const
 RemoteService (const KURL &url)
 RemoteService (const QString &name, const QString &type, const QString &domain)
 RemoteService (const QString &label)
bool resolve ()
void resolveAsync ()
virtual ~RemoteService ()

Protected Member Functions

virtual void customEvent (QCustomEvent *event)
virtual void virtual_hook (int id, void *data)

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.

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.

class representing service announced on remote machine.

Author:
Jakub Stachowski

Definition at line 42 of file remoteservice.h.


Member Typedef Documentation

typedef KSharedPtr<RemoteService> DNSSD::RemoteService::Ptr

Reimplemented from DNSSD::ServiceBase.

Definition at line 46 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 59 of file remoteservice.cpp.

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 64 of file remoteservice.cpp.

DNSSD::RemoteService::RemoteService ( const KURL &  url  ) 

Creates resolved remote service from invitation URL constructed by PublicService::toInvitation.

If URL was invalid, service is set to unresolved and other fields should not be used.

Definition at line 70 of file remoteservice.cpp.

DNSSD::RemoteService::~RemoteService (  )  [virtual]

Definition at line 84 of file remoteservice.cpp.


Member Function Documentation

void DNSSD::RemoteService::customEvent ( QCustomEvent *  event  )  [protected, virtual]

Reimplemented from QObject.

Definition at line 116 of file remoteservice.cpp.

bool DNSSD::RemoteService::isResolved (  )  const

Returns true if service has been successfully resolved.

Definition at line 111 of file remoteservice.cpp.

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 89 of file remoteservice.cpp.

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 97 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)

void DNSSD::RemoteService::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from DNSSD::ServiceBase.

Definition at line 133 of file remoteservice.cpp.


Friends And Related Function Documentation

KDNSSD_EXPORT QDataStream& operator<< ( QDataStream &  s,
const RemoteService &  a 
) [friend]

Definition at line 138 of file remoteservice.cpp.

KDNSSD_EXPORT QDataStream& operator>> ( QDataStream &  s,
RemoteService &  a 
) [friend]

Definition at line 146 of file remoteservice.cpp.


The documentation for this class was generated from the following files:
  • remoteservice.h
  • remoteservice.cpp

DNSSD

Skip menu "DNSSD"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal