DNSSD
DNSSD::ServiceBase Class Reference
#include <DNSSD/ServiceBase>

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.
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 |
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 overridename
?).
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 |
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: