ryu_ldn::config::ConfigManager
ryu_ldn::config::ConfigManager
Section titled “ryu_ldn::config::ConfigManager”Global configuration manager.
Singleton that manages runtime configuration with thread-safe access.
Members
Section titled “Members”m_config
Section titled “m_config”Type: Config
m_config_path
Section titled “m_config_path”Type: char
m_initialized
Section titled “m_initialized”Type: bool
m_dirty
Section titled “m_dirty”Type: bool
m_callback
Section titled “m_callback”Type: ConfigChangeCallback
Methods
Section titled “Methods”Instance
Section titled “Instance”& Instance()Get the singleton instance.
Returns: &
Methods
Section titled “Methods”Initialize
Section titled “Initialize”bool Initialize(const char * config_path)Initialize the config manager.
Loads configuration from disk. Should be called once at startup after filesystem is available.config_pathPath to config file (default: CONFIG_PATH)paramtrue if config loaded successfullyreturn
Parameters:
config_path(const char *)
Returns: bool
IsInitialized
Section titled “IsInitialized”bool IsInitialized()Check if initialized.
Returns: bool
GetConfig
Section titled “GetConfig”const& GetConfig()Get current configuration (read-only)
Returns: const&
ConfigResult Save()Save current configuration to disk.
ConfigResult indicating success or failurereturn
Returns: ConfigResult
Reload
Section titled “Reload”ConfigResult Reload()Reload configuration from disk.
Discards any unsaved changes.ConfigResult indicating success or failurereturn
Returns: ConfigResult
GetServerHost
Section titled “GetServerHost”const char * GetServerHost()Get server host.
Returns: const char *
SetServerHost
Section titled “SetServerHost”void SetServerHost(const char * host)Set server host.
hostNew hostname (max 128 chars)param
Parameters:
host(const char *)
GetServerPort
Section titled “GetServerPort”uint16_t GetServerPort()Get server port.
Returns: uint16_t
SetServerPort
Section titled “SetServerPort”void SetServerPort(uint16_t port)Set server port.
Parameters:
port(uint16_t)
GetUseTls
Section titled “GetUseTls”bool GetUseTls()Get TLS enabled state.
Returns: bool
SetUseTls
Section titled “SetUseTls”void SetUseTls(bool enabled)Set TLS enabled state.
Parameters:
enabled(bool)
GetConnectTimeout
Section titled “GetConnectTimeout”uint32_t GetConnectTimeout()Get connection timeout (ms)
Returns: uint32_t
SetConnectTimeout
Section titled “SetConnectTimeout”void SetConnectTimeout(uint32_t timeout_ms)Set connection timeout (ms)
Parameters:
timeout_ms(uint32_t)
GetPingInterval
Section titled “GetPingInterval”uint32_t GetPingInterval()Get ping interval (ms)
Returns: uint32_t
SetPingInterval
Section titled “SetPingInterval”void SetPingInterval(uint32_t interval_ms)Set ping interval (ms)
Parameters:
interval_ms(uint32_t)
GetReconnectDelay
Section titled “GetReconnectDelay”uint32_t GetReconnectDelay()Get reconnect delay (ms)
Returns: uint32_t
SetReconnectDelay
Section titled “SetReconnectDelay”void SetReconnectDelay(uint32_t delay_ms)Set reconnect delay (ms)
Parameters:
delay_ms(uint32_t)
GetMaxReconnectAttempts
Section titled “GetMaxReconnectAttempts”uint32_t GetMaxReconnectAttempts()Get max reconnect attempts.
Returns: uint32_t
SetMaxReconnectAttempts
Section titled “SetMaxReconnectAttempts”void SetMaxReconnectAttempts(uint32_t attempts)Set max reconnect attempts (0 = infinite)
Parameters:
attempts(uint32_t)
GetLdnEnabled
Section titled “GetLdnEnabled”bool GetLdnEnabled()Get LDN enabled state.
Returns: bool
SetLdnEnabled
Section titled “SetLdnEnabled”void SetLdnEnabled(bool enabled)Set LDN enabled state.
Parameters:
enabled(bool)
GetPassphrase
Section titled “GetPassphrase”const char * GetPassphrase()Get passphrase.
Returns: const char *
SetPassphrase
Section titled “SetPassphrase”bool SetPassphrase(const char * passphrase)Set passphrase.
Passphrase must match format: Ryujinx-[0-9a-f]{8} Empty or nullptr clears the passphrase (allowed).passphraseNew passphraseparamtrue if set successfully, false if invalid formatreturn
Parameters:
passphrase(const char *)
Returns: bool
GetInterfaceName
Section titled “GetInterfaceName”const char * GetInterfaceName()Get network interface name.
Returns: const char *
SetInterfaceName
Section titled “SetInterfaceName”void SetInterfaceName(const char * name)Set network interface name.
nameInterface name (empty = auto-detect)param
Parameters:
name(const char *)
GetDebugEnabled
Section titled “GetDebugEnabled”bool GetDebugEnabled()Get debug enabled state.
Returns: bool
SetDebugEnabled
Section titled “SetDebugEnabled”void SetDebugEnabled(bool enabled)Set debug enabled state.
Parameters:
enabled(bool)
GetDebugLevel
Section titled “GetDebugLevel”uint32_t GetDebugLevel()Get debug log level.
Returns: uint32_t
SetDebugLevel
Section titled “SetDebugLevel”void SetDebugLevel(uint32_t level)Set debug log level (0-3)
Parameters:
level(uint32_t)
GetLogToFile
Section titled “GetLogToFile”bool GetLogToFile()Get log to file state.
Returns: bool
SetLogToFile
Section titled “SetLogToFile”void SetLogToFile(bool enabled)Set log to file state.
Parameters:
enabled(bool)
SetChangeCallback
Section titled “SetChangeCallback”void SetChangeCallback(ConfigChangeCallback callback)Set callback for configuration changes.
callbackFunction to call when config changes (nullptr to clear)param
Parameters:
callback(ConfigChangeCallback)
HasUnsavedChanges
Section titled “HasUnsavedChanges”bool HasUnsavedChanges()Check if config has unsaved changes.
Returns: bool
Methods
Section titled “Methods”ConfigManager
Section titled “ConfigManager”void ConfigManager()~ConfigManager
Section titled “~ConfigManager”void ~ConfigManager()ConfigManager
Section titled “ConfigManager”void ConfigManager(const&)Parameters:
param(const&)
operator=
Section titled “operator=”& operator=(const&)Parameters:
param(const&)
Returns: &
NotifyChange
Section titled “NotifyChange”void NotifyChange(const char * section)Parameters:
section(const char *)