76 std::vector<HostAppRecord>
apps;
157 bool contains_host_address(
const std::vector<HostRecord> &records, std::string_view normalizedAddress, uint16_t port = 0);
const char * to_string(ScreenId screen)
Return a display label for a screen identifier.
Definition client_state.cpp:1416
bool contains_host_address(const std::vector< HostRecord > &records, std::string_view normalizedAddress, uint16_t port)
Return whether a host list already contains an endpoint.
Definition host_records.cpp:385
bool try_parse_host_port(std::string_view portText, uint16_t *parsedPort)
Parse a user-supplied TCP port string.
Definition host_records.cpp:354
ParseHostRecordsResult parse_host_records(std::string_view serializedRecords)
Parse host records from the stable serialized text format.
Definition host_records.cpp:521
uint16_t effective_host_port(uint16_t port)
Return the effective TCP port for a host record.
Definition host_records.cpp:350
std::string serialize_host_records(const std::vector< HostRecord > &records)
Serialize host records into a stable tab-separated text format.
Definition host_records.cpp:494
bool is_valid_ipv4_address(std::string_view address)
Return whether a string is a valid IPv4 address.
Definition host_records.cpp:342
bool host_matches_endpoint(const HostRecord &host, std::string_view normalizedAddress, uint16_t port)
Return whether a host record matches a specific endpoint.
Definition host_records.cpp:392
std::string normalize_ipv4_address(std::string_view address)
Normalize a user-provided IPv4 address.
Definition host_records.cpp:320
std::string build_default_host_display_name(std::string_view normalizedAddress)
Build a controller-friendly default display name for a host.
Definition host_records.cpp:346
bool validate_host_record(const HostRecord &record, std::string *errorMessage)
Validate a host record before saving or serializing it.
Definition host_records.cpp:410
constexpr uint16_t DEFAULT_HOST_PORT
Default HTTP port used by Moonlight-compatible hosts.
Definition host_records.h:15
PairingState
Pairing state tracked for a saved host record.
Definition host_records.h:20
@ not_paired
The client has not completed pairing with the host.
@ paired
The client is paired and can issue authenticated requests.
HostReachability
Reachability state tracked for a discovered or saved host.
Definition host_records.h:28
@ offline
The host did not respond to the latest reachability check.
@ online
The host responded to the latest reachability check.
@ unknown
Reachability has not been probed yet.
HostAppListState
Fetch state for the per-host app library.
Definition host_records.h:37
@ failed
The latest app-list request failed.
@ loading
An app-list request is currently in progress.
@ ready
A recent app list is available for display.
@ idle
No app-list request is active and no fresh result is pending.
App metadata shown on the per-host apps page.
Definition host_records.h:47
std::string boxArtCacheKey
Cache key used to load box art from local storage.
Definition host_records.h:53
bool favorite
True when the app is pinned as a favorite locally.
Definition host_records.h:52
bool hidden
True when the app should be hidden from the default browse view.
Definition host_records.h:51
bool boxArtCached
True when the referenced box art is already cached on disk.
Definition host_records.h:54
std::string name
Display name reported by the host.
Definition host_records.h:48
bool running
True when the app is currently running on the host.
Definition host_records.h:55
bool hdrSupported
True when the app advertises HDR streaming support.
Definition host_records.h:50
Manual host record shown in the shell.
Definition host_records.h:61
std::string activeAddress
Best currently reachable address for live operations.
Definition host_records.h:67
std::string address
Stored primary IPv4 address for the host.
Definition host_records.h:63
std::string displayName
User-facing host label shown in the shell.
Definition host_records.h:62
std::string remoteAddress
Reported WAN address from the host status response.
Definition host_records.h:70
uint32_t lastAppListRefreshTick
Tick count for the most recent app list refresh.
Definition host_records.h:81
std::string uuid
Host UUID reported by Sunshine or GeForce Experience.
Definition host_records.h:68
PairingState pairingState
Current pairing state for this client.
Definition host_records.h:65
uint16_t resolvedHttpPort
Effective HTTP port confirmed by the latest status query.
Definition host_records.h:79
uint16_t port
Stored HTTP port override where zero means DEFAULT_HOST_PORT.
Definition host_records.h:64
HostAppListState appListState
Fetch state for the cached app list.
Definition host_records.h:77
std::string appListStatusMessage
User-visible status for the most recent app list operation.
Definition host_records.h:78
uint64_t appListContentHash
Stable hash of the last fetched app list contents.
Definition host_records.h:80
std::string macAddress
Reported MAC address for the host.
Definition host_records.h:73
HostReachability reachability
Most recent reachability probe result.
Definition host_records.h:66
std::string localAddress
Reported LAN address from the host status response.
Definition host_records.h:69
uint32_t runningGameId
Currently running app identifier, or zero when idle.
Definition host_records.h:75
uint16_t httpsPort
HTTPS port reported by the host for asset requests.
Definition host_records.h:74
std::string manualAddress
Original manually entered address, when different from address.
Definition host_records.h:72
std::vector< HostAppRecord > apps
Latest fetched app list for the host.
Definition host_records.h:76
std::string ipv6Address
Reported IPv6 address from the host status response.
Definition host_records.h:71
Result of parsing a serialized host record list.
Definition host_records.h:87
std::vector< std::string > errors
Non-fatal line-level parse or validation errors.
Definition host_records.h:89
std::vector< HostRecord > records
Parsed host records accepted from the serialized input.
Definition host_records.h:88