.TH "DNSSD::ServiceBase" kde3 "11 Jun 2005" "Version Version 3.4.1" "dnssd Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DNSSD::ServiceBase \- This class is used to carry information about service. Describes any type of service.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <servicebase.h>\fP
.PP
Inherits KShared.
.PP
Inherited by \fBDNSSD::PublicService\fP, and \fBDNSSD::RemoteService\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef KSharedPtr< \fBServiceBase\fP > \fBPtr\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBServiceBase\fP (const \fBQString\fP &name=QString::null, const \fBQString\fP &type=QString::null, const \fBQString\fP &domain=QString::null, const \fBQString\fP &host=QString::null, unsigned short port=0)"
.br
.ti -1c
.RI "const \fBQString\fP & \fBserviceName\fP () const "
.br
.ti -1c
.RI "const \fBQString\fP & \fBtype\fP () const "
.br
.ti -1c
.RI "const \fBQString\fP & \fBdomain\fP () const "
.br
.ti -1c
.RI "const \fBQString\fP & \fBhostName\fP () const "
.br
.ti -1c
.RI "unsigned short \fBport\fP () const "
.br
.ti -1c
.RI "const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & \fBtextData\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBencode\fP ()"
.br
.ti -1c
.RI "void \fBdecode\fP (const \fBQString\fP &name)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int, void *)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBm_serviceName\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_type\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_domain\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_hostName\fP"
.br
.ti -1c
.RI "unsigned short \fBm_port\fP"
.br
.ti -1c
.RI "\fBQMap\fP< \fBQString\fP, \fBQString\fP > \fBm_textData\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "KDNSSD_EXPORT \fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &s, const \fBServiceBase\fP &a)"
.br
.ti -1c
.RI "KDNSSD_EXPORT \fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBServiceBase\fP &a)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is used to carry information about service. Describes any type of 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. 
.PP
\fBAuthor:\fP
.RS 4
Jakub Stachowski 
.RE
.PP

.PP
Definition at line 40 of file servicebase.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "DNSSD::ServiceBase::ServiceBase (const \fBQString\fP & name = \fCQString::null\fP, const \fBQString\fP & type = \fCQString::null\fP, const \fBQString\fP & domain = \fCQString::null\fP, const \fBQString\fP & host = \fCQString::null\fP, unsigned short port = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fIname\fP Service name - empty for metaservices 
.br
\fItype\fP Service type - empty for domains
.RE
.PP

.PP
Definition at line 27 of file servicebase.cpp.
.SH "Member Function Documentation"
.PP 
.SS "const \fBQString\fP & DNSSD::ServiceBase::serviceName () const"
.PP
Returns name of service. 
.PP
This is empty for metaservices
.PP
Definition at line 69 of file servicebase.cpp.
.SS "const \fBQString\fP & DNSSD::ServiceBase::type () const"
.PP
Returns type of service. 
.PP
It always in format _sometype._udp or _sometype._tcp and it is empty for domains.
.PP
Definition at line 74 of file servicebase.cpp.
.SS "const \fBQString\fP & DNSSD::ServiceBase::domain () const"
.PP
Returns domain that given service belongs to. 
.PP
It is 'local.' for link-local services.
.PP
Definition at line 79 of file servicebase.cpp.
.SS "const \fBQString\fP & DNSSD::ServiceBase::hostName () const"
.PP
Returns hostname. 
.PP
It is only valid for local and resolved remote services.
.PP
Definition at line 84 of file servicebase.cpp.
.SS "unsigned short DNSSD::ServiceBase::port () const"
.PP
Returns port number. 
.PP
It is only valid for local and resolved remote services.
.PP
Definition at line 89 of file servicebase.cpp.
.SS "const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & DNSSD::ServiceBase::textData () const"
.PP
Returns read only map of text properties. 
.PP
It is only valid for local and resolved remote services.
.PP
Definition at line 93 of file servicebase.cpp.
.PP
References m_textData.
.SS "\fBQString\fP DNSSD::ServiceBase::encode ()\fC [protected]\fP"
.PP
Encode service name, type and domain into string that can be used as DNS-SD PTR label. 
.PP
Definition at line 35 of file servicebase.cpp.
.PP
References QString::replace().
.SS "void DNSSD::ServiceBase::decode (const \fBQString\fP & name)\fC [protected]\fP"
.PP
Decode PTR label returned by DNS resolver into service name, type and domain. 
.PP
It also handles special cases - metaservices and domains.
.PP
Definition at line 45 of file servicebase.cpp.
.PP
References QString::find(), QString::left(), QString::mid(), QString::replace(), and QString::section().
.PP
Referenced by DNSSD::RemoteService::RemoteService().
.SH "Member Data Documentation"
.PP 
.SS "\fBQMap\fP<\fBQString\fP,\fBQString\fP> \fBDNSSD::ServiceBase::m_textData\fP\fC [protected]\fP"
.PP
Map of TXT properties. 
.PP
Definition at line 96 of file servicebase.h.
.PP
Referenced by textData().

.SH "Author"
.PP 
Generated automatically by Doxygen for dnssd Library from the source code.
