network_gui.h

Go to the documentation of this file.
00001 /* $Id: network_gui.h 17699 2009-10-04 20:00:56Z 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 "../window_type.h"
00016 #include "network_type.h"
00017 
00018 #ifdef ENABLE_NETWORK
00019 
00020 void ShowNetworkNeedPassword(NetworkPasswordType npt);
00021 void ShowNetworkGiveMoneyWindow(CompanyID company);
00022 void ShowNetworkChatQueryWindow(DestType type, int dest);
00023 void ShowJoinStatusWindow();
00024 void ShowNetworkGameWindow();
00025 void ShowClientList();
00026 void ShowNetworkCompanyPasswordWindow(Window *parent);
00027 
00028 
00030 struct NetworkCompanyInfo : NetworkCompanyStats {
00031   char company_name[NETWORK_COMPANY_NAME_LENGTH]; 
00032   Year inaugurated_year;                          
00033   Money company_value;                            
00034   Money money;                                    
00035   Money income;                                   
00036   uint16 performance;                             
00037   bool use_password;                              
00038   char clients[NETWORK_CLIENTS_LENGTH];           
00039 };
00040 
00041 NetworkCompanyInfo *GetLobbyCompanyInfo(CompanyID company);
00042 
00043 #else /* ENABLE_NETWORK */
00044 /* Network function stubs when networking is disabled */
00045 
00046 static inline void ShowNetworkChatQueryWindow(byte desttype, int dest) {}
00047 static inline void ShowClientList() {}
00048 static inline void ShowNetworkGameWindow() {}
00049 static inline void ShowNetworkCompanyPasswordWindow(Window *parent) {}
00050 
00051 #endif /* ENABLE_NETWORK */
00052 
00053 #endif /* NETWORK_GUI_H */

Generated on Wed Dec 23 23:27:51 2009 for OpenTTD by  doxygen 1.5.6