network_client.h

Go to the documentation of this file.
00001 /* $Id: network_client.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_CLIENT_H
00013 #define NETWORK_CLIENT_H
00014 
00015 #ifdef ENABLE_NETWORK
00016 
00017 #include "network_internal.h"
00018 
00019 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO);
00020 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO);
00021 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp);
00022 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_ERROR)(NetworkErrorCode errorno);
00023 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_QUIT)();
00024 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_CHAT)(NetworkAction action, DestType desttype, int dest, const char *msg, int64 data);
00025 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_PASSWORD)(NetworkPasswordType type, const char *password);
00026 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_PASSWORD)(const char *password);
00027 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_NAME)(const char *name);
00028 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_ACK);
00029 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command);
00030 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_MOVE)(CompanyID company, const char *pass);
00031 
00032 NetworkRecvStatus NetworkClient_ReadPackets(NetworkClientSocket *cs);
00033 void NetworkClient_Connected();
00034 
00035 extern CompanyID _network_join_as;
00036 
00037 extern const char *_network_join_server_password;
00038 extern const char *_network_join_company_password;
00039 
00040 #endif /* ENABLE_NETWORK */
00041 
00042 #endif /* NETWORK_CLIENT_H */

Generated on Wed Mar 3 23:32:22 2010 for OpenTTD by  doxygen 1.6.1