dnssd
DNSSD::ServiceBase Class Reference
This class is used to carry information about service. More...
#include <servicebase.h>

Public Types | |
typedef TDESharedPtr< ServiceBase > | Ptr |
Public Member Functions | |
ServiceBase (const TQString &name=TQString::null, const TQString &type=TQString::null, const TQString &domain=TQString::null, const TQString &host=TQString::null, unsigned short port=0) | |
const TQString & | serviceName () const |
const TQString & | type () const |
const TQString & | domain () const |
const TQString & | hostName () const |
unsigned short | port () const |
const TQMap< TQString, TQString > & | textData () const |
Protected Member Functions | |
TQString | encode () |
void | decode (const TQString &name) |
virtual void | virtual_hook (int, void *) |
Protected Attributes | |
TQString | m_serviceName |
TQString | m_type |
TQString | m_domain |
TQString | m_hostName |
unsigned short | m_port |
TQMap< TQString, TQString > | m_textData |
Friends | |
TDEDNSSD_EXPORT TQDataStream & | operator<< (TQDataStream &s, const ServiceBase &a) |
TDEDNSSD_EXPORT TQDataStream & | operator>> (TQDataStream &s, ServiceBase &a) |
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 40 of file servicebase.h.
Constructor & Destructor Documentation
DNSSD::ServiceBase::ServiceBase | ( | const TQString & | name = TQString::null , |
|
const TQString & | type = TQString::null , |
|||
const TQString & | domain = TQString::null , |
|||
const TQString & | host = TQString::null , |
|||
unsigned short | port = 0 | |||
) |
- Parameters:
-
name Service name - empty for metaservices type Service type - empty for domains domain Domain name host Host name port Port number
Definition at line 24 of file servicebase.cpp.
Member Function Documentation
void DNSSD::ServiceBase::decode | ( | const TQString & | name | ) | [protected] |
Decode PTR label returned by DNS resolver into service name, type and domain.
It also handles special cases - metaservices and domains.
Definition at line 42 of file servicebase.cpp.
const TQString & DNSSD::ServiceBase::domain | ( | ) | const |
Returns domain that given service belongs to.
It is "local." for link-local services.
Definition at line 76 of file servicebase.cpp.
TQString DNSSD::ServiceBase::encode | ( | ) | [protected] |
Encode service name, type and domain into string that can be used as DNS-SD PTR label.
Definition at line 32 of file servicebase.cpp.
const TQString & DNSSD::ServiceBase::hostName | ( | ) | const |
Returns hostname.
It is only valid for local and resolved remote services.
Definition at line 81 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 86 of file servicebase.cpp.
const TQString & DNSSD::ServiceBase::serviceName | ( | ) | const |
Returns name of service.
This is empty for metaservices
Definition at line 66 of file servicebase.cpp.
Returns read only map of text properties.
It is only valid for local and resolved remote services.
Definition at line 90 of file servicebase.cpp.
const TQString & DNSSD::ServiceBase::type | ( | ) | const |
Returns type of service.
It always in format _sometype._udp or _sometype._tcp and it is empty for domains.
Definition at line 71 of file servicebase.cpp.
Member Data Documentation
TQMap<TQString,TQString> DNSSD::ServiceBase::m_textData [protected] |
Map of TXT properties.
Definition at line 99 of file servicebase.h.
The documentation for this class was generated from the following files: