Description and parameterization of a service instance.
More...
#include <ServiceDescription.hpp>
Description and parameterization of a service instance.
| servicediscovery::avahi::ServiceDescription::ServiceDescription |
( |
| ) |
|
| servicediscovery::avahi::ServiceDescription::ServiceDescription |
( |
const std::string & |
servicename | ) |
|
| servicediscovery::avahi::ServiceDescription::~ServiceDescription |
( |
| ) |
|
|
virtual |
| bool servicediscovery::avahi::ServiceDescription::compareWithoutTXT |
( |
const ServiceDescription & |
other | ) |
const |
| std::string servicediscovery::avahi::ServiceDescription::getDescription |
( |
const std::string & |
label | ) |
const |
Get the description associated with this service and a certain label
- Parameters
-
| int servicediscovery::avahi::ServiceDescription::getDescriptionSize |
( |
| ) |
const |
|
protected |
| std::string servicediscovery::avahi::ServiceDescription::getDomain |
( |
| ) |
const |
Get domain sucha as .local
| int servicediscovery::avahi::ServiceDescription::getInterfaceIndex |
( |
| ) |
const |
| std::vector< std::string > servicediscovery::avahi::ServiceDescription::getLabels |
( |
| ) |
const |
Retrieve all labels that are available in the description of the service
- Returns
- List of labels
| std::string servicediscovery::avahi::ServiceDescription::getName |
( |
| ) |
const |
| int servicediscovery::avahi::ServiceDescription::getProtocol |
( |
| ) |
const |
| std::string servicediscovery::avahi::ServiceDescription::getProtocolString |
( |
| ) |
const |
| std::list< std::string > servicediscovery::avahi::ServiceDescription::getRawDescriptions |
( |
| ) |
const |
Get all raw description fields
- Returns
- List of txt fields
| std::string servicediscovery::avahi::ServiceDescription::getType |
( |
| ) |
const |
Retrieve type of service
- Returns
- type
| bool servicediscovery::avahi::ServiceDescription::operator!= |
( |
const ServiceDescription & |
other | ) |
const |
| bool servicediscovery::avahi::ServiceDescription::operator== |
( |
const ServiceDescription & |
other | ) |
const |
| void servicediscovery::avahi::ServiceDescription::setDescription |
( |
const std::string & |
label, |
|
|
const std::string & |
description |
|
) |
| |
Set a description field (identified by a label) associated with this service. Note that the description should be as brief as possible for performance reasons, since a low level protocol mDNS needs to handle the data.
This method can be used several times for adding different label/descriptions to this service. It's also possible to overwrite/update a specific label with another description.
- Parameters
-
| label | Label of description |
| description | Description |
- Exceptions
-
| std::runtime_error | if label exceeds length of 200 byte or payload size will exceed the set maximum (currently set to 1300 bytes) |
| void servicediscovery::avahi::ServiceDescription::setDomain |
( |
const std::string & |
domain | ) |
|
Set domain such as .local
| void servicediscovery::avahi::ServiceDescription::setInterfaceIndex |
( |
int |
interfaceIndex | ) |
|
| void servicediscovery::avahi::ServiceDescription::setName |
( |
const std::string & |
name | ) |
|
| void servicediscovery::avahi::ServiceDescription::setProtocol |
( |
int |
protocol | ) |
|
Set protocol of service by name of protocol
| void servicediscovery::avahi::ServiceDescription::setRawDescriptions |
( |
const std::list< std::string > & |
descriptions | ) |
|
Allows to set the txt field of a service in a raw fashion
| void servicediscovery::avahi::ServiceDescription::setType |
( |
const std::string & |
type | ) |
|
Set type of service, such as _myservice._tcp
| std::list<std::string> servicediscovery::avahi::ServiceDescription::descriptions_ |
|
protected |
| std::string servicediscovery::avahi::ServiceDescription::domain_ |
|
protected |
| AvahiIfIndex servicediscovery::avahi::ServiceDescription::interfaceIndex_ |
|
protected |
| std::vector<std::string> servicediscovery::avahi::ServiceDescription::labels_ |
|
protected |
| const uint32_t servicediscovery::avahi::ServiceDescription::mDNSMaxPayloadSize = 1300 |
|
staticprotected |
| const uint32_t servicediscovery::avahi::ServiceDescription::mDNSMaxRecordSize = 200 |
|
staticprotected |
| std::string servicediscovery::avahi::ServiceDescription::name_ |
|
protected |
| AvahiProtocol servicediscovery::avahi::ServiceDescription::protocol_ |
|
protected |
| std::string servicediscovery::avahi::ServiceDescription::type_ |
|
protected |
The documentation for this class was generated from the following files: