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

DNSSD

DNSSD::ServiceBase

DNSSD::ServiceBase Class Reference

#include <DNSSD/ServiceBase>

Inheritance diagram for DNSSD::ServiceBase:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class is used to carry information about service.

It can be remote, local, metaservice or domain. Metaservice has only type and domain - it means that services of given type are present in given domain. Describes any type of service.

Author:
Jakub Stachowski

Definition at line 42 of file servicebase.h.


Public Types

typedef KSharedPtr< ServiceBase > Ptr

Public Member Functions

QString domain () const
QString hostName () const
bool operator== (const ServiceBase &o) const
unsigned short port () const
 ServiceBase (const QString &name=QString(), const QString &type=QString(), const QString &domain=QString(), const QString &host=QString(), unsigned short port=0)
QString serviceName () const
QMap< QString, QByteArray > textData () const
QString type () const
virtual ~ServiceBase ()

Protected Member Functions

 ServiceBase (ServiceBasePrivate *const d)
virtual void virtual_hook (int, void *)

Protected Attributes

ServiceBasePrivate *const d

Member Typedef Documentation

typedef KSharedPtr<ServiceBase> DNSSD::ServiceBase::Ptr

Reimplemented in DNSSD::RemoteService.

Definition at line 45 of file servicebase.h.


Constructor & Destructor Documentation

DNSSD::ServiceBase::ServiceBase ( const QString &  name = QString(),
const QString &  type = QString(),
const QString &  domain = QString(),
const QString &  host = QString(),
unsigned short  port = 0 
) [explicit]

Parameters:
name Service name

Parameters:
type Service type
domain Domain name for service
host Host name for service
port Port number for service
Todo:
Explain if domain is the FQDN, or if host + "." + domain is.
Todo:
Explain when port is needed (does it override name?).

Definition at line 30 of file servicebase.cpp.

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

Definition at line 39 of file servicebase.cpp.

DNSSD::ServiceBase::ServiceBase ( ServiceBasePrivate *const   d  )  [protected]

Definition at line 35 of file servicebase.cpp.


Member Function Documentation

QString DNSSD::ServiceBase::domain (  )  const

Returns domain that given service belongs to.

It is "local." for link-local services.

Definition at line 54 of file servicebase.cpp.

QString DNSSD::ServiceBase::hostName (  )  const

Returns hostname.

It is only valid for local and resolved remote services.

Definition at line 59 of file servicebase.cpp.

bool DNSSD::ServiceBase::operator== ( const ServiceBase &  o  )  const

Compares service name, type and domain.

This is enough to for unique identification and omitting port, host and text data allows to compare resolved and unresolved services

Definition at line 73 of file servicebase.cpp.

unsigned short DNSSD::ServiceBase::port (  )  const

Returns port number.

It is only valid for local and resolved remote services.

Definition at line 64 of file servicebase.cpp.

QString DNSSD::ServiceBase::serviceName (  )  const

Returns name of service.

Definition at line 44 of file servicebase.cpp.

QMap< QString, QByteArray > DNSSD::ServiceBase::textData (  )  const

Returns read only map of text properties.

It is only valid for local and resolved remote services.

Definition at line 68 of file servicebase.cpp.

QString DNSSD::ServiceBase::type (  )  const

Returns type of service.

It always in format _sometype._udp or _sometype._tcp.

Definition at line 49 of file servicebase.cpp.

void DNSSD::ServiceBase::virtual_hook ( int  ,
void *   
) [protected, virtual]

Reimplemented in DNSSD::PublicService, and DNSSD::RemoteService.

Definition at line 78 of file servicebase.cpp.


Member Data Documentation

ServiceBasePrivate* const DNSSD::ServiceBase::d [protected]

Definition at line 101 of file servicebase.h.


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

DNSSD

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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