Merge branch 'web_server_idf_namespace' into integration

This commit is contained in:
J. Nick Koston
2026-02-08 01:47:01 -06:00
7 changed files with 12 additions and 22 deletions
@@ -4,7 +4,7 @@
namespace esphome::epaper_spi {
class EPaperSpectraE6 : public EPaperBase {
class EPaperSpectraE6 final : public EPaperBase {
public:
EPaperSpectraE6(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence,
size_t init_sequence_length)
@@ -6,7 +6,7 @@ namespace esphome::epaper_spi {
/**
* An epaper display that needs LUTs to be sent to it.
*/
class EpaperWaveshare : public EPaperMono {
class EpaperWaveshare final : public EPaperMono {
public:
EpaperWaveshare(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence,
size_t init_sequence_length, const uint8_t *lut, size_t lut_length, const uint8_t *partial_lut,
@@ -6,8 +6,7 @@
#include <cstring>
#include "multipart_parser.h"
namespace esphome {
namespace web_server_idf {
namespace esphome::web_server_idf {
static const char *const TAG = "multipart";
@@ -249,6 +248,5 @@ std::string str_trim(const std::string &str) {
return str.substr(start, end - start + 1);
}
} // namespace web_server_idf
} // namespace esphome
} // namespace esphome::web_server_idf
#endif // defined(USE_ESP32) && defined(USE_WEBSERVER_OTA)
@@ -10,8 +10,7 @@
#include <string>
#include <utility>
namespace esphome {
namespace web_server_idf {
namespace esphome::web_server_idf {
// Wrapper around zorxx/multipart-parser for ESP-IDF OTA uploads
class MultipartReader {
@@ -81,6 +80,5 @@ bool parse_multipart_boundary(const char *content_type, const char **boundary_st
// Trim whitespace from both ends of a string
std::string str_trim(const std::string &str);
} // namespace web_server_idf
} // namespace esphome
} // namespace esphome::web_server_idf
#endif // defined(USE_ESP32) && defined(USE_WEBSERVER_OTA)
+2 -4
View File
@@ -8,8 +8,7 @@
#include "utils.h"
namespace esphome {
namespace web_server_idf {
namespace esphome::web_server_idf {
static const char *const TAG = "web_server_idf_utils";
@@ -119,6 +118,5 @@ const char *stristr(const char *haystack, const char *needle) {
return nullptr;
}
} // namespace web_server_idf
} // namespace esphome
} // namespace esphome::web_server_idf
#endif // USE_ESP32
+2 -4
View File
@@ -5,8 +5,7 @@
#include <string>
#include "esphome/core/helpers.h"
namespace esphome {
namespace web_server_idf {
namespace esphome::web_server_idf {
/// Decode URL-encoded string in-place (e.g., %20 -> space, + -> space)
/// Returns the new length of the decoded string
@@ -29,6 +28,5 @@ bool str_ncmp_ci(const char *s1, const char *s2, size_t n);
// Case-insensitive string search (like strstr but case-insensitive)
const char *stristr(const char *haystack, const char *needle);
} // namespace web_server_idf
} // namespace esphome
} // namespace esphome::web_server_idf
#endif // USE_ESP32
@@ -30,8 +30,7 @@
#include <cerrno>
#include <sys/socket.h>
namespace esphome {
namespace web_server_idf {
namespace esphome::web_server_idf {
#ifndef HTTPD_409
#define HTTPD_409 "409 Conflict"
@@ -899,7 +898,6 @@ esp_err_t AsyncWebServer::handle_multipart_upload_(httpd_req_t *r, const char *c
}
#endif // USE_WEBSERVER_OTA
} // namespace web_server_idf
} // namespace esphome
} // namespace esphome::web_server_idf
#endif // !defined(USE_ESP32)