# class ServiceBase

###

Module | dnssd
Namespace | DNSSD
Class | ServiceBase
Inherits | KShared

\class ServiceBase servicebase.h DNSSD/ServiceBase

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

### methods

- ServiceBase (name, type, domain, host, port)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  name | QString | QString()
  type | QString | QString()
  domain | QString | QString()
  host | QString | QString()
  port | unsigned short | 0

  name - Service name

  type - Service type

  domain - Domain name for service

  host - Host name for service

  port - Port number for service

  To do: Explain if domain is the FQDN, or if host + "." + domain is. To do: Explain when port is needed (does it override name?).

- ServiceBase (d)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  d | ServiceBasePrivate |

- domain ( )

  returns QString

  Returns domain that given service belongs to. It is "local." for link-local services.

- hostName ( )

  returns QString

  Returns hostname. It is only valid for local and resolved remote services.

- operator == (o)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  o | DNSSD.ServiceBase |

  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

- port ( )

  returns unsigned short

  Returns port number. It is only valid for local and resolved remote services.

- serviceName ( )

  returns QString

  Returns name of service.

- textData ( )

  returns QMap<QString,QByteArray>

  Returns read only map of text properties. It is only valid for local and resolved remote services.

- type ( )

  returns QString

  Returns type of service. It always in format _sometype._udp or _sometype._tcp.

- virtual_hook (a0, a1)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | int |
  a1 | void |