OpenTTD
|
Handling of the list of games. More...
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. | |
NetworkGameList * | NetworkGameListAddItem (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. |
Handling of the list of games.
Definition in file network_gamelist.h.
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
address | the address of the to-be added item |
Definition at line 80 of file network_gamelist.cpp.
References NetworkGameList::address, DEBUG, NetworkAddress::GetHostname(), NetworkGameList::next, StrEmpty(), and UpdateNetworkGameWindow().
Referenced by NetworkGameListHandleDelayedInsert(), 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.
item | the item to add. Will be freed once added. |
Definition at line 39 of file network_gamelist.cpp.
References _network_game_delayed_insertion_list, ThreadMutex::BeginCritical(), ThreadMutex::EndCritical(), and NetworkGameList::next.
Referenced by NetworkUDPQueryServer().
void NetworkGameListRemoveItem | ( | NetworkGameList * | remove | ) |
Remove an item from the gamelist linked list.
remove | pointer to the item to be removed |
Definition at line 119 of file network_gamelist.cpp.
References ClearGRFConfigList(), DEBUG, free(), NetworkGameList::next, and UpdateNetworkGameWindow().
Referenced by NetworkGameWindow::OnKeyPress().