network_gamelist.h File Reference

Handling of the list of games. More...

#include "core/address.h"
#include "network_type.h"

Go to the source code of this file.

Data Structures

struct  NetworkGameList
 Structure with information shown in the game list (GUI). More...

Functions

void NetworkGameListAddItemDelayed (NetworkGameList *item)
 Add a new item to the linked gamelist, but do it delayed in the next tick or so to prevent race conditions.
NetworkGameListNetworkGameListAddItem (NetworkAddress address)
 Add a new item to the linked gamelist.
void NetworkGameListRemoveItem (NetworkGameList *remove)
 Remove an item from the gamelist linked list.
void NetworkGameListRequery ()
 Requeries the (game) servers we have not gotten a reply from.

Variables

NetworkGameList_network_game_list
 Game list of this client.

Detailed Description

Handling of the list of games.

Definition in file network_gamelist.h.


Function Documentation

NetworkGameList* NetworkGameListAddItem ( NetworkAddress  address  ) 

Add a new item to the linked gamelist.

If the IP and Port match return the existing item instead of adding it again

Parameters:
address the address of the to-be added item
Returns:
a point to the newly added or already existing item

Definition at line 79 of file network_gamelist.cpp.

References NetworkGameList::address, DEBUG, NetworkAddress::GetHostname(), NetworkGameList::next, StrEmpty(), and UpdateNetworkGameWindow().

Referenced by NetworkGameListHandleDelayedInsert(), NetworkGameWindow::OnClick(), and ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE().

void NetworkGameListAddItemDelayed ( NetworkGameList item  ) 

Add a new item to the linked gamelist, but do it delayed in the next tick or so to prevent race conditions.

Parameters:
item the item to add. Will be freed once added.

Definition at line 38 of file network_gamelist.cpp.

References ThreadMutex::BeginCritical(), ThreadMutex::EndCritical(), and NetworkGameList::next.

Referenced by NetworkUDPQueryServerThread().

void NetworkGameListRemoveItem ( NetworkGameList remove  ) 

Remove an item from the gamelist linked list.

Parameters:
remove pointer to the item to be removed

Definition at line 118 of file network_gamelist.cpp.

References ClearGRFConfigList(), DEBUG, NetworkGameList::next, and UpdateNetworkGameWindow().

Referenced by NetworkGameWindow::OnKeyPress().


Generated on Sun Jun 5 04:20:11 2011 for OpenTTD by  doxygen 1.6.1