Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
app::HostsState Struct Reference

State owned by the saved-host browser and retained host snapshot. More...

#include <src/app/client_state.h>

Collaboration diagram for app::HostsState:
[legend]

Public Member Functions

HostRecordback ()
 Return the last saved host.
 
const HostRecordback () const
 Return the last saved host.
 
auto begin ()
 Return an iterator to the first saved host.
 
auto begin () const
 Return a const iterator to the first saved host.
 
void clear ()
 Remove every saved host from the collection.
 
bool empty () const
 Return whether the saved-host collection is empty.
 
auto end ()
 Return an iterator one past the last saved host.
 
auto end () const
 Return a const iterator one past the last saved host.
 
HostRecordfront ()
 Return the first saved host.
 
const HostRecordfront () const
 Return the first saved host.
 
HostRecordoperator[] (std::size_t index)
 Return the saved host at the requested index.
 
const HostRecordoperator[] (std::size_t index) const
 Return the saved host at the requested index.
 
std::size_t size () const
 Return the number of saved hosts currently tracked by the shell.
 

Public Attributes

HostRecord active
 Host snapshot kept for host-specific non-host screens after unloading the hosts page.
 
bool activeLoaded = false
 True when active contains a valid host snapshot.
 
bool dirty = false
 True when the host list changed and should be saved.
 
HostsFocusArea focusArea = HostsFocusArea::toolbar
 Focused region on the hosts page.
 
std::vector< HostRecorditems
 Saved hosts currently tracked by the shell.
 
bool loaded = false
 True when the hosts page list is currently loaded in memory.
 
std::vector< std::string > pairingResetEndpoints
 Endpoints whose pairing material should be cleared during reset.
 
std::string selectedAddress
 Last selected host address used to restore hosts-page selection after reload.
 
std::size_t selectedHostIndex = 0U
 Zero-based selection inside the saved host list.
 
uint16_t selectedPort = 0
 Last selected host port override used to restore hosts-page selection after reload.
 
std::size_t selectedToolbarButtonIndex = 0U
 Zero-based selection inside the hosts toolbar.
 

Detailed Description

State owned by the saved-host browser and retained host snapshot.

Member Function Documentation

◆ back() [1/2]

HostRecord & app::HostsState::back ( )
inline

Return the last saved host.

Returns
Reference to the last host record.

◆ back() [2/2]

const HostRecord & app::HostsState::back ( ) const
inline

Return the last saved host.

Returns
Const reference to the last host record.

◆ begin() [1/2]

auto app::HostsState::begin ( )
inline

Return an iterator to the first saved host.

Returns
Mutable iterator to the first element.

◆ begin() [2/2]

auto app::HostsState::begin ( ) const
inline

Return a const iterator to the first saved host.

Returns
Const iterator to the first element.

◆ empty()

bool app::HostsState::empty ( ) const
inline

Return whether the saved-host collection is empty.

Returns
True when no saved hosts are currently loaded.

◆ end() [1/2]

auto app::HostsState::end ( )
inline

Return an iterator one past the last saved host.

Returns
Mutable iterator to the end of the collection.

◆ end() [2/2]

auto app::HostsState::end ( ) const
inline

Return a const iterator one past the last saved host.

Returns
Const iterator to the end of the collection.

◆ front() [1/2]

HostRecord & app::HostsState::front ( )
inline

Return the first saved host.

Returns
Reference to the first host record.

◆ front() [2/2]

const HostRecord & app::HostsState::front ( ) const
inline

Return the first saved host.

Returns
Const reference to the first host record.

◆ operator[]() [1/2]

HostRecord & app::HostsState::operator[] ( std::size_t index)
inline

Return the saved host at the requested index.

Parameters
indexZero-based host index.
Returns
Reference to the host record at index.

◆ operator[]() [2/2]

const HostRecord & app::HostsState::operator[] ( std::size_t index) const
inline

Return the saved host at the requested index.

Parameters
indexZero-based host index.
Returns
Const reference to the host record at index.

◆ size()

std::size_t app::HostsState::size ( ) const
inline

Return the number of saved hosts currently tracked by the shell.

Returns
Number of host records stored in the collection.

The documentation for this struct was generated from the following file: