1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
J. Nick Koston
66e471cf2a [mdns] Modernize to C++17 nested namespace syntax 2025-11-18 14:33:07 -06:00
7 changed files with 14 additions and 28 deletions

View File

@@ -21,8 +21,7 @@
#include "esphome/components/dashboard_import/dashboard_import.h"
#endif
namespace esphome {
namespace mdns {
namespace esphome::mdns {
static const char *const TAG = "mdns";
@@ -189,6 +188,5 @@ void MDNSComponent::dump_config() {
#endif
}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif

View File

@@ -6,8 +6,7 @@
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace mdns {
namespace esphome::mdns {
// Helper struct that identifies strings that may be stored in flash storage (similar to LogString)
struct MDNSString;
@@ -79,6 +78,5 @@ class MDNSComponent : public Component {
void compile_records_(StaticVector<MDNSService, MDNS_SERVICE_COUNT> &services);
};
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif

View File

@@ -7,8 +7,7 @@
#include "esphome/core/log.h"
#include "mdns_component.h"
namespace esphome {
namespace mdns {
namespace esphome::mdns {
static const char *const TAG = "mdns";
@@ -56,7 +55,6 @@ void MDNSComponent::on_shutdown() {
delay(40); // Allow the mdns packets announcing service removal to be sent
}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif // USE_ESP32

View File

@@ -9,8 +9,7 @@
#include "esphome/core/log.h"
#include "mdns_component.h"
namespace esphome {
namespace mdns {
namespace esphome::mdns {
void MDNSComponent::setup() {
#ifdef USE_MDNS_STORE_SERVICES
@@ -52,7 +51,6 @@ void MDNSComponent::on_shutdown() {
delay(10);
}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif

View File

@@ -6,8 +6,7 @@
#include "esphome/core/log.h"
#include "mdns_component.h"
namespace esphome {
namespace mdns {
namespace esphome::mdns {
void MDNSComponent::setup() {
// Host platform doesn't have actual mDNS implementation
@@ -15,7 +14,6 @@ void MDNSComponent::setup() {
void MDNSComponent::on_shutdown() {}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif

View File

@@ -9,8 +9,7 @@
#include <mDNS.h>
namespace esphome {
namespace mdns {
namespace esphome::mdns {
void MDNSComponent::setup() {
#ifdef USE_MDNS_STORE_SERVICES
@@ -46,7 +45,6 @@ void MDNSComponent::setup() {
void MDNSComponent::on_shutdown() {}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif

View File

@@ -9,8 +9,7 @@
#include <ESP8266mDNS.h>
namespace esphome {
namespace mdns {
namespace esphome::mdns {
void MDNSComponent::setup() {
#ifdef USE_MDNS_STORE_SERVICES
@@ -51,7 +50,6 @@ void MDNSComponent::on_shutdown() {
delay(40);
}
} // namespace mdns
} // namespace esphome
} // namespace esphome::mdns
#endif