# network_client.h

Go to the documentation of this file.

    00001 /* $Id: network_client.h 19624 2010-04-13 21:40:24Z 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_GAME_PASSWORD)(const char *password);
    00026 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMPANY_PASSWORD)(const char *password);
    00027 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_PASSWORD)(const char *password);
    00028 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_NAME)(const char *name);
    00029 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_ACK);
    00030 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command);
    00031 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_MOVE)(CompanyID company, const char *pass);
    00032
    00033 NetworkRecvStatus NetworkClient_ReadPackets(NetworkClientSocket *cs);
    00034 void NetworkClient_Connected();
    00035
    00036 extern CompanyID _network_join_as;
    00037
    00038 extern const char *_network_join_server_password;
    00039 extern const char *_network_join_company_password;
    00040
    00041 #endif /* ENABLE_NETWORK */
    00042
    00043 #endif /* NETWORK_CLIENT_H */