31 lines
628 B
C++
31 lines
628 B
C++
#pragma once
|
|
|
|
class NetworkHandler;
|
|
class WifiHandler;
|
|
|
|
/**
|
|
* @brief System context providing access to global system components
|
|
*/
|
|
class SystemContext {
|
|
public:
|
|
static SystemContext& instance() {
|
|
static SystemContext context;
|
|
return context;
|
|
}
|
|
|
|
void set_network_handler(NetworkHandler* handler) {
|
|
network_handler_ = handler;
|
|
}
|
|
|
|
NetworkHandler* get_network_handler() const {
|
|
return network_handler_;
|
|
}
|
|
|
|
private:
|
|
SystemContext() = default;
|
|
SystemContext(const SystemContext&) = delete;
|
|
SystemContext& operator=(const SystemContext&) = delete;
|
|
|
|
NetworkHandler* network_handler_ = nullptr;
|
|
};
|