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