Squash of branch setup

This commit is contained in:
GW_MC
2026-01-27 19:15:44 +08:00
parent 64fe528abc
commit 3ce135a028
66 changed files with 10798 additions and 0 deletions

27
main/network/network.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
#include <memory>
#include "freertos/FreeRTOS.h"
#include "esp_system.h"
#include "network/wifi_handler.h"
#include "esp_http_client.h"
// forward declare HttpHandler to avoid circular include with http_handler.h
class HttpHandler;
class NetworkHandler {
public:
NetworkHandler(
std::unique_ptr<WifiHandler> wifiHandler
);
~NetworkHandler();
void init(EventGroupHandle_t system_event_group);
WifiHandler& get_wifi_handler();
// factory method to create HttpHandler instances
std::unique_ptr<HttpHandler> get_http_handler(const esp_http_client_config_t&& config);
private:
std::unique_ptr<WifiHandler> wifiHandler;
bool initialized = false;
};