| 1 | /* |
| 2 | * Copyright (C) 2008 Pelish ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef INCLUDED_ANONGAME_WOL_TYPES |
| 20 | #define INCLUDED_ANONGAME_WOL_TYPES |
| 21 | |
| 22 | #ifdef ANONGAME_WOL_INTERNAL_ACCESS |
| 23 | |
| 24 | #ifndef JUST_NEED_TYPES |
| 25 | # define JUST_NEED_TYPES |
| 26 | # include "connection.h" |
| 27 | # undef JUST_NEED_TYPES |
| 28 | #endif |
| 29 | |
| 30 | #define MATCHTAG_ADDRESS "ADR" |
| 31 | #define MATCHTAG_PORT "PRT" |
| 32 | #define MATCHTAG_COUNTRY "COU" |
| 33 | #define MATCHTAG_COLOUR "COL" |
| 34 | #define MATCHTAG_MATCHRESOLUTION "MBR" |
| 35 | #define MATCHTAG_LOCATION "LOC" |
| 36 | #define MATCHTAG_SCREENRESOLUTION "RES" |
| 37 | |
| 38 | #define RAL2_CHANNEL_FFA "Lob 38 0" |
| 39 | #define YURI_CHANNEL_FFA "Lob 40 0" |
| 40 | #define YURI_CHANNEL_COOP "Lob 39 0" |
| 41 | |
| 42 | #endif |
| 43 | |
| 44 | namespace pvpgn |
| 45 | { |
| 46 | |
| 47 | namespace bnetd |
| 48 | { |
| 49 | |
| 50 | typedef struct anongame_wol_player |
| 51 | #ifdef ANONGAME_WOL_INTERNAL_ACCESS |
| 52 | { |
| 53 | t_connection * conn; |
| 54 | |
| 55 | /* Red Alert 2 and Yuri's Revnenge */ |
| 56 | int address; |
| 57 | int port; |
| 58 | int country; |
| 59 | int colour; |
| 60 | } |
| 61 | #endif |
| 62 | t_anongame_wol_player; |
| 63 | |
| 64 | } |
| 65 | |
| 66 | } |
| 67 | |
| 68 | #endif |
| 69 | |
| 70 | /*******/ |
| 71 | #ifndef JUST_NEED_TYPES |
| 72 | #ifndef INCLUDED_ANONGAME_WOL_PROTOS |
| 73 | #define INCLUDED_ANONGAME_WOL_PROTOS |
| 74 | |
| 75 | #define JUST_NEED_TYPES |
| 76 | # include "connection.h" |
| 77 | #undef JUST_NEED_TYPES |
| 78 | |
| 79 | namespace pvpgn |
| 80 | { |
| 81 | |
| 82 | namespace bnetd |
| 83 | { |
| 84 | |
| 85 | extern int anongame_wol_matchlist_create(void); |
| 86 | extern int anongame_wol_matchlist_destroy(void); |
| 87 | |
| 88 | extern int anongame_wol_destroy(t_connection * conn); |
| 89 | extern int anongame_wol_privmsg(t_connection * conn, int numparams, char ** params, char * text); |
| 90 | |
| 91 | } |
| 92 | |
| 93 | } |
| 94 | |
| 95 | #endif |
| 96 | #endif |
| 97 |