Description and parameterization of a service instance.
More...
#include <ServiceDescription.hpp>
Description and parameterization of a service instance.
◆ ServiceDescription() [1/2]
| servicediscovery::avahi::ServiceDescription::ServiceDescription |
( |
| ) |
|
◆ ServiceDescription() [2/2]
| servicediscovery::avahi::ServiceDescription::ServiceDescription |
( |
const std::string & |
servicename | ) |
|
◆ ~ServiceDescription()
| servicediscovery::avahi::ServiceDescription::~ServiceDescription |
( |
| ) |
|
|
virtual |
◆ compareWithoutTXT()
| bool servicediscovery::avahi::ServiceDescription::compareWithoutTXT |
( |
const ServiceDescription & |
other | ) |
const |
◆ getDescription()
| std::string servicediscovery::avahi::ServiceDescription::getDescription |
( |
const std::string & |
label | ) |
const |
Get the description associated with this service and a certain label
- Parameters
-
◆ getDescriptionSize()
| int servicediscovery::avahi::ServiceDescription::getDescriptionSize |
( |
| ) |
const |
|
protected |
◆ getDomain()
| std::string servicediscovery::avahi::ServiceDescription::getDomain |
( |
| ) |
const |
Get domain sucha as .local
◆ getInterfaceIndex()
| int servicediscovery::avahi::ServiceDescription::getInterfaceIndex |
( |
| ) |
const |
◆ getLabels()
| 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
◆ getName()
| std::string servicediscovery::avahi::ServiceDescription::getName |
( |
| ) |
const |
◆ getProtocol()
| int servicediscovery::avahi::ServiceDescription::getProtocol |
( |
| ) |
const |
◆ getProtocolString()
| std::string servicediscovery::avahi::ServiceDescription::getProtocolString |
( |
| ) |
const |
◆ getRawDescriptions()
| std::list< std::string > servicediscovery::avahi::ServiceDescription::getRawDescriptions |
( |
| ) |
const |
Get all raw description fields
- Returns
- List of txt fields
◆ getType()
| std::string servicediscovery::avahi::ServiceDescription::getType |
( |
| ) |
const |
Retrieve type of service
- Returns
- type
◆ operator!=()
| bool servicediscovery::avahi::ServiceDescription::operator!= |
( |
const ServiceDescription & |
other | ) |
const |
◆ operator==()
| bool servicediscovery::avahi::ServiceDescription::operator== |
( |
const ServiceDescription & |
other | ) |
const |
◆ setDescription()
| 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) |
◆ setDomain()
| void servicediscovery::avahi::ServiceDescription::setDomain |
( |
const std::string & |
domain | ) |
|
Set domain such as .local
◆ setInterfaceIndex()
| void servicediscovery::avahi::ServiceDescription::setInterfaceIndex |
( |
int |
interfaceIndex | ) |
|
◆ setName()
| void servicediscovery::avahi::ServiceDescription::setName |
( |
const std::string & |
name | ) |
|
◆ setProtocol()
| void servicediscovery::avahi::ServiceDescription::setProtocol |
( |
int |
protocol | ) |
|
Set protocol of service by name of protocol
◆ setRawDescriptions()
| void servicediscovery::avahi::ServiceDescription::setRawDescriptions |
( |
const std::list< std::string > & |
descriptions | ) |
|
Allows to set the txt field of a service in a raw fashion
◆ setType()
| void servicediscovery::avahi::ServiceDescription::setType |
( |
const std::string & |
type | ) |
|
Set type of service, such as _myservice._tcp
◆ ServiceEvent
◆ descriptions_
| std::list<std::string> servicediscovery::avahi::ServiceDescription::descriptions_ |
|
protected |
◆ domain_
| std::string servicediscovery::avahi::ServiceDescription::domain_ |
|
protected |
◆ interfaceIndex_
| AvahiIfIndex servicediscovery::avahi::ServiceDescription::interfaceIndex_ |
|
protected |
◆ labels_
| std::vector<std::string> servicediscovery::avahi::ServiceDescription::labels_ |
|
protected |
◆ mDNSMaxPayloadSize
| const uint32_t servicediscovery::avahi::ServiceDescription::mDNSMaxPayloadSize = 1300 |
|
staticprotected |
◆ mDNSMaxRecordSize
| const uint32_t servicediscovery::avahi::ServiceDescription::mDNSMaxRecordSize = 200 |
|
staticprotected |
◆ name_
| std::string servicediscovery::avahi::ServiceDescription::name_ |
|
protected |
◆ protocol_
| AvahiProtocol servicediscovery::avahi::ServiceDescription::protocol_ |
|
protected |
◆ type_
| std::string servicediscovery::avahi::ServiceDescription::type_ |
|
protected |
The documentation for this class was generated from the following files: