| 1 | /* |
| 2 | * Copyright (C) 1998 Mark Baysinger ([email protected]) |
| 3 | * Copyright (C) 1998,1999,2000 Ross Combs ([email protected]) |
| 4 | * Copyright (C) 2004 CreepLord ([email protected]) |
| 5 | * Copyright (C) 2007 Pelish ([email protected]) |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version 2 |
| 10 | * of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | #ifndef INCLUDED_TAG_TYPEScxx . . $ `src/common/tag.h:22:9`! |
| 22 | #define INCLUDED_TAG_TYPEScxx . . $ `src/common/tag.h:22:9`! |
| 23 | |
| 24 | #include <cstdint> |
| 25 | #include <string> |
| 26 | |
| 27 | namespace pvpgncxx . . $ pvpgn/ |
| 28 | { |
| 29 | using t_tagcxx . . $ pvpgn/t_tag# = stdcxx . . $ std/::uint32_tcxx . . $ std/uint32_t#; |
| 30 | using t_archtagcxx . . $ pvpgn/t_archtag# = t_tagcxx . . $ pvpgn/t_tag#; |
| 31 | using t_clienttagcxx . . $ pvpgn/t_clienttag# = t_tagcxx . . $ pvpgn/t_tag#; |
| 32 | using t_gamelangcxx . . $ pvpgn/t_gamelang# = t_tagcxx . . $ pvpgn/t_tag#; |
| 33 | } |
| 34 | |
| 35 | typedef enumcxx . . $ $anonymous_type_18c57069f9271145_0# { |
| 36 | tag_wol_locale_unknowncxx . . $ tag_wol_locale_unknown. = 0, |
| 37 | tag_wol_locale_othercxx . . $ tag_wol_locale_other. = 1, |
| 38 | tag_wol_locale_usacxx . . $ tag_wol_locale_usa. = 2, |
| 39 | tag_wol_locale_canadacxx . . $ tag_wol_locale_canada. = 3, |
| 40 | tag_wol_locale_ukcxx . . $ tag_wol_locale_uk. = 4, |
| 41 | tag_wol_locale_germanycxx . . $ tag_wol_locale_germany. = 5, |
| 42 | tag_wol_locale_francecxx . . $ tag_wol_locale_france. = 6, |
| 43 | tag_wol_locale_spaincxx . . $ tag_wol_locale_spain. = 7, |
| 44 | tag_wol_locale_netherlandscxx . . $ tag_wol_locale_netherlands. = 8, |
| 45 | tag_wol_locale_belgiumcxx . . $ tag_wol_locale_belgium. = 9, |
| 46 | tag_wol_locale_austriacxx . . $ tag_wol_locale_austria. = 10, |
| 47 | tag_wol_locale_switzerlandcxx . . $ tag_wol_locale_switzerland. = 11, |
| 48 | tag_wol_locale_italycxx . . $ tag_wol_locale_italy. = 12, |
| 49 | tag_wol_locale_denmarkcxx . . $ tag_wol_locale_denmark. = 13, |
| 50 | tag_wol_locale_swedencxx . . $ tag_wol_locale_sweden. = 14, |
| 51 | tag_wol_locale_norwaycxx . . $ tag_wol_locale_norway. = 15, |
| 52 | tag_wol_locale_finlandcxx . . $ tag_wol_locale_finland. = 16, |
| 53 | tag_wol_locale_israelcxx . . $ tag_wol_locale_israel. = 17, |
| 54 | tag_wol_locale_south_africacxx . . $ tag_wol_locale_south_africa. = 18, |
| 55 | tag_wol_locale_japancxx . . $ tag_wol_locale_japan. = 19, |
| 56 | tag_wol_locale_south_koreacxx . . $ tag_wol_locale_south_korea. = 20, |
| 57 | tag_wol_locale_chinacxx . . $ tag_wol_locale_china. = 21, |
| 58 | tag_wol_locale_singaporecxx . . $ tag_wol_locale_singapore. = 22, |
| 59 | tag_wol_locale_taiwancxx . . $ tag_wol_locale_taiwan. = 23, |
| 60 | tag_wol_locale_malaysiacxx . . $ tag_wol_locale_malaysia. = 24, |
| 61 | tag_wol_locale_australiacxx . . $ tag_wol_locale_australia. = 25, |
| 62 | tag_wol_locale_new_zealandcxx . . $ tag_wol_locale_new_zealand. = 26, |
| 63 | tag_wol_locale_brazilcxx . . $ tag_wol_locale_brazil. = 27, |
| 64 | tag_wol_locale_thailandcxx . . $ tag_wol_locale_thailand. = 28, |
| 65 | tag_wol_locale_argentinacxx . . $ tag_wol_locale_argentina. = 29, |
| 66 | tag_wol_locale_philippinescxx . . $ tag_wol_locale_philippines. = 30, |
| 67 | tag_wol_locale_greececxx . . $ tag_wol_locale_greece. = 31, |
| 68 | tag_wol_locale_irelandcxx . . $ tag_wol_locale_ireland. = 32, |
| 69 | tag_wol_locale_polandcxx . . $ tag_wol_locale_poland. = 33, |
| 70 | tag_wol_locale_portugalcxx . . $ tag_wol_locale_portugal. = 34, |
| 71 | tag_wol_locale_mexicocxx . . $ tag_wol_locale_mexico. = 35, |
| 72 | tag_wol_locale_russiacxx . . $ tag_wol_locale_russia. = 36, |
| 73 | tag_wol_locale_turkeycxx . . $ tag_wol_locale_turkey. = 37 |
| 74 | } t_tag_wol_localecxx . . $ t_tag_wol_locale#; |
| 75 | |
| 76 | #endif |
| 77 | |
| 78 | /*****/ |
| 79 | #ifndef JUST_NEED_TYPEScxx . . $ `src/common/packet.h:36:10`! |
| 80 | #ifndef INCLUDED_TAG_PROTOS |
| 81 | #define INCLUDED_TAG_PROTOScxx . . $ `src/common/tag.h:81:9`! |
| 82 | |
| 83 | /* Software tags */ |
| 84 | #define CLIENTTAG_BNCHATBOTcxx . . $ `src/common/tag.h:84:9`! "CHAT" /* CHAT bot */ |
| 85 | #define CLIENTTAG_BNCHATBOT_UINTcxx . . $ `src/common/tag.h:85:9`! 0x43484154 |
| 86 | #define CLIENTTAG_STARCRAFTcxx . . $ `src/common/tag.h:86:9`! "STAR" /* Starcraft (original) */ |
| 87 | #define CLIENTTAG_STARCRAFT_UINTcxx . . $ `src/common/tag.h:87:9`! 0x53544152 |
| 88 | #define CLIENTTAG_BROODWARScxx . . $ `src/common/tag.h:88:9`! "SEXP" /* Starcraft EXpansion Pack */ |
| 89 | #define CLIENTTAG_BROODWARS_UINTcxx . . $ `src/common/tag.h:89:9`! 0x53455850 |
| 90 | #define CLIENTTAG_SHAREWAREcxx . . $ `src/common/tag.h:90:9`! "SSHR" /* Starcraft Shareware */ |
| 91 | #define CLIENTTAG_SHAREWARE_UINTcxx . . $ `src/common/tag.h:91:9`! 0x53534852 |
| 92 | #define CLIENTTAG_DIABLORTLcxx . . $ `src/common/tag.h:92:9`! "DRTL" /* Diablo ReTaiL */ |
| 93 | #define CLIENTTAG_DIABLORTL_UINTcxx . . $ `src/common/tag.h:93:9`! 0x4452544C |
| 94 | #define CLIENTTAG_DIABLOSHRcxx . . $ `src/common/tag.h:94:9`! "DSHR" /* Diablo SHaReware */ |
| 95 | #define CLIENTTAG_DIABLOSHR_UINTcxx . . $ `src/common/tag.h:95:9`! 0x44534852 |
| 96 | #define CLIENTTAG_WARCIIBNEcxx . . $ `src/common/tag.h:96:9`! "W2BN" /* WarCraft II Battle.net Edition */ |
| 97 | #define CLIENTTAG_WARCIIBNE_UINTcxx . . $ `src/common/tag.h:97:9`! 0x5732424E |
| 98 | #define CLIENTTAG_DIABLO2DVcxx . . $ `src/common/tag.h:98:9`! "D2DV" /* Diablo II Diablo's Victory */ |
| 99 | #define CLIENTTAG_DIABLO2DV_UINTcxx . . $ `src/common/tag.h:99:9`! 0x44324456 |
| 100 | #define CLIENTTAG_STARJAPANcxx . . $ `src/common/tag.h:100:9`! "JSTR" /* Starcraft (Japan) */ |
| 101 | #define CLIENTTAG_STARJAPAN_UINTcxx . . $ `src/common/tag.h:101:9`! 0x4A535452 |
| 102 | #define CLIENTTAG_DIABLO2STcxx . . $ `src/common/tag.h:102:9`! "D2ST" /* Diablo II Stress Test */ |
| 103 | #define CLIENTTAG_DIABLO2ST_UINTcxx . . $ `src/common/tag.h:103:9`! 0x44325354 |
| 104 | #define CLIENTTAG_DIABLO2XPcxx . . $ `src/common/tag.h:104:9`! "D2XP" /* Diablo II Extension Pack */ |
| 105 | #define CLIENTTAG_DIABLO2XP_UINTcxx . . $ `src/common/tag.h:105:9`! 0x44325850 |
| 106 | /* FIXME: according to FSGS: |
| 107 | SJPN==Starcraft (Japanese) |
| 108 | SSJP==Starcraft (Japanese,Spawn) |
| 109 | */ |
| 110 | #define CLIENTTAG_WARCRAFT3cxx . . $ `src/common/tag.h:110:9`! "WAR3" /* WarCraft III */ |
| 111 | #define CLIENTTAG_WARCRAFT3_UINTcxx . . $ `src/common/tag.h:111:9`! 0x57415233 |
| 112 | #define CLIENTTAG_WAR3XPcxx . . $ `src/common/tag.h:112:9`! "W3XP" /* WarCraft III Expansion */ |
| 113 | #define CLIENTTAG_WAR3XP_UINTcxx . . $ `src/common/tag.h:113:9`! 0x57335850 |
| 114 | |
| 115 | #define CLIENTTAG_IIRCcxx . . $ `src/common/tag.h:115:9`! "IIRC"/* IRC */ |
| 116 | #define CLIENTTAG_IIRC_UINTcxx . . $ `src/common/tag.h:116:9`! 0x49495243 |
| 117 | |
| 118 | /* Westwood Online tags: */ |
| 119 | #define CLIENTTAG_WCHATcxx . . $ `src/common/tag.h:119:9`! "WCHT" /* Westwood Chat */ |
| 120 | #define CLIENTTAG_WCHAT_UINTcxx . . $ `src/common/tag.h:120:9`! 0x57434854 |
| 121 | #define CLIENTTAG_TIBERNSUNcxx . . $ `src/common/tag.h:121:9`! "TSUN" /* Tiberian Sun */ |
| 122 | #define CLIENTTAG_TIBERNSUN_UINTcxx . . $ `src/common/tag.h:122:9`! 0x5453554E |
| 123 | #define CLIENTTAG_TIBSUNXPcxx . . $ `src/common/tag.h:123:9`! "TSXP" /* Tiberian Sun Extension Pack */ |
| 124 | #define CLIENTTAG_TIBSUNXP_UINTcxx . . $ `src/common/tag.h:124:9`! 0x54535850 |
| 125 | #define CLIENTTAG_REDALERTcxx . . $ `src/common/tag.h:125:9`! "RALT" /* Red Alert 1 */ |
| 126 | #define CLIENTTAG_REDALERT_UINTcxx . . $ `src/common/tag.h:126:9`! 0x52414C54 |
| 127 | #define CLIENTTAG_REDALERT2cxx . . $ `src/common/tag.h:127:9`! "RAL2" /* Red Alert 2 */ |
| 128 | #define CLIENTTAG_REDALERT2_UINTcxx . . $ `src/common/tag.h:128:9`! 0x52414C32 |
| 129 | #define CLIENTTAG_DUNE2000cxx . . $ `src/common/tag.h:129:9`! "DN2K" /* Dune 2000 */ |
| 130 | #define CLIENTTAG_DUNE2000_UINTcxx . . $ `src/common/tag.h:130:9`! 0x444E324B |
| 131 | #define CLIENTTAG_NOXcxx . . $ `src/common/tag.h:131:9`! "NOXX" /* NOX */ |
| 132 | #define CLIENTTAG_NOX_UINTcxx . . $ `src/common/tag.h:132:9`! 0x4E4F5858 |
| 133 | #define CLIENTTAG_NOXQUESTcxx . . $ `src/common/tag.h:133:9`! "NOXQ" /* NOX Quest*/ |
| 134 | #define CLIENTTAG_NOXQUEST_UINTcxx . . $ `src/common/tag.h:134:9`! 0x4E4F5851 |
| 135 | #define CLIENTTAG_RENEGADEcxx . . $ `src/common/tag.h:135:9`! "RNGD" /* Renegade */ |
| 136 | #define CLIENTTAG_RENEGADE_UINTcxx . . $ `src/common/tag.h:136:9`! 0x524E4744 |
| 137 | #define CLIENTTAG_RENGDFDScxx . . $ `src/common/tag.h:137:9`! "RFDS" /* Renegade Free Dedicated Server */ |
| 138 | #define CLIENTTAG_RENGDFDS_UINTcxx . . $ `src/common/tag.h:138:9`! 0x52464453 |
| 139 | #define CLIENTTAG_YURISREVcxx . . $ `src/common/tag.h:139:9`! "YURI" /* Yuri's Revenge */ |
| 140 | #define CLIENTTAG_YURISREV_UINTcxx . . $ `src/common/tag.h:140:9`! 0x59555249 |
| 141 | #define CLIENTTAG_EMPERORBDcxx . . $ `src/common/tag.h:141:9`! "EBFD" /* Emperor: Battle for Dune */ |
| 142 | #define CLIENTTAG_EMPERORBD_UINTcxx . . $ `src/common/tag.h:142:9`! 0x45424644 |
| 143 | #define CLIENTTAG_LOFLORE3cxx . . $ `src/common/tag.h:143:9`! "LOR3" /* Lands of Lore 3 */ |
| 144 | #define CLIENTTAG_LOFLORE3_UINTcxx . . $ `src/common/tag.h:144:9`! 0x4C4F5233 |
| 145 | #define CLIENTTAG_WWOLcxx . . $ `src/common/tag.h:145:9`! "WWOL" /* Other Westwood Online games */ |
| 146 | #define CLIENTTAG_WWOL_UINTcxx . . $ `src/common/tag.h:146:9`! 0x57574F4C |
| 147 | |
| 148 | /* BNETD-specific software tags - we try to use lowercase to avoid collisions */ |
| 149 | #define CLIENTTAG_FREECRAFTcxx . . $ `src/common/tag.h:149:9`! "free" /* FreeCraft http://www.freecraft.com/ */ |
| 150 | |
| 151 | #define CLIENTTAG_UNKNOWNcxx . . $ `src/common/tag.h:151:9`! "UNKN" |
| 152 | #define CLIENTTAG_UNKNOWN_UINTcxx . . $ `src/common/tag.h:152:9`! 0x554E4B4E |
| 153 | |
| 154 | /* Architecture tags */ |
| 155 | #define ARCHTAG_WINX86cxx . . $ `src/common/tag.h:155:9`! "IX86" /* MS Windows on Intel x86 */ |
| 156 | #define ARCHTAG_MACPPCcxx . . $ `src/common/tag.h:156:9`! "PMAC" /* MacOS on PowerPC */ |
| 157 | #define ARCHTAG_OSXPPCcxx . . $ `src/common/tag.h:157:9`! "XMAC" /* MacOS X on PowerPC */ |
| 158 | |
| 159 | #define ARCHTAG_WINX86_UINTcxx . . $ `src/common/tag.h:159:9`! 0x49583836 /* IX86 */ |
| 160 | #define ARCHTAG_MACPPC_UINTcxx . . $ `src/common/tag.h:160:9`! 0x504D4143 /* PMAC */ |
| 161 | #define ARCHTAG_OSXPPC_UINTcxx . . $ `src/common/tag.h:161:9`! 0x584D4143 /* XMAC */ |
| 162 | |
| 163 | /* game languages */ |
| 164 | #define GAMELANG_ENGLISH_UINTcxx . . $ `src/common/tag.h:164:9`! 0x656E5553 /* enUS */ |
| 165 | #define GAMELANG_GERMAN_UINTcxx . . $ `src/common/tag.h:165:9`! 0x64654445 /* deDE */ |
| 166 | #define GAMELANG_CZECH_UINTcxx . . $ `src/common/tag.h:166:9`! 0x6373435A /* csCZ */ |
| 167 | #define GAMELANG_SPANISH_UINTcxx . . $ `src/common/tag.h:167:9`! 0x65734553 /* esES */ |
| 168 | #define GAMELANG_FRENCH_UINTcxx . . $ `src/common/tag.h:168:9`! 0x66724652 /* frFR */ |
| 169 | #define GAMELANG_ITALIAN_UINTcxx . . $ `src/common/tag.h:169:9`! 0x69744954 /* itIT */ |
| 170 | #define GAMELANG_JAPANESE_UINTcxx . . $ `src/common/tag.h:170:9`! 0x6A614A41 /* jaJA */ |
| 171 | #define GAMELANG_KOREAN_UINTcxx . . $ `src/common/tag.h:171:9`! 0x6B6F4B52 /* koKR */ |
| 172 | #define GAMELANG_POLISH_UINTcxx . . $ `src/common/tag.h:172:9`! 0x706C504C /* plPL */ |
| 173 | #define GAMELANG_RUSSIAN_UINTcxx . . $ `src/common/tag.h:173:9`! 0x72755255 /* ruRU */ |
| 174 | #define GAMELANG_CHINESE_S_UINTcxx . . $ `src/common/tag.h:174:9`! 0x7A68434E /* zhCN */ |
| 175 | #define GAMELANG_CHINESE_T_UINTcxx . . $ `src/common/tag.h:175:9`! 0x7A685457 /* zhTW */ |
| 176 | |
| 177 | #define TAG_UNKNOWN_UINTcxx . . $ `src/common/tag.h:177:9`! 0x554E4B4E /* UNKN */ |
| 178 | #define TAG_UNKNOWNcxx . . $ `src/common/tag.h:178:9`! "UNKN" |
| 179 | |
| 180 | /* Server tag */ |
| 181 | #define BNETTAGcxx . . $ `src/common/tag.h:181:9`! "bnet" /* Battle.net */ |
| 182 | |
| 183 | /* Filetype tags (note these are "backwards") */ |
| 184 | #define EXTENSIONTAG_PCXcxx . . $ `src/common/tag.h:184:9`! "xcp." |
| 185 | #define EXTENSIONTAG_SMKcxx . . $ `src/common/tag.h:185:9`! "kms." |
| 186 | #define EXTENSIONTAG_MNGcxx . . $ `src/common/tag.h:186:9`! "gnm." |
| 187 | |
| 188 | namespace pvpgncxx . . $ pvpgn/ |
| 189 | { |
| 190 | |
| 191 | extern t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag_str_to_uintcxx . . $ pvpgn/clienttag_str_to_uint(c61c63047ce273de).(char const * clienttag); |
| 192 | extern char const * clienttag_uint_to_strcxx . . $ pvpgn/clienttag_uint_to_str(81a3ae90da26a711).(t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag); |
| 193 | extern char const * clienttag_get_titlecxx . . $ pvpgn/clienttag_get_title(81a3ae90da26a711).(t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag); |
| 194 | |
| 195 | extern t_tagcxx . . $ pvpgn/t_tag# tag_str_to_uintcxx . . $ pvpgn/tag_str_to_uint(c61c63047ce273de).(char const * tag_str); |
| 196 | extern t_tagcxx . . $ pvpgn/t_tag# tag_case_str_to_uintcxx . . $ pvpgn/tag_case_str_to_uint(c61c63047ce273de).(char const * tag_str); |
| 197 | extern const char * tag_uint_to_strcxx . . $ pvpgn/tag_uint_to_str(d172961b102a89a5).(char * tag_str, t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 198 | extern stdcxx . . $ std/::stringcxx . . $ std/string# tag_uint_to_str2cxx . . $ pvpgn/tag_uint_to_str2(8297fed3afd4179b).(t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 199 | extern const char * tag_uint_to_revstrcxx . . $ pvpgn/tag_uint_to_revstr(d172961b102a89a5).(char * tag_str, t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 200 | extern int tag_check_archcxx . . $ pvpgn/tag_check_arch(4c679297bf94b9eb).(t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 201 | extern int tag_check_clientcxx . . $ pvpgn/tag_check_client(4c679297bf94b9eb).(t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 202 | extern int tag_check_wolv1cxx . . $ pvpgn/tag_check_wolv1(4c679297bf94b9eb).(t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 203 | extern int tag_check_wolv2cxx . . $ pvpgn/tag_check_wolv2(4c679297bf94b9eb).(t_tagcxx . . $ pvpgn/t_tag# tag_uint); |
| 204 | extern int tag_check_in_listcxx . . $ pvpgn/tag_check_in_list(dbfc9165c1ea8dea).(t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, const char * list); |
| 205 | extern t_clienttagcxx . . $ pvpgn/t_clienttag# tag_sku_to_uintcxx . . $ pvpgn/tag_sku_to_uint(46cc46841198e427).(int sku); |
| 206 | extern t_clienttagcxx . . $ pvpgn/t_clienttag# tag_channeltype_to_uintcxx . . $ pvpgn/tag_channeltype_to_uint(46cc46841198e427).(int channeltype); |
| 207 | extern t_tagcxx . . $ pvpgn/t_tag# tag_wol_locale_to_uintcxx . . $ pvpgn/tag_wol_locale_to_uint(46cc46841198e427).(int locale); |
| 208 | extern t_clienttagcxx . . $ pvpgn/t_clienttag# tag_validate_clientcxx . . $ pvpgn/tag_validate_client(c61c63047ce273de).(char const * client); |
| 209 | } |
| 210 | |
| 211 | #endif |
| 212 | #endif |