mDNS::Service Class Reference
Describes a basic service. More...
#include <Service.h>
Inheritance diagram for mDNS::Service:
Collaboration diagram for mDNS::Service:
Classes | |
struct | Host |
Public Types | |
enum | Protocol { Protocol::Udp, Protocol::Tcp } |
using | List = LinkedObjectListTemplate< Service > |
![]() | |
using | Iterator = IteratorTemplate< Service, Service *, Service &> |
using | ConstIterator = IteratorTemplate< const Service, const Service *, const Service &> |
Public Member Functions | |
virtual String | getInstance () |
User-friendly Instance name. More... | |
virtual String | getName () |
Identifies what the service does. More... | |
virtual Protocol | getProtocol () |
Which protocol the service uses. More... | |
virtual uint16_t | getPort () |
Which port to access service on. More... | |
virtual void | addText (mDNS::Resource::TXT &txt) |
Override to obtain txt items. More... | |
String | getInstanceName () |
Get advertised service instance name. More... | |
String | getServiceName () |
Get advertised service name (without the instance) More... | |
void | getServiceName (String &s) |
bool | handleQuestion (Question &question, const Host &host, Request &reply) |
![]() | |
Service * | getNext () const |
Iterator | begin () const |
Iterator | end () const |
Iterator | cbegin () const |
Iterator | cend () const |
![]() | |
virtual | ~LinkedObject () |
virtual LinkedObject * | next () const |
LinkedObject * | getNext () const |
bool | operator== (const LinkedObject &other) const |
bool | operator!= (const LinkedObject &other) const |
Detailed Description
Describes a basic service.
The default methods translate to a DNS-SD name of "Sming._http._tcp.local". See :cpp:class:mDNS::Name
for a description of how names are defined.
Member Typedef Documentation
◆ List
Member Enumeration Documentation
◆ Protocol
|
strong |
Member Function Documentation
◆ addText()
|
inlinevirtual |
Override to obtain txt items.
- Parameters
-
txt Resource to add text items, e.g. name=value pairs
Called whenever a TXT reply is created.
◆ getInstance()
|
inlinevirtual |
User-friendly Instance name.
◆ getInstanceName()
String mDNS::Service::getInstanceName | ( | ) |
Get advertised service instance name.
e.g. "Sming._http._tcp.local"
◆ getName()
|
inlinevirtual |
Identifies what the service does.
◆ getPort()
|
inlinevirtual |
Which port to access service on.
◆ getProtocol()
|
inlinevirtual |
Which protocol the service uses.
◆ getServiceName() [1/2]
String mDNS::Service::getServiceName | ( | ) |
Get advertised service name (without the instance)
e.g. "_http._tcp.local"
◆ getServiceName() [2/2]
void mDNS::Service::getServiceName | ( | String & | s | ) |
◆ handleQuestion()
The documentation for this class was generated from the following file: