The Battle for Wesnoth  1.15.12+dev
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
mp::game_info Struct Reference

This class represents the info a client has about a game on the server. More...

#include <lobby_data.hpp>

Classes

struct  required_addon
 

Public Types

enum  disp_status { disp_status::CLEAN, disp_status::NEW, disp_status::UPDATED, disp_status::DELETED }
 
enum  addon_req { addon_req::SATISFIED, addon_req::NEED_DOWNLOAD, addon_req::CANNOT_SATISFY }
 

Public Member Functions

 game_info (const config &c, const std::vector< std::string > &installed_addons)
 
bool can_join () const
 
bool can_observe () const
 
addon_req check_addon_version_compatibility (const config &local_item, const config &game)
 
const char * display_status_string () const
 
bool match_string_filter (const std::string &filter) const
 

Public Attributes

int id
 
std::string map_data
 
std::string name
 
std::string scenario
 
std::string type_marker
 
bool remote_scenario
 
std::string map_info
 
std::string map_size_info
 
std::string era
 
std::vector< std::pair< std::string, bool > > mod_info
 List of modification names and whether they're installed or not. More...
 
std::string gold
 
std::string support
 
std::string xp
 
std::string vision
 
std::string status
 
std::string time_limit
 
std::size_t vacant_slots
 
unsigned int current_turn
 
bool reloaded
 
bool started
 
bool fog
 
bool shroud
 
bool observers
 
bool shuffle_sides
 
bool use_map_settings
 
bool private_replay
 
bool verified
 
bool password_required
 
bool have_era
 
bool have_all_mods
 
bool has_friends
 
bool has_ignored
 
disp_status display_status
 
std::vector< required_addonrequired_addons
 
addon_req addons_outcome
 

Detailed Description

This class represents the info a client has about a game on the server.

Definition at line 141 of file lobby_data.hpp.

Member Enumeration Documentation

◆ addon_req

Enumerator
SATISFIED 
NEED_DOWNLOAD 
CANNOT_SATISFY 

Definition at line 195 of file lobby_data.hpp.

◆ disp_status

Enumerator
CLEAN 
NEW 
UPDATED 
DELETED 

Definition at line 186 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ game_info()

mp::game_info::game_info ( const config c,
const std::vector< std::string > &  installed_addons 
)

Member Function Documentation

◆ can_join()

bool mp::game_info::can_join ( ) const

◆ can_observe()

bool mp::game_info::can_observe ( ) const

◆ check_addon_version_compatibility()

game_info::addon_req mp::game_info::check_addon_version_compatibility ( const config local_item,
const config game 
)

◆ display_status_string()

const char * mp::game_info::display_status_string ( ) const

Definition at line 549 of file lobby_data.cpp.

References CLEAN, DELETED, display_status, ERR_CF, NEW, and UPDATED.

Referenced by mp::do_notify().

◆ match_string_filter()

bool mp::game_info::match_string_filter ( const std::string &  filter) const

Member Data Documentation

◆ addons_outcome

addon_req mp::game_info::addons_outcome

Definition at line 204 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::enter_game(), and game_info().

◆ current_turn

unsigned int mp::game_info::current_turn

Definition at line 169 of file lobby_data.hpp.

Referenced by game_info().

◆ display_status

disp_status mp::game_info::display_status

◆ era

std::string mp::game_info::era

◆ fog

bool mp::game_info::fog

Definition at line 172 of file lobby_data.hpp.

Referenced by game_info().

◆ gold

std::string mp::game_info::gold

Definition at line 161 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ has_friends

bool mp::game_info::has_friends

◆ has_ignored

bool mp::game_info::has_ignored

◆ have_all_mods

bool mp::game_info::have_all_mods

Definition at line 181 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ have_era

bool mp::game_info::have_era

Definition at line 180 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ id

int mp::game_info::id

◆ map_data

std::string mp::game_info::map_data

Definition at line 149 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ map_info

std::string mp::game_info::map_info

Definition at line 154 of file lobby_data.hpp.

Referenced by game_info(), and match_string_filter().

◆ map_size_info

std::string mp::game_info::map_size_info

Definition at line 155 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ mod_info

std::vector<std::pair<std::string, bool> > mp::game_info::mod_info

List of modification names and whether they're installed or not.

Definition at line 159 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ name

std::string mp::game_info::name

◆ observers

bool mp::game_info::observers

◆ password_required

bool mp::game_info::password_required

◆ private_replay

bool mp::game_info::private_replay

Definition at line 177 of file lobby_data.hpp.

◆ reloaded

bool mp::game_info::reloaded

◆ remote_scenario

bool mp::game_info::remote_scenario

Definition at line 153 of file lobby_data.hpp.

Referenced by game_info().

◆ required_addons

std::vector<required_addon> mp::game_info::required_addons

◆ scenario

std::string mp::game_info::scenario

◆ shroud

bool mp::game_info::shroud

Definition at line 173 of file lobby_data.hpp.

Referenced by game_info().

◆ shuffle_sides

bool mp::game_info::shuffle_sides

Definition at line 175 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ started

bool mp::game_info::started

◆ status

std::string mp::game_info::status

Definition at line 165 of file lobby_data.hpp.

Referenced by game_info(), and gui2::dialogs::mp_lobby::make_game_row_data().

◆ support

std::string mp::game_info::support

Definition at line 162 of file lobby_data.hpp.

◆ time_limit

std::string mp::game_info::time_limit

Definition at line 166 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ type_marker

std::string mp::game_info::type_marker

Definition at line 152 of file lobby_data.hpp.

Referenced by game_info(), and gui2::dialogs::mp_lobby::make_game_row_data().

◆ use_map_settings

bool mp::game_info::use_map_settings

Definition at line 176 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ vacant_slots

std::size_t mp::game_info::vacant_slots

◆ verified

bool mp::game_info::verified

Definition at line 178 of file lobby_data.hpp.

Referenced by game_info().

◆ vision

std::string mp::game_info::vision

Definition at line 164 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ xp

std::string mp::game_info::xp

Definition at line 163 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().


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