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