mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
[network] Use C++17 nested namespace syntax (#14248)
This commit is contained in:
@@ -37,8 +37,7 @@ using ip4_addr_t = in_addr;
|
||||
#include <esp_netif.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace network {
|
||||
namespace esphome::network {
|
||||
|
||||
/// Buffer size for IP address string (IPv6 max: 39 chars + null)
|
||||
static constexpr size_t IP_ADDRESS_BUFFER_SIZE = 40;
|
||||
@@ -187,6 +186,5 @@ struct IPAddress {
|
||||
|
||||
using IPAddresses = std::array<IPAddress, 5>;
|
||||
|
||||
} // namespace network
|
||||
} // namespace esphome
|
||||
} // namespace esphome::network
|
||||
#endif
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
#include "esphome/components/modem/modem_component.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace network {
|
||||
namespace esphome::network {
|
||||
|
||||
// The order of the components is important: WiFi should come after any possible main interfaces (it may be used as
|
||||
// an AP that use a previous interface for NAT).
|
||||
@@ -109,6 +108,5 @@ const char *get_use_address() {
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace network
|
||||
} // namespace esphome
|
||||
} // namespace esphome::network
|
||||
#endif
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include <string>
|
||||
#include "ip_address.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace network {
|
||||
namespace esphome::network {
|
||||
|
||||
/// Return whether the node is connected to the network (through wifi, eth, ...)
|
||||
bool is_connected();
|
||||
@@ -15,6 +14,5 @@ bool is_disabled();
|
||||
const char *get_use_address();
|
||||
IPAddresses get_ip_addresses();
|
||||
|
||||
} // namespace network
|
||||
} // namespace esphome
|
||||
} // namespace esphome::network
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user