#pragma once #include #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( WifiHandler&& wifiHandler ); ~NetworkHandler(); void init(EventGroupHandle_t system_event_group); WifiHandler& get_wifi_handler(); // factory method to create HttpHandler instances std::unique_ptr get_http_handler(const esp_http_client_config_t&& config); private: WifiHandler wifiHandler; bool initialized = false; };