4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file network_gamelist.h Handling of the list of games. */
12 #ifndef NETWORK_GAMELIST_H
13 #define NETWORK_GAMELIST_H
15 #include "core/address.h"
16 #include "network_type.h"
18 /** Structure with information shown in the game list (GUI) */
19 struct NetworkGameList
{
20 NetworkGameInfo info
; ///< The game information of this server
21 NetworkAddress address
; ///< The connection info of the game server
22 bool online
; ///< False if the server did not respond (default status)
23 bool manually
; ///< True if the server was added manually
24 uint8 retries
; ///< Number of retries (to stop requerying)
25 NetworkGameList
*next
; ///< Next pointer to make a linked game list
28 /** Game list of this client */
29 extern NetworkGameList
*_network_game_list
;
31 void NetworkGameListAddItemDelayed(NetworkGameList
*item
);
32 NetworkGameList
*NetworkGameListAddItem(NetworkAddress address
);
33 void NetworkGameListRemoveItem(NetworkGameList
*remove
);
34 void NetworkGameListRequery();
36 #endif /* NETWORK_GAMELIST_H */