src/network/network_gamelist.h
author truebrain
Fri, 18 Jul 2008 10:15:16 +0000
branchnoai
changeset 11168 3842648184cd
parent 10829 8a0ec0f0f928
permissions -rw-r--r--
(svn r13726) [NoAI] -Add: AIVehicle::ReverseVehicle (Yexo)
/* $Id$ */

/** @file network_gamelist.h Handling of the list of games. */

#ifndef NETWORK_GAMELIST_H
#define NETWORK_GAMELIST_H

#include "network_type.h"

/** Structure with information shown in the game list (GUI) */
struct NetworkGameList {
	NetworkGameInfo info;  ///< The game information of this server
	uint32 ip;             ///< The IP of the game server
	uint16 port;           ///< The port of the game server
	bool online;           ///< False if the server did not respond (default status)
	bool manually;         ///< True if the server was added manually
	uint8 retries;         ///< Number of retries (to stop requerying)
	NetworkGameList *next; ///< Next pointer to make a linked game list
};

/** Game list of this client */
extern NetworkGameList *_network_game_list;

NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port);
void NetworkGameListRemoveItem(NetworkGameList *remove);
void NetworkGameListRequery();

#endif /* NETWORK_GAMELIST_H */