mDNS::Service Class Reference

Describes a basic service. More...

#include <Service.h>

Inheritance diagram for mDNS::Service:
[legend]
Collaboration diagram for mDNS::Service:
[legend]

Classes

struct  Host
 

Public Types

enum  Protocol { Protocol::Udp, Protocol::Tcp }
 
using List = LinkedObjectListTemplate< Service >
 
- Public Types inherited from LinkedObjectTemplate< 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)
 
- Public Member Functions inherited from LinkedObjectTemplate< Service >
Service * getNext () const
 
Iterator begin () const
 
Iterator end () const
 
Iterator cbegin () const
 
Iterator cend () const
 
- Public Member Functions inherited from LinkedObject
virtual ~LinkedObject ()
 
virtual LinkedObjectnext () const
 
LinkedObjectgetNext () 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

Enumerator
Udp 
Tcp 

Member Function Documentation

◆ addText()

virtual void mDNS::Service::addText ( mDNS::Resource::TXT txt)
inlinevirtual

Override to obtain txt items.

Parameters
txtResource to add text items, e.g. name=value pairs

Called whenever a TXT reply is created.

◆ getInstance()

virtual String mDNS::Service::getInstance ( )
inlinevirtual

User-friendly Instance name.

◆ getInstanceName()

String mDNS::Service::getInstanceName ( )

Get advertised service instance name.

e.g. "Sming._http._tcp.local"

◆ getName()

virtual String mDNS::Service::getName ( )
inlinevirtual

Identifies what the service does.

◆ getPort()

virtual uint16_t mDNS::Service::getPort ( )
inlinevirtual

Which port to access service on.

◆ getProtocol()

virtual Protocol mDNS::Service::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()

bool mDNS::Service::handleQuestion ( Question question,
const Host host,
Request reply 
)

The documentation for this class was generated from the following file: