Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
host_storage.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard includes
8#include <string>
9#include <vector>
10
11// local includes
13
14namespace startup {
15
20 std::vector<app::HostRecord> hosts;
21 std::vector<std::string> warnings;
22 bool fileFound;
23 };
24
29 bool success;
30 std::string errorMessage;
31 };
32
38 std::string default_host_storage_path();
39
47
56 const std::vector<app::HostRecord> &hosts,
57 const std::string &filePath = default_host_storage_path()
58 );
59
60} // namespace startup
Declares host record models and utilities.
SaveSavedHostsResult save_saved_hosts(const std::vector< app::HostRecord > &hosts, const std::string &filePath)
Save the current saved host records to disk.
Definition host_storage.cpp:71
std::string default_host_storage_path()
Return the default path used for saved host storage.
Definition host_storage.cpp:43
LoadSavedHostsResult load_saved_hosts(const std::string &filePath)
Load saved host records from disk.
Definition host_storage.cpp:47
Result of loading persisted saved hosts from disk.
Definition host_storage.h:19
std::vector< std::string > warnings
Non-fatal warnings encountered while loading.
Definition host_storage.h:21
std::vector< app::HostRecord > hosts
Loaded saved host records.
Definition host_storage.h:20
bool fileFound
True when the host storage file existed.
Definition host_storage.h:22
Result of saving the current saved-host list to disk.
Definition host_storage.h:28
bool success
True when the host list was saved successfully.
Definition host_storage.h:29
std::string errorMessage
Error detail when saving failed.
Definition host_storage.h:30