QMdnsEngine
0.1.0
Multicast DNS library for Qt applications
|
Service available on the local network More...
#include <qmdnsengine/service.h>
Public Member Functions | |
Service () | |
Create an uninitialized service. | |
Service (const Service &other) | |
Create a copy of an existing service. | |
virtual | ~Service () |
Destroy the service. | |
void | addAttribute (const QByteArray &key, const QByteArray &value) |
Add an attribute to the service. | |
QMap< QByteArray, QByteArray > | attributes () const |
Retrieve the attributes for the service. More... | |
QByteArray | hostname () const |
Retrieve the hostname of the device providing the service. | |
QByteArray | name () const |
Retrieve the service name. | |
bool | operator!= (const Service &other) const |
Inequality operator. | |
Service & | operator= (const Service &other) |
Assignment operator. | |
bool | operator== (const Service &other) const |
Equality operator. | |
quint16 | port () const |
Retrieve the service port. | |
void | setAttributes (const QMap< QByteArray, QByteArray > &attributes) |
Set the attributes for the service. | |
void | setHostname (const QByteArray &hostname) |
Set the hostname of the device providing the service. | |
void | setName (const QByteArray &name) |
Set the service name. More... | |
void | setPort (quint16 port) |
Set the service port. | |
void | setType (const QByteArray &type) |
Set the service type. More... | |
QByteArray | type () const |
Retrieve the service type. | |
This class contains the descriptive information necessary to represent an individual service made available to the local network. Instances are provided by Browser as services are discovered. Instances must be created and passed to Provider::update() to provide a service.
QMap<QByteArray, QByteArray> QMdnsEngine::Service::attributes | ( | ) | const |
Boolean attributes will have null values (invoking QByteArray::isNull() on the value will return true).
void QMdnsEngine::Service::setName | ( | const QByteArray & | name | ) |
This is combined with the service type and domain to form the FQDN for the service.
void QMdnsEngine::Service::setType | ( | const QByteArray & | type | ) |
For example, an HTTP service might use "_http._tcp".