3 * Automatically generated from ./regress.rpc
6 #ifndef ___REGRESS_RPC_
7 #define ___REGRESS_RPC_
9 #include <event-config.h>
10 #ifdef _EVENT_HAVE_STDINT_H
13 #define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)
15 #define EVTAG_ASSIGN(msg, member, args...) (*(msg)->base->member##_assign)(msg, ## args)
16 #define EVTAG_GET(msg, member, args...) (*(msg)->base->member##_get)(msg, ## args)
18 #define EVTAG_ASSIGN(msg, member, ...) (*(msg)->base->member##_assign)(msg, ## __VA_ARGS__)
19 #define EVTAG_GET(msg, member, ...) (*(msg)->base->member##_get)(msg, ## __VA_ARGS__)
21 #define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg)
22 #define EVTAG_LEN(msg, member) ((msg)->member##_length)
28 /* Tag definition for msg */
37 /* Structure declaration for msg */
39 int (*from_name_assign
)(struct msg
*, const char *);
40 int (*from_name_get
)(struct msg
*, char * *);
41 int (*to_name_assign
)(struct msg
*, const char *);
42 int (*to_name_get
)(struct msg
*, char * *);
43 int (*attack_assign
)(struct msg
*, const struct kill
*);
44 int (*attack_get
)(struct msg
*, struct kill
* *);
45 int (*run_assign
)(struct msg
*, int, const struct run
*);
46 int (*run_get
)(struct msg
*, int, struct run
* *);
47 struct run
* (*run_add
)(struct msg
*);
51 struct msg_access_
*base
;
55 struct kill
* attack_data
;
56 struct run
**run_data
;
58 int run_num_allocated
;
60 uint8_t from_name_set
;
66 struct msg
*msg_new(void);
67 void msg_free(struct msg
*);
68 void msg_clear(struct msg
*);
69 void msg_marshal(struct evbuffer
*, const struct msg
*);
70 int msg_unmarshal(struct msg
*, struct evbuffer
*);
71 int msg_complete(struct msg
*);
72 void evtag_marshal_msg(struct evbuffer
*, uint32_t,
74 int evtag_unmarshal_msg(struct evbuffer
*, uint32_t,
76 int msg_from_name_assign(struct msg
*, const char *);
77 int msg_from_name_get(struct msg
*, char * *);
78 int msg_to_name_assign(struct msg
*, const char *);
79 int msg_to_name_get(struct msg
*, char * *);
80 int msg_attack_assign(struct msg
*, const struct kill
*);
81 int msg_attack_get(struct msg
*, struct kill
* *);
82 int msg_run_assign(struct msg
*, int, const struct run
*);
83 int msg_run_get(struct msg
*, int, struct run
* *);
84 struct run
* msg_run_add(struct msg
*);
85 /* --- msg done --- */
87 /* Tag definition for kill */
95 /* Structure declaration for kill */
97 int (*weapon_assign
)(struct kill
*, const char *);
98 int (*weapon_get
)(struct kill
*, char * *);
99 int (*action_assign
)(struct kill
*, const char *);
100 int (*action_get
)(struct kill
*, char * *);
101 int (*how_often_assign
)(struct kill
*, const uint32_t);
102 int (*how_often_get
)(struct kill
*, uint32_t *);
106 struct kill_access_
*base
;
110 uint32_t how_often_data
;
114 uint8_t how_often_set
;
117 struct kill
*kill_new(void);
118 void kill_free(struct kill
*);
119 void kill_clear(struct kill
*);
120 void kill_marshal(struct evbuffer
*, const struct kill
*);
121 int kill_unmarshal(struct kill
*, struct evbuffer
*);
122 int kill_complete(struct kill
*);
123 void evtag_marshal_kill(struct evbuffer
*, uint32_t,
124 const struct kill
*);
125 int evtag_unmarshal_kill(struct evbuffer
*, uint32_t,
127 int kill_weapon_assign(struct kill
*, const char *);
128 int kill_weapon_get(struct kill
*, char * *);
129 int kill_action_assign(struct kill
*, const char *);
130 int kill_action_get(struct kill
*, char * *);
131 int kill_how_often_assign(struct kill
*, const uint32_t);
132 int kill_how_often_get(struct kill
*, uint32_t *);
133 /* --- kill done --- */
135 /* Tag definition for run */
143 /* Structure declaration for run */
145 int (*how_assign
)(struct run
*, const char *);
146 int (*how_get
)(struct run
*, char * *);
147 int (*some_bytes_assign
)(struct run
*, const uint8_t *, uint32_t);
148 int (*some_bytes_get
)(struct run
*, uint8_t * *, uint32_t *);
149 int (*fixed_bytes_assign
)(struct run
*, const uint8_t *);
150 int (*fixed_bytes_get
)(struct run
*, uint8_t **);
154 struct run_access_
*base
;
157 uint8_t *some_bytes_data
;
158 uint32_t some_bytes_length
;
159 uint8_t fixed_bytes_data
[24];
162 uint8_t some_bytes_set
;
163 uint8_t fixed_bytes_set
;
166 struct run
*run_new(void);
167 void run_free(struct run
*);
168 void run_clear(struct run
*);
169 void run_marshal(struct evbuffer
*, const struct run
*);
170 int run_unmarshal(struct run
*, struct evbuffer
*);
171 int run_complete(struct run
*);
172 void evtag_marshal_run(struct evbuffer
*, uint32_t,
174 int evtag_unmarshal_run(struct evbuffer
*, uint32_t,
176 int run_how_assign(struct run
*, const char *);
177 int run_how_get(struct run
*, char * *);
178 int run_some_bytes_assign(struct run
*, const uint8_t *, uint32_t);
179 int run_some_bytes_get(struct run
*, uint8_t * *, uint32_t *);
180 int run_fixed_bytes_assign(struct run
*, const uint8_t *);
181 int run_fixed_bytes_get(struct run
*, uint8_t **);
182 /* --- run done --- */
184 #endif /* ___REGRESS_RPC_ */