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