OpenTTD Source 20241224-master-gf74b0cf984
network_gamelist.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10#ifndef NETWORK_GAMELIST_H
11#define NETWORK_GAMELIST_H
12
13#include "core/address.h"
14#include "core/network_game_info.h"
15#include "network_type.h"
16
25
38
41
42NetworkGameList *NetworkGameListAddItem(const std::string &connection_string);
45
46#endif /* NETWORK_GAMELIST_H */
Wrapper for network addresses.
NetworkGameListStatus
The status a server can be in.
@ NGLS_ONLINE
Server is online.
@ NGLS_FULL
Server is full and cannot be queried.
@ NGLS_TOO_OLD
Server is too old to query.
@ NGLS_OFFLINE
Server is offline (or cannot be queried).
@ NGLS_BANNED
You are banned from this server.
void NetworkGameListRemoveExpired()
Remove all servers that have not recently been updated.
void NetworkGameListRemoveItem(NetworkGameList *remove)
Remove an item from the gamelist linked list.
int _network_game_list_version
Current version of all items in the list.
NetworkGameList * NetworkGameListAddItem(const std::string &connection_string)
Add a new item to the linked gamelist.
NetworkGameList * _network_game_list
Game list of this client.
Types used for networking.
The game information that is sent from the server to the clients with extra information only required...
Structure with information shown in the game list (GUI)
int version
Used to see which servers are no longer available on the Game Coordinator and can be removed.
std::string connection_string
Address of the server.
bool refreshing
Whether this server is being queried.
bool manually
True if the server was added manually.
NetworkGameList * next
Next pointer to make a linked game list.
NetworkGameListStatus status
Stats of the server.
NetworkGameInfo info
The game information of this server.