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

Declares saved host persistence. More...

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

Go to the source code of this file.

Classes

struct  startup::LoadSavedHostsResult
 Result of loading persisted saved hosts from disk. More...
 
struct  startup::SaveSavedHostsResult
 Result of saving the current saved-host list to disk. More...
 

Functions

std::string startup::default_host_storage_path ()
 Return the default path used for saved host storage.
 
LoadSavedHostsResult startup::load_saved_hosts (const std::string &filePath=default_host_storage_path())
 Load saved host records from disk.
 
SaveSavedHostsResult startup::save_saved_hosts (const std::vector< app::HostRecord > &hosts, const std::string &filePath=default_host_storage_path())
 Save the current saved host records to disk.
 

Detailed Description

Declares saved host persistence.

Function Documentation

◆ default_host_storage_path()

std::string startup::default_host_storage_path ( )

Return the default path used for saved host storage.

Returns
Default saved-host storage path.

◆ load_saved_hosts()

LoadSavedHostsResult startup::load_saved_hosts ( const std::string & filePath = default_host_storage_path())

Load saved host records from disk.

Parameters
filePathStorage file to load.
Returns
Loaded hosts plus any non-fatal warnings.

◆ save_saved_hosts()

SaveSavedHostsResult startup::save_saved_hosts ( const std::vector< app::HostRecord > & hosts,
const std::string & filePath = default_host_storage_path() )

Save the current saved host records to disk.

Parameters
hostsSaved host records to persist.
filePathStorage file to write.
Returns
Save result including success state and error detail.