# network_client.h

Go to the documentation of this file.

    00001 /* $Id$ */
    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 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO);
    00018 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO);
    00019 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp);
    00020 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_ERROR)(NetworkErrorCode errorno);
    00021 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_QUIT)();
    00022 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_CHAT)(NetworkAction action, DestType desttype, int dest, const char *msg, int64 data);
    00023 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_PASSWORD)(NetworkPasswordType type, const char *password);
    00024 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_PASSWORD)(const char *password);
    00025 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_SET_NAME)(const char *name);
    00026 DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_ACK);
    00027 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command);
    00028 DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_MOVE)(CompanyID company, const char *pass);
    00029
    00030 NetworkRecvStatus NetworkClient_ReadPackets(NetworkClientSocket *cs);
    00031 void NetworkClient_Connected();
    00032
    00033 extern CompanyID _network_join_as;
    00034
    00035 extern const char *_network_join_server_password;
    00036 extern const char *_network_join_company_password;
    00037
    00038 #endif /* ENABLE_NETWORK */
    00039
    00040 #endif /* NETWORK_CLIENT_H */