# network_gui.h

Go to the documentation of this file.

    00001 /* $Id: network_gui.h 18809 2010-01-15 16:41:15Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef NETWORK_GUI_H
    00013 #define NETWORK_GUI_H
    00014
    00015 #include "../company_type.h"
    00016 #include "../economy_type.h"
    00017 #include "../window_type.h"
    00018 #include "network_type.h"
    00019
    00020 #ifdef ENABLE_NETWORK
    00021
    00022 void ShowNetworkNeedPassword(NetworkPasswordType npt);
    00023 void ShowNetworkGiveMoneyWindow(CompanyID company);
    00024 void ShowNetworkChatQueryWindow(DestType type, int dest);
    00025 void ShowJoinStatusWindow();
    00026 void ShowNetworkGameWindow();
    00027 void ShowClientList();
    00028 void ShowNetworkCompanyPasswordWindow(Window *parent);
    00029
    00030
    00032 struct NetworkCompanyInfo : NetworkCompanyStats {
    00033   char company_name[NETWORK_COMPANY_NAME_LENGTH];
    00034   Year inaugurated_year;
    00035   Money company_value;
    00036   Money money;
    00037   Money income;
    00038   uint16 performance;
    00039   bool use_password;
    00040   char clients[NETWORK_CLIENTS_LENGTH];
    00041 };
    00042
    00043 NetworkCompanyInfo *GetLobbyCompanyInfo(CompanyID company);
    00044
    00045 #else /* ENABLE_NETWORK */
    00046 /* Network function stubs when networking is disabled */
    00047
    00048 static inline void ShowNetworkChatQueryWindow(byte desttype, int dest) {}
    00049 static inline void ShowClientList() {}
    00050 static inline void ShowNetworkGameWindow() {}
    00051 static inline void ShowNetworkCompanyPasswordWindow(Window *parent) {}
    00052
    00053 #endif /* ENABLE_NETWORK */
    00054
    00055 #endif /* NETWORK_GUI_H */