Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
settings_storage.h File Reference

Declares application settings persistence. More...

#include <string>
#include <vector>
#include "src/app/client_state.h"
Include dependency graph for settings_storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  app::AppSettings
 Persisted Moonlight user settings stored in TOML. More...
 
struct  app::LoadAppSettingsResult
 Result of loading the persisted Moonlight settings file. More...
 
struct  app::SaveAppSettingsResult
 Result of saving the persisted Moonlight settings file. More...
 

Functions

std::string app::default_settings_path ()
 Return the default path used for the persisted Moonlight settings file.
 
LoadAppSettingsResult app::load_app_settings (const std::string &filePath=default_settings_path())
 Load the persisted Moonlight settings file.
 
SaveAppSettingsResult app::save_app_settings (const AppSettings &settings, const std::string &filePath=default_settings_path())
 Save the persisted Moonlight settings file.
 

Detailed Description

Declares application settings persistence.

Function Documentation

◆ default_settings_path()

std::string app::default_settings_path ( )

Return the default path used for the persisted Moonlight settings file.

Returns
Default TOML settings file path.

◆ load_app_settings()

LoadAppSettingsResult app::load_app_settings ( const std::string & filePath = default_settings_path())

Load the persisted Moonlight settings file.

Parameters
filePathSettings file to read.
Returns
Loaded settings plus any non-fatal warnings.

◆ save_app_settings()

SaveAppSettingsResult app::save_app_settings ( const AppSettings & settings,
const std::string & filePath = default_settings_path() )

Save the persisted Moonlight settings file.

Parameters
settingsSettings snapshot to write.
filePathSettings file to write.
Returns
Save result including success state and error detail.