anongame_infos.h
上传用户:tany51
上传日期:2013-06-12
资源大小:1397k
文件大小:6k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /*
  2.  * This program is free software; you can redistribute it and/or
  3.  * modify it under the terms of the GNU General Public License
  4.  * as published by the Free Software Foundation; either version 2
  5.  * of the License, or (at your option) any later version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful,
  8.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.  * GNU General Public License for more details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License
  13.  * along with this program; if not, write to the Free Software
  14.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  15.  */
  16. #ifndef INCLUDED_ANONGAME_INFOS_TYPES
  17. #define INCLUDED_ANONGAME_INFOS_TYPES
  18. #ifdef JUST_NEED_TYPES
  19. #include "common/list.h"
  20. #else
  21. #define JUST_NEED_TYPES
  22. #include "common/list.h"
  23. #undef JUST_NEED_TYPES
  24. #endif
  25. typedef struct {
  26. char * server_URL;
  27. char * player_URL;
  28. char * tourney_URL;
  29. char * ladder_PG_1v1_URL;
  30. char * ladder_PG_ffa_URL;
  31. char * ladder_PG_team_URL;
  32. char * ladder_AT_2v2_URL;
  33. char * ladder_AT_3v3_URL;
  34. char * ladder_AT_4v4_URL;
  35. } t_anongame_infos_URL;
  36. typedef struct {
  37. char * langID;
  38. char * ladder_PG_1v1_desc;
  39. char * ladder_PG_ffa_desc;
  40. char * ladder_PG_team_desc;
  41. char * ladder_AT_2v2_desc;
  42. char * ladder_AT_3v3_desc;
  43. char * ladder_AT_4v4_desc;
  44. char * gametype_1v1_short;
  45. char * gametype_1v1_long;
  46. char * gametype_2v2_short;
  47. char * gametype_2v2_long;
  48. char * gametype_3v3_short;
  49. char * gametype_3v3_long;
  50. char * gametype_4v4_short;
  51. char * gametype_4v4_long;
  52. char * gametype_ffa_short;
  53. char * gametype_ffa_long;
  54. char * gametype_2v2v2_short;
  55. char * gametype_2v2v2_long;
  56. char * gametype_sffa_short;
  57. char * gametype_sffa_long;
  58. char * gametype_tffa_short;
  59. char * gametype_tffa_long;
  60. char * gametype_3v3v3_short;
  61. char * gametype_3v3v3_long;
  62. char * gametype_4v4v4_short;
  63. char * gametype_4v4v4_long;
  64. char * gametype_2v2v2v2_short;
  65. char * gametype_2v2v2v2_long;
  66. char * gametype_3v3v3v3_short;
  67. char * gametype_3v3v3v3_long;
  68. char * gametype_5v5_short;
  69. char * gametype_5v5_long;
  70. char * gametype_6v6_short;
  71. char * gametype_6v6_long;
  72. } t_anongame_infos_DESC;
  73. typedef struct {
  74. char PG_1v1;
  75. char PG_2v2;
  76. char PG_3v3;
  77. char PG_4v4;
  78. char PG_ffa;
  79. char AT_2v2;
  80. char AT_3v3;
  81. char AT_4v4;
  82. char PG_2v2v2;
  83. char AT_ffa;
  84. char PG_5v5;
  85. char PG_6v6;
  86. char PG_3v3v3;
  87. char PG_4v4v4;
  88. char PG_2v2v2v2;
  89. char PG_3v3v3v3;
  90. char AT_2v2v2;
  91. } t_anongame_infos_THUMBSDOWN;
  92. typedef struct {
  93. int Level1;
  94. int Level2;
  95. int Level3;
  96. int Level4;
  97. } t_anongame_infos_ICON_REQ_WAR3;
  98. typedef struct {
  99. int Level1;
  100. int Level2;
  101. int Level3;
  102. int Level4;
  103. int Level5;
  104. } t_anongame_infos_ICON_REQ_W3XP;
  105. typedef struct {
  106. int Level1;
  107. int Level2;
  108. int Level3;
  109. int Level4;
  110. int Level5;
  111. } t_anongame_infos_ICON_REQ_TOURNEY;
  112. typedef struct {
  113. char * langID;
  114. char * desc_data;
  115. char * ladr_data;
  116. char * desc_comp_data;
  117. char * ladr_comp_data;
  118. int desc_len;
  119. int ladr_len;
  120. int desc_comp_len;
  121. int ladr_comp_len;
  122. } t_anongame_infos_data_lang;
  123. typedef struct {
  124. char * langID;
  125. char * url_data;
  126. char * map_data;
  127. char * type_data;
  128. char * desc_data;
  129. char * ladr_data;
  130. char * url_comp_data;
  131. char * map_comp_data;
  132. char * type_comp_data;
  133. char * desc_comp_data;
  134. char * ladr_comp_data;
  135. int url_len;
  136. int map_len;
  137. int type_len;
  138. int desc_len;
  139. int ladr_len;
  140. int url_comp_len;
  141. int map_comp_len;
  142. int type_comp_len;
  143. int desc_comp_len;
  144. int ladr_comp_len;
  145. } t_anongame_infos_data;
  146. typedef struct {
  147. t_anongame_infos_URL * anongame_infos_URL;
  148. t_anongame_infos_DESC * anongame_infos_DESC; // for default DESC
  149. t_list * anongame_infos_DESC_list; // for localized DESC's
  150. t_anongame_infos_THUMBSDOWN * anongame_infos_THUMBSDOWN; // for storing thumbs down config
  151. t_anongame_infos_ICON_REQ_WAR3 * anongame_infos_ICON_REQ_WAR3;
  152. t_anongame_infos_ICON_REQ_W3XP * anongame_infos_ICON_REQ_W3XP;
  153. t_anongame_infos_ICON_REQ_TOURNEY * anongame_infos_ICON_REQ_TOURNEY;
  154. t_anongame_infos_data * anongame_infos_data_war3;
  155. t_anongame_infos_data * anongame_infos_data_w3xp;
  156. t_list * anongame_infos_data_lang_war3;
  157. t_list * anongame_infos_data_lang_w3xp;
  158. } t_anongame_infos;
  159. #endif
  160. #ifndef JUST_NEED_TYPES
  161. #ifndef INCLUDED_ANONGAME_INFOS_PROTOS
  162. #define INCLUDED_ANONGAME_INFOS_PROTOS
  163. extern int anongame_infos_load(char const * filename);
  164. extern int anongame_infos_unload(void);
  165. extern char * anongame_infos_URL_get_server_url(void);
  166. extern char * anongame_infos_URL_get_player_url(void);
  167. extern char * anongame_infos_URL_get_tourney_url(void);
  168. extern char * anongame_infos_URL_get_ladder_PG_1v1_url(void);
  169. extern char * anongame_infos_URL_get_ladder_PG_ffa_url(void);
  170. extern char * anongame_infos_URL_get_ladder_PG_team_url(void);
  171. extern char * anongame_infos_URL_get_ladder_AT_2v2_url(void);
  172. extern char * anongame_infos_URL_get_ladder_AT_3v3_url(void);
  173. extern char * anongame_infos_URL_get_ladder_AT_4v4_url(void);
  174. extern char * anongame_infos_DESC_get_ladder_PG_1v1_desc(char * langID);
  175. extern char * anongame_infos_DESC_get_ladder_PG_ffa_desc(char * langID);
  176. extern char * anongame_infos_DESC_get_ladder_PG_team_desc(char * langID);
  177. extern char * anongame_infos_DESC_get_ladder_AT_2v2_desc(char * langID);
  178. extern char * anongame_infos_DESC_get_ladder_AT_3v3_desc(char * langID);
  179. extern char * anongame_infos_DESC_get_ladder_AT_4v4_desc(char * langID);
  180. extern char * anongame_infos_get_short_desc(char * langID, int queue);
  181. extern char * anongame_infos_get_long_desc(char * langID, int queue);
  182. extern char anongame_infos_get_thumbsdown(int queue);
  183. extern short anongame_infos_get_ICON_REQ_WAR3(int Level);
  184. extern short anongame_infos_get_ICON_REQ_W3XP(int Level);
  185. extern short anongame_infos_get_ICON_REQ_TOURNEY(int Level);
  186. extern char * anongame_infos_data_get_url(char const * clienttag, int versionid, int * len);
  187. extern char * anongame_infos_data_get_map(char const * clienttag, int versionid, int * len);
  188. extern char * anongame_infos_data_get_type(char const * clienttag, int versionid, int * len);
  189. extern char * anongame_infos_data_get_desc(char const * langID, char const * clienttag, int versionid, int * len);
  190. extern char * anongame_infos_data_get_ladr(char const * langID, char const * clienttag, int versionid, int * len);
  191. #endif
  192. #endif