refactor: reorganize project structure with modern C++ namespace organization
- Restructure include/ and src/ directories with logical grouping - Move core components to spore/core/ (NodeContext, NetworkManager, TaskManager, ClusterManager, ApiServer) - Move services to spore/services/ (NodeService, NetworkService, ClusterService, TaskService) - Move types to spore/types/ (NodeInfo, ApiTypes, Config) - Move internal components to spore/internal/ (Globals) - Update all #include statements to use new namespace paths - Update platformio.ini build filters for all environments - Update all example files to use new include paths - Maintain backward compatibility for public API - Improve code organization, maintainability, and scalability This reorganization follows modern C++ project structure patterns and provides clear separation between public API, internal implementation, and utilities. All examples compile successfully with the new structure.
This commit is contained in:
22
include/spore/services/NetworkService.h
Normal file
22
include/spore/services/NetworkService.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "spore/Service.h"
|
||||
#include "spore/core/NetworkManager.h"
|
||||
#include "spore/core/NodeContext.h"
|
||||
|
||||
class NetworkService : public Service {
|
||||
public:
|
||||
NetworkService(NetworkManager& networkManager);
|
||||
void registerEndpoints(ApiServer& api) override;
|
||||
const char* getName() const override { return "Network"; }
|
||||
|
||||
private:
|
||||
NetworkManager& networkManager;
|
||||
|
||||
// WiFi scanning endpoints
|
||||
void handleWifiScanRequest(AsyncWebServerRequest* request);
|
||||
void handleGetWifiNetworks(AsyncWebServerRequest* request);
|
||||
|
||||
// Network status endpoints
|
||||
void handleNetworkStatus(AsyncWebServerRequest* request);
|
||||
void handleSetWifiConfig(AsyncWebServerRequest* request);
|
||||
};
|
||||
Reference in New Issue
Block a user