1 2 /**************************************************************************** 3 * THIS FILE WAS GENERATED * 4 * Script: common/generate_packets.py * 5 * Input: common/packets.def * 6 * DO NOT CHANGE THIS FILE * 7 ****************************************************************************/ 8 9 10 #ifndef FC__PACKHAND_GEN_H 11 #define FC__PACKHAND_GEN_H 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif /* __cplusplus */ 16 17 /* utility */ 18 #include "shared.h" 19 20 /* common */ 21 #include "packets.h" 22 23 bool client_handle_packet(enum packet_type type, const void *packet); 24 25 void handle_processing_started(void); 26 void handle_processing_finished(void); 27 void handle_server_join_reply(bool you_can_join, const char *message, const char *capability, const char *challenge_file, int conn_id); 28 void handle_authentication_req(enum authentication_type type, const char *message); 29 void handle_server_shutdown(void); 30 struct packet_endgame_report; 31 void handle_endgame_report(const struct packet_endgame_report *packet); 32 struct packet_endgame_player; 33 void handle_endgame_player(const struct packet_endgame_player *packet); 34 struct packet_tile_info; 35 void handle_tile_info(const struct packet_tile_info *packet); 36 struct packet_game_info; 37 void handle_game_info(const struct packet_game_info *packet); 38 void handle_timeout_info(float seconds_to_phasedone, float last_turn_change_time); 39 void handle_map_info(int xsize, int ysize, int topology_id); 40 void handle_nuke_tile_info(int tile); 41 void handle_team_name_info(int team_id, const char *team_name); 42 void handle_achievement_info(int id, bool gained, bool first); 43 struct packet_chat_msg; 44 void handle_chat_msg(const struct packet_chat_msg *packet); 45 struct packet_early_chat_msg; 46 void handle_early_chat_msg(const struct packet_early_chat_msg *packet); 47 void handle_connect_msg(const char *message); 48 void handle_city_remove(int city_id); 49 struct packet_city_info; 50 void handle_city_info(const struct packet_city_info *packet); 51 struct packet_city_short_info; 52 void handle_city_short_info(const struct packet_city_short_info *packet); 53 void handle_city_name_suggestion_info(int unit_id, const char *name); 54 void handle_city_sabotage_list(int diplomat_id, int city_id, bv_imprs improvements); 55 struct packet_worker_task; 56 void handle_worker_task(const struct packet_worker_task *packet); 57 void handle_player_remove(int playerno); 58 struct packet_player_info; 59 void handle_player_info(const struct packet_player_info *packet); 60 struct packet_player_attribute_chunk; 61 void handle_player_attribute_chunk(const struct packet_player_attribute_chunk *packet); 62 struct packet_player_diplstate; 63 void handle_player_diplstate(const struct packet_player_diplstate *packet); 64 struct packet_research_info; 65 void handle_research_info(const struct packet_research_info *packet); 66 void handle_unit_remove(int unit_id); 67 struct packet_unit_info; 68 void handle_unit_info(const struct packet_unit_info *packet); 69 struct packet_unit_short_info; 70 void handle_unit_short_info(const struct packet_unit_short_info *packet); 71 void handle_unit_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_winner_veteran); 72 void handle_unit_action_answer(int diplomat_id, int target_id, int cost, enum gen_action action_type); 73 struct packet_unit_actions; 74 void handle_unit_actions(const struct packet_unit_actions *packet); 75 void handle_diplomacy_init_meeting(int counterpart, int initiated_from); 76 void handle_diplomacy_cancel_meeting(int counterpart, int initiated_from); 77 void handle_diplomacy_create_clause(int counterpart, int giver, enum clause_type type, int value); 78 void handle_diplomacy_remove_clause(int counterpart, int giver, enum clause_type type, int value); 79 void handle_diplomacy_accept_treaty(int counterpart, bool I_accepted, bool other_accepted); 80 void handle_page_msg(const char *caption, const char *headline, enum event_type event, int len, int parts); 81 void handle_page_msg_part(const char *lines); 82 struct packet_conn_info; 83 void handle_conn_info(const struct packet_conn_info *packet); 84 void handle_conn_ping_info(int connections, const int *conn_id, const float *ping_time); 85 void handle_conn_ping(void); 86 void handle_end_phase(void); 87 void handle_start_phase(int phase); 88 void handle_new_year(int year16, int year32, int fragments, int turn); 89 void handle_begin_turn(void); 90 void handle_end_turn(void); 91 void handle_freeze_client(void); 92 void handle_thaw_client(void); 93 struct packet_spaceship_info; 94 void handle_spaceship_info(const struct packet_spaceship_info *packet); 95 struct packet_ruleset_unit; 96 void handle_ruleset_unit(const struct packet_ruleset_unit *packet); 97 struct packet_ruleset_unit_bonus; 98 void handle_ruleset_unit_bonus(const struct packet_ruleset_unit_bonus *packet); 99 struct packet_ruleset_unit_flag; 100 void handle_ruleset_unit_flag(const struct packet_ruleset_unit_flag *packet); 101 struct packet_ruleset_game; 102 void handle_ruleset_game(const struct packet_ruleset_game *packet); 103 struct packet_ruleset_specialist; 104 void handle_ruleset_specialist(const struct packet_ruleset_specialist *packet); 105 struct packet_ruleset_government_ruler_title; 106 void handle_ruleset_government_ruler_title(const struct packet_ruleset_government_ruler_title *packet); 107 struct packet_ruleset_tech; 108 void handle_ruleset_tech(const struct packet_ruleset_tech *packet); 109 struct packet_ruleset_tech_flag; 110 void handle_ruleset_tech_flag(const struct packet_ruleset_tech_flag *packet); 111 struct packet_ruleset_government; 112 void handle_ruleset_government(const struct packet_ruleset_government *packet); 113 struct packet_ruleset_terrain_control; 114 void handle_ruleset_terrain_control(const struct packet_ruleset_terrain_control *packet); 115 void handle_rulesets_ready(void); 116 struct packet_ruleset_nation_sets; 117 void handle_ruleset_nation_sets(const struct packet_ruleset_nation_sets *packet); 118 struct packet_ruleset_nation_groups; 119 void handle_ruleset_nation_groups(const struct packet_ruleset_nation_groups *packet); 120 struct packet_ruleset_nation; 121 void handle_ruleset_nation(const struct packet_ruleset_nation *packet); 122 void handle_nation_availability(int ncount, const bool *is_pickable, bool nationset_change); 123 struct packet_ruleset_style; 124 void handle_ruleset_style(const struct packet_ruleset_style *packet); 125 struct packet_ruleset_city; 126 void handle_ruleset_city(const struct packet_ruleset_city *packet); 127 struct packet_ruleset_building; 128 void handle_ruleset_building(const struct packet_ruleset_building *packet); 129 struct packet_ruleset_terrain; 130 void handle_ruleset_terrain(const struct packet_ruleset_terrain *packet); 131 struct packet_ruleset_terrain_flag; 132 void handle_ruleset_terrain_flag(const struct packet_ruleset_terrain_flag *packet); 133 struct packet_ruleset_unit_class; 134 void handle_ruleset_unit_class(const struct packet_ruleset_unit_class *packet); 135 struct packet_ruleset_extra; 136 void handle_ruleset_extra(const struct packet_ruleset_extra *packet); 137 struct packet_ruleset_base; 138 void handle_ruleset_base(const struct packet_ruleset_base *packet); 139 struct packet_ruleset_road; 140 void handle_ruleset_road(const struct packet_ruleset_road *packet); 141 struct packet_ruleset_disaster; 142 void handle_ruleset_disaster(const struct packet_ruleset_disaster *packet); 143 struct packet_ruleset_achievement; 144 void handle_ruleset_achievement(const struct packet_ruleset_achievement *packet); 145 struct packet_ruleset_trade; 146 void handle_ruleset_trade(const struct packet_ruleset_trade *packet); 147 struct packet_ruleset_action; 148 void handle_ruleset_action(const struct packet_ruleset_action *packet); 149 struct packet_ruleset_action_enabler; 150 void handle_ruleset_action_enabler(const struct packet_ruleset_action_enabler *packet); 151 struct packet_ruleset_music; 152 void handle_ruleset_music(const struct packet_ruleset_music *packet); 153 struct packet_ruleset_multiplier; 154 void handle_ruleset_multiplier(const struct packet_ruleset_multiplier *packet); 155 struct packet_ruleset_control; 156 void handle_ruleset_control(const struct packet_ruleset_control *packet); 157 struct packet_ruleset_summary; 158 void handle_ruleset_summary(const struct packet_ruleset_summary *packet); 159 struct packet_ruleset_description_part; 160 void handle_ruleset_description_part(const struct packet_ruleset_description_part *packet); 161 void handle_single_want_hack_reply(bool you_have_hack); 162 struct packet_ruleset_choices; 163 void handle_ruleset_choices(const struct packet_ruleset_choices *packet); 164 void handle_game_load(bool load_successful, const char *load_filename); 165 struct packet_server_setting_control; 166 void handle_server_setting_control(const struct packet_server_setting_control *packet); 167 struct packet_server_setting_const; 168 void handle_server_setting_const(const struct packet_server_setting_const *packet); 169 struct packet_server_setting_bool; 170 void handle_server_setting_bool(const struct packet_server_setting_bool *packet); 171 struct packet_server_setting_int; 172 void handle_server_setting_int(const struct packet_server_setting_int *packet); 173 struct packet_server_setting_str; 174 void handle_server_setting_str(const struct packet_server_setting_str *packet); 175 struct packet_server_setting_enum; 176 void handle_server_setting_enum(const struct packet_server_setting_enum *packet); 177 struct packet_server_setting_bitwise; 178 void handle_server_setting_bitwise(const struct packet_server_setting_bitwise *packet); 179 void handle_set_topology(int topology_id); 180 struct packet_ruleset_effect; 181 void handle_ruleset_effect(const struct packet_ruleset_effect *packet); 182 struct packet_ruleset_resource; 183 void handle_ruleset_resource(const struct packet_ruleset_resource *packet); 184 struct packet_scenario_info; 185 void handle_scenario_info(const struct packet_scenario_info *packet); 186 void handle_scenario_description(const char *description); 187 struct packet_vote_new; 188 void handle_vote_new(const struct packet_vote_new *packet); 189 void handle_vote_update(int vote_no, int yes, int no, int abstain, int num_voters); 190 void handle_vote_remove(int vote_no); 191 void handle_vote_resolve(int vote_no, bool passed); 192 struct packet_edit_startpos; 193 void handle_edit_startpos(const struct packet_edit_startpos *packet); 194 struct packet_edit_startpos_full; 195 void handle_edit_startpos_full(const struct packet_edit_startpos_full *packet); 196 void handle_edit_object_created(int tag, int id); 197 void handle_play_music(const char *tag); 198 199 #ifdef __cplusplus 200 } 201 #endif /* __cplusplus */ 202 203 #endif /* FC__PACKHAND_GEN_H */ 204