Responder.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * Responder.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include "Service.h"
14 #include "Server.h"
15 
16 namespace mDNS
17 {
21 DECLARE_FSTR(fstrServicesLocal)
22 
23 class Responder : public Handler
24 {
25 public:
31  bool begin(const String& hostname);
32 
38  void end();
39 
48  bool addService(Service& svc);
49 
50  bool removeService(Service& svc);
51 
55  bool onMessage(Message& message) override;
56 
57 private:
58  String hostname;
59  Service::List services;
60 };
61 
62 } // namespace mDNS
Special name for querying list of services.
Definition: Responder.h:23
The String class.
Definition: WString.h:136
Definition: Answer.h:17
Describes a basic service.
Definition: Service.h:33
#define DECLARE_FSTR(name)
Declare a global FSTR::String& reference.
Definition: String.hpp:63
Encapsulates a message packet for flexible introspection.
Definition: Message.h:28
Virtual base class used for chaining message handlers.
Definition: Handler.h:21