1 /* 2 * Automatically generated from ../test/regress.rpc 3 */ 4 5 #ifndef EVENT_RPCOUT____TEST_REGRESS_RPC_ 6 #define EVENT_RPCOUT____TEST_REGRESS_RPC_ 7 8 #include <event2/util.h> /* for ev_uint*_t */ 9 #include <event2/rpc.h> 10 struct msg; 11 struct kill; 12 struct run; 13 14 /* Tag definition for msg */ 15 enum msg_ { 16 MSG_FROM_NAME=1, 17 MSG_TO_NAME=2, 18 MSG_ATTACK=3, 19 MSG_RUN=4, 20 MSG_MAX_TAGS 21 }; 22 23 /* Structure declaration for msg */ 24 struct msg_access_ { 25 int (*from_name_assign)(struct msg *, const char *); 26 int (*from_name_get)(struct msg *, char * *); 27 int (*to_name_assign)(struct msg *, const char *); 28 int (*to_name_get)(struct msg *, char * *); 29 int (*attack_assign)(struct msg *, const struct kill*); 30 int (*attack_get)(struct msg *, struct kill* *); 31 int (*run_assign)(struct msg *, int, const struct run*); 32 int (*run_get)(struct msg *, int, struct run* *); 33 struct run* (*run_add)(struct msg *msg); 34 }; 35 36 struct msg { 37 struct msg_access_ *base; 38 39 char *from_name_data; 40 char *to_name_data; 41 struct kill* attack_data; 42 struct run* *run_data; 43 int run_length; 44 int run_num_allocated; 45 46 ev_uint8_t from_name_set; 47 ev_uint8_t to_name_set; 48 ev_uint8_t attack_set; 49 ev_uint8_t run_set; 50 }; 51 52 struct msg *msg_new(void); 53 struct msg *msg_new_with_arg(void *); 54 void msg_free(struct msg *); 55 void msg_clear(struct msg *); 56 void msg_marshal(struct evbuffer *, const struct msg *); 57 int msg_unmarshal(struct msg *, struct evbuffer *); 58 int msg_complete(struct msg *); 59 void evtag_marshal_msg(struct evbuffer *, ev_uint32_t, 60 const struct msg *); 61 int evtag_unmarshal_msg(struct evbuffer *, ev_uint32_t, 62 struct msg *); 63 int msg_from_name_assign(struct msg *, const char *); 64 int msg_from_name_get(struct msg *, char * *); 65 int msg_to_name_assign(struct msg *, const char *); 66 int msg_to_name_get(struct msg *, char * *); 67 int msg_attack_assign(struct msg *, const struct kill*); 68 int msg_attack_get(struct msg *, struct kill* *); 69 int msg_run_assign(struct msg *, int, const struct run*); 70 int msg_run_get(struct msg *, int, struct run* *); 71 struct run* msg_run_add(struct msg *msg); 72 /* --- msg done --- */ 73 74 /* Tag definition for kill */ 75 enum kill_ { 76 KILL_WEAPON=65825, 77 KILL_ACTION=2, 78 KILL_HOW_OFTEN=3, 79 KILL_MAX_TAGS 80 }; 81 82 /* Structure declaration for kill */ 83 struct kill_access_ { 84 int (*weapon_assign)(struct kill *, const char *); 85 int (*weapon_get)(struct kill *, char * *); 86 int (*action_assign)(struct kill *, const char *); 87 int (*action_get)(struct kill *, char * *); 88 int (*how_often_assign)(struct kill *, int, const ev_uint32_t); 89 int (*how_often_get)(struct kill *, int, ev_uint32_t *); 90 ev_uint32_t * (*how_often_add)(struct kill *msg, const ev_uint32_t value); 91 }; 92 93 struct kill { 94 struct kill_access_ *base; 95 96 char *weapon_data; 97 char *action_data; 98 ev_uint32_t *how_often_data; 99 int how_often_length; 100 int how_often_num_allocated; 101 102 ev_uint8_t weapon_set; 103 ev_uint8_t action_set; 104 ev_uint8_t how_often_set; 105 }; 106 107 struct kill *kill_new(void); 108 struct kill *kill_new_with_arg(void *); 109 void kill_free(struct kill *); 110 void kill_clear(struct kill *); 111 void kill_marshal(struct evbuffer *, const struct kill *); 112 int kill_unmarshal(struct kill *, struct evbuffer *); 113 int kill_complete(struct kill *); 114 void evtag_marshal_kill(struct evbuffer *, ev_uint32_t, 115 const struct kill *); 116 int evtag_unmarshal_kill(struct evbuffer *, ev_uint32_t, 117 struct kill *); 118 int kill_weapon_assign(struct kill *, const char *); 119 int kill_weapon_get(struct kill *, char * *); 120 int kill_action_assign(struct kill *, const char *); 121 int kill_action_get(struct kill *, char * *); 122 int kill_how_often_assign(struct kill *, int, const ev_uint32_t); 123 int kill_how_often_get(struct kill *, int, ev_uint32_t *); 124 ev_uint32_t * kill_how_often_add(struct kill *msg, const ev_uint32_t value); 125 /* --- kill done --- */ 126 127 /* Tag definition for run */ 128 enum run_ { 129 RUN_HOW=1, 130 RUN_SOME_BYTES=2, 131 RUN_FIXED_BYTES=3, 132 RUN_NOTES=4, 133 RUN_LARGE_NUMBER=5, 134 RUN_OTHER_NUMBERS=6, 135 RUN_MAX_TAGS 136 }; 137 138 /* Structure declaration for run */ 139 struct run_access_ { 140 int (*how_assign)(struct run *, const char *); 141 int (*how_get)(struct run *, char * *); 142 int (*some_bytes_assign)(struct run *, const ev_uint8_t *, ev_uint32_t); 143 int (*some_bytes_get)(struct run *, ev_uint8_t * *, ev_uint32_t *); 144 int (*fixed_bytes_assign)(struct run *, const ev_uint8_t *); 145 int (*fixed_bytes_get)(struct run *, ev_uint8_t **); 146 int (*notes_assign)(struct run *, int, const char *); 147 int (*notes_get)(struct run *, int, char * *); 148 char * * (*notes_add)(struct run *msg, const char * value); 149 int (*large_number_assign)(struct run *, const ev_uint64_t); 150 int (*large_number_get)(struct run *, ev_uint64_t *); 151 int (*other_numbers_assign)(struct run *, int, const ev_uint32_t); 152 int (*other_numbers_get)(struct run *, int, ev_uint32_t *); 153 ev_uint32_t * (*other_numbers_add)(struct run *msg, const ev_uint32_t value); 154 }; 155 156 struct run { 157 struct run_access_ *base; 158 159 char *how_data; 160 ev_uint8_t *some_bytes_data; 161 ev_uint32_t some_bytes_length; 162 ev_uint8_t fixed_bytes_data[24]; 163 char * *notes_data; 164 int notes_length; 165 int notes_num_allocated; 166 ev_uint64_t large_number_data; 167 ev_uint32_t *other_numbers_data; 168 int other_numbers_length; 169 int other_numbers_num_allocated; 170 171 ev_uint8_t how_set; 172 ev_uint8_t some_bytes_set; 173 ev_uint8_t fixed_bytes_set; 174 ev_uint8_t notes_set; 175 ev_uint8_t large_number_set; 176 ev_uint8_t other_numbers_set; 177 }; 178 179 struct run *run_new(void); 180 struct run *run_new_with_arg(void *); 181 void run_free(struct run *); 182 void run_clear(struct run *); 183 void run_marshal(struct evbuffer *, const struct run *); 184 int run_unmarshal(struct run *, struct evbuffer *); 185 int run_complete(struct run *); 186 void evtag_marshal_run(struct evbuffer *, ev_uint32_t, 187 const struct run *); 188 int evtag_unmarshal_run(struct evbuffer *, ev_uint32_t, 189 struct run *); 190 int run_how_assign(struct run *, const char *); 191 int run_how_get(struct run *, char * *); 192 int run_some_bytes_assign(struct run *, const ev_uint8_t *, ev_uint32_t); 193 int run_some_bytes_get(struct run *, ev_uint8_t * *, ev_uint32_t *); 194 int run_fixed_bytes_assign(struct run *, const ev_uint8_t *); 195 int run_fixed_bytes_get(struct run *, ev_uint8_t **); 196 int run_notes_assign(struct run *, int, const char *); 197 int run_notes_get(struct run *, int, char * *); 198 char * * run_notes_add(struct run *msg, const char * value); 199 int run_large_number_assign(struct run *, const ev_uint64_t); 200 int run_large_number_get(struct run *, ev_uint64_t *); 201 int run_other_numbers_assign(struct run *, int, const ev_uint32_t); 202 int run_other_numbers_get(struct run *, int, ev_uint32_t *); 203 ev_uint32_t * run_other_numbers_add(struct run *msg, const ev_uint32_t value); 204 /* --- run done --- */ 205 206 #endif /* EVENT_RPCOUT____TEST_REGRESS_RPC_ */