The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Enumerations | Functions | Variables
mp Namespace Reference

Pubic entry points for the MP workflow. More...

Classes

struct  chat_message
 This class represents a single stored chat message. More...
 
class  chat_session
 this class memorizes a chat session. More...
 
struct  game_info
 This class represents the info a client has about a game on the server. More...
 
class  lobby_info
 This class represents the collective information the client has about the players and games on the server. More...
 
class  room_info
 This class represents the information a client has about a room. More...
 
struct  user_info
 This class represents the information a client has about another player. More...
 

Enumerations

enum  notify_mode {
  NOTIFY_NONE, NOTIFY_MESSAGE, NOTIFY_MESSAGE_OTHER_WINDOW, NOTIFY_SERVER_MESSAGE,
  NOTIFY_OWN_NICK, NOTIFY_FRIEND_MESSAGE, NOTIFY_WHISPER, NOTIFY_WHISPER_OTHER_WINDOW,
  NOTIFY_LOBBY_JOIN, NOTIFY_LOBBY_QUIT, NOTIFY_COUNT
}
 

Functions

static std::string make_short_name (const std::string &long_name)
 
void do_notify (notify_mode mode, const std::string &sender, const std::string &message)
 
void do_notify (notify_mode mode)
 
static void add_multiplayer_classification (config &multiplayer, saved_game &state)
 
config initial_level_config (saved_game &state)
 
void level_to_gamestate (const config &level, saved_game &state)
 
void check_response (bool res, const config &data)
 
void start_client (CVideo &video, const config &game_config, saved_game &state, const std::string &host)
 Starts a multiplayer game in client mode. More...
 
bool goto_mp_connect (CVideo &video, ng::connect_engine &engine, const config &game_config, wesnothd_connection *connection)
 Opens mp::connect screen and sets game state according to the changes made. More...
 
bool goto_mp_wait (CVideo &video, saved_game &state, const config &game_config, wesnothd_connection *connection, bool observe)
 Opens mp::wait screen and sets game state according to the changes made. More...
 
void start_local_game (CVideo &video, const config &game_config, saved_game &state)
 Starts a multiplayer game in single-user mode. More...
 
void start_local_game_commandline (CVideo &video, const config &game_config, saved_game &state, const commandline_options &cmdline_opts)
 Starts a multiplayer game in single-user mode. More...
 

Variables

const size_t max_login_size = 20
 

Detailed Description

Pubic entry points for the MP workflow.

Enumeration Type Documentation

Enumerator
NOTIFY_NONE 
NOTIFY_MESSAGE 
NOTIFY_MESSAGE_OTHER_WINDOW 
NOTIFY_SERVER_MESSAGE 
NOTIFY_OWN_NICK 
NOTIFY_FRIEND_MESSAGE 
NOTIFY_WHISPER 
NOTIFY_WHISPER_OTHER_WINDOW 
NOTIFY_LOBBY_JOIN 
NOTIFY_LOBBY_QUIT 
NOTIFY_COUNT 

Definition at line 120 of file lobby_info.hpp.

Function Documentation

static void mp::add_multiplayer_classification ( config multiplayer,
saved_game state 
)
static
void mp::check_response ( bool  res,
const config data 
)

Definition at line 133 of file mp_game_utils.cpp.

References _(), config::child(), and lg::err().

Referenced by gui2::dialogs::mp_join_game::fetch_game_config().

void mp::do_notify ( notify_mode  mode,
const std::string &  sender,
const std::string &  message 
)
void mp::do_notify ( notify_mode  mode)
inline

Definition at line 135 of file lobby_info.hpp.

References do_notify().

bool mp::goto_mp_connect ( CVideo video,
ng::connect_engine engine,
const config game_config,
wesnothd_connection connection 
)

Opens mp::connect screen and sets game state according to the changes made.

Definition at line 576 of file multiplayer.cpp.

Referenced by campaign_controller::play_game().

bool mp::goto_mp_wait ( CVideo video,
saved_game state,
const config game_config,
wesnothd_connection connection,
bool  observe 
)

Opens mp::wait screen and sets game state according to the changes made.

Definition at line 584 of file multiplayer.cpp.

References gui2::dialogs::mp_join_game::fetch_game_config(), gui2::dialogs::modal_dialog::show(), and gui2::dialogs::mp_join_game::started().

Referenced by campaign_controller::play_game().

config mp::initial_level_config ( saved_game state)
void mp::level_to_gamestate ( const config level,
saved_game state 
)
static std::string mp::make_short_name ( const std::string &  long_name)
static

Definition at line 151 of file lobby_data.cpp.

Referenced by mp::game_info::game_info().

void mp::start_client ( CVideo video,
const config game_config,
saved_game state,
const std::string &  host 
)
void mp::start_local_game ( CVideo video,
const config game_config,
saved_game state 
)

Starts a multiplayer game in single-user mode.

Parameters
videoThe global display
game_configThe global, top-level WML configuration for the game

Definition at line 601 of file multiplayer.cpp.

References DBG_MP, enter_create_mode(), and preferences::set_message_private().

Referenced by game_launcher::play_multiplayer().

void mp::start_local_game_commandline ( CVideo video,
const config game_config,
saved_game state,
const commandline_options cmdline_opts 
)

Variable Documentation

const size_t mp::max_login_size = 20

Definition at line 28 of file multiplayer.hpp.

Referenced by gui2::dialogs::mp_method_selection::pre_show().