Compare commits
1
Commits
317cef3782
...
95454f9d83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95454f9d83 |
@@ -17,8 +17,9 @@ namespace Echoion::Api
|
||||
|
||||
using ConfigChangedCallback = std::function<void(const AppConfig&)>;
|
||||
|
||||
// Get singleton instance
|
||||
static ConfigManager& instance();
|
||||
// Owned by Core and provided through the service registry — no
|
||||
// global singleton.
|
||||
ConfigManager() = default;
|
||||
|
||||
// Delete copy/move
|
||||
ConfigManager(const ConfigManager&) = delete;
|
||||
@@ -78,9 +79,6 @@ namespace Echoion::Api
|
||||
|
||||
private:
|
||||
|
||||
ConfigManager() = default;
|
||||
~ConfigManager() = default;
|
||||
|
||||
mutable std::shared_mutex mutex_;
|
||||
AppConfig config_;
|
||||
std::filesystem::path configPath_;
|
||||
@@ -95,17 +93,4 @@ namespace Echoion::Api
|
||||
|
||||
} // namespace Echoion::Api
|
||||
|
||||
// Convenience macros for accessing config
|
||||
#define ECHOION_CONFIG (::Echoion::Api::ConfigManager::instance().getConfig())
|
||||
#define ECHOION_BOT (::Echoion::Api::ConfigManager::instance().getBot())
|
||||
#define ECHOION_YOUTUBE (::Echoion::Api::ConfigManager::instance().getYouTube())
|
||||
#define ECHOION_NETWORK (::Echoion::Api::ConfigManager::instance().getNetwork())
|
||||
#define ECHOION_TEAMSPEAK \
|
||||
(::Echoion::Api::ConfigManager::instance().getTeamSpeak())
|
||||
#define ECHOION_SECURITY \
|
||||
(::Echoion::Api::ConfigManager::instance().getSecurity())
|
||||
#define ECHOION_FEATURES \
|
||||
(::Echoion::Api::ConfigManager::instance().getFeatures())
|
||||
#define ECHOION_ADVANCED \
|
||||
(::Echoion::Api::ConfigManager::instance().getAdvanced())
|
||||
#endif
|
||||
Reference in new issue
Block a user