mirror of
https://github.com/esphome/esphome.git
synced 2025-11-16 14:55:50 +00:00
[mdns] Conditionally compile extra services to reduce flash usage (#10129)
This commit is contained in:
@@ -35,14 +35,18 @@ class MDNSComponent : public Component {
|
||||
#endif
|
||||
float get_setup_priority() const override { return setup_priority::AFTER_CONNECTION; }
|
||||
|
||||
#ifdef USE_MDNS_EXTRA_SERVICES
|
||||
void add_extra_service(MDNSService service) { services_extra_.push_back(std::move(service)); }
|
||||
#endif
|
||||
|
||||
std::vector<MDNSService> get_services();
|
||||
|
||||
void on_shutdown() override;
|
||||
|
||||
protected:
|
||||
#ifdef USE_MDNS_EXTRA_SERVICES
|
||||
std::vector<MDNSService> services_extra_{};
|
||||
#endif
|
||||
std::vector<MDNSService> services_{};
|
||||
std::string hostname_;
|
||||
void compile_records_();
|
||||
|
||||
Reference in New Issue
Block a user