00001 /* $Id: multiplayer.hpp 26358 2008-05-03 13:51:13Z mordante $ */ 00002 /* 00003 Copyright (C) 2005 - 2008 Philippe Plantier <ayin@anathas.org> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License version 2 00008 or at your option any later version. 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY. 00011 00012 See the COPYING file for more details. 00013 */ 00014 #ifndef MULTIPLAYER_HPP_INCLUDED 00015 #define MULTIPLAYER_HPP_INCLUDED 00016 00017 #include "multiplayer_ui.hpp" 00018 00019 class config; 00020 class game_display; 00021 00022 namespace mp { 00023 00024 // max. length of a player name 00025 const size_t max_login_size = 18; 00026 00027 /* 00028 * This is the main entry points of multiplayer mode. 00029 */ 00030 00031 /** Starts a multiplayer game in server mode, or in single-user mode. 00032 * 00033 * @param disp The global display 00034 * @param game_config The global, top-level WML configuration for the game 00035 * @param default_controller The default controller type 00036 * @param is_server Whether to open a port to the outside, or not. 00037 */ 00038 void start_server(game_display& disp, const config& game_config, 00039 mp::controller default_controller, bool is_server); 00040 00041 /** Starts a multiplayer game in client mode. 00042 * 00043 * @param disp The global display 00044 * @param game_config The global, top-level WML configuration for the game 00045 * @param host The host to connect to. 00046 */ 00047 void start_client(game_display& disp, const config& game_config, 00048 const std::string host); 00049 00050 } 00051 #endif
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |