2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file network_gui.h GUIs related to networking. */
|
|
|
|
|
2006-09-01 15:35:43 +02:00
|
|
|
#ifndef NETWORK_GUI_H
|
|
|
|
#define NETWORK_GUI_H
|
|
|
|
|
2010-01-15 17:41:15 +01:00
|
|
|
#include "../company_type.h"
|
2023-04-24 20:33:18 +02:00
|
|
|
#include "../timer/timer_game_calendar.h"
|
2010-01-15 17:41:15 +01:00
|
|
|
#include "../economy_type.h"
|
2008-05-30 20:20:26 +02:00
|
|
|
#include "../window_type.h"
|
|
|
|
#include "network_type.h"
|
2021-04-26 20:04:02 +02:00
|
|
|
#include "network_gamelist.h"
|
2006-10-12 16:59:27 +02:00
|
|
|
|
2024-03-14 21:08:21 +01:00
|
|
|
void ShowNetworkNeedPassword(NetworkPasswordType npt, std::shared_ptr<class NetworkAuthenticationPasswordRequest> request);
|
2007-04-26 09:41:24 +02:00
|
|
|
void ShowNetworkChatQueryWindow(DestType type, int dest);
|
2007-03-07 12:47:46 +01:00
|
|
|
void ShowJoinStatusWindow();
|
|
|
|
void ShowNetworkGameWindow();
|
|
|
|
void ShowClientList();
|
2008-05-15 21:24:15 +02:00
|
|
|
void ShowNetworkCompanyPasswordWindow(Window *parent);
|
2021-08-18 12:06:14 +02:00
|
|
|
void ShowNetworkAskRelay(const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token);
|
2023-04-25 19:43:45 +02:00
|
|
|
void ShowNetworkAskSurvey();
|
|
|
|
void ShowSurveyResultTextfileWindow();
|
2008-12-22 19:40:57 +01:00
|
|
|
|
|
|
|
/** Company information stored at the client side */
|
|
|
|
struct NetworkCompanyInfo : NetworkCompanyStats {
|
2021-05-14 17:43:23 +02:00
|
|
|
std::string company_name; ///< Company name
|
2023-04-24 20:33:18 +02:00
|
|
|
TimerGameCalendar::Year inaugurated_year; ///< What year the company started in
|
2021-05-14 17:43:23 +02:00
|
|
|
Money company_value; ///< The company value
|
|
|
|
Money money; ///< The amount of money the company has
|
|
|
|
Money income; ///< How much did the company earn last year
|
2023-05-08 19:01:06 +02:00
|
|
|
uint16_t performance; ///< What was his performance last month?
|
2021-05-14 17:43:23 +02:00
|
|
|
bool use_password; ///< Is there a password
|
|
|
|
std::string clients; ///< The clients that control this company (Name1, name2, ..)
|
2008-12-22 19:40:57 +01:00
|
|
|
};
|
|
|
|
|
2023-10-13 13:59:30 +02:00
|
|
|
enum NetworkRelayWindowCloseData {
|
|
|
|
NRWCD_UNHANDLED = 0, ///< Relay request is unhandled.
|
|
|
|
NRWCD_HANDLED = 1, ///< Relay request is handled, either by user or by timeout.
|
|
|
|
};
|
2008-12-22 19:40:57 +01:00
|
|
|
|
2006-09-28 20:42:35 +02:00
|
|
|
#endif /* NETWORK_GUI_H */
|