Updated mdns to use protobufs (completely untested)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <esp_http_server.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <template/stateful_service.h>
|
||||
#include <template/stateful_endpoint.h>
|
||||
#include <template/stateful_persistence.h>
|
||||
#include <template/stateful_proto_endpoint.h>
|
||||
#include <template/stateful_persistence_pb.h>
|
||||
#include <settings/mdns_settings.h>
|
||||
#include <utils/timing.h>
|
||||
#include <string>
|
||||
|
||||
#define MDNS_SETTINGS_FILE "/config/mdnsSettings.pb"
|
||||
|
||||
class MDNSService : public StatefulService<MDNSSettings> {
|
||||
private:
|
||||
FSPersistence<MDNSSettings> _persistence;
|
||||
FSPersistencePB<MDNSSettings> _persistence;
|
||||
bool _started {false};
|
||||
|
||||
void reconfigureMDNS();
|
||||
@@ -27,9 +27,7 @@ class MDNSService : public StatefulService<MDNSSettings> {
|
||||
void begin();
|
||||
|
||||
esp_err_t getStatus(httpd_req_t *request);
|
||||
void getStatus(JsonVariant &root);
|
||||
esp_err_t queryServices(httpd_req_t *request, api_Request *protoReq);
|
||||
|
||||
static esp_err_t queryServices(httpd_req_t *request, JsonVariant &json);
|
||||
|
||||
StatefulHttpEndpoint<MDNSSettings> endpoint;
|
||||
StatefulProtoEndpoint<MDNSSettings, api_MDNSSettings> protoEndpoint;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user