2 * Automatically generated from ./regress.rpc
5 #ifndef ___REGRESS_RPC_
6 #define ___REGRESS_RPC_
8 #include <event-config.h>
9 #ifdef _EVENT_HAVE_STDINT_H
12 #define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)
14 #define EVTAG_ASSIGN(msg, member, args...) (*(msg)->base->member##_assign)(msg, ## args)
15 #define EVTAG_GET(msg, member, args...) (*(msg)->base->member##_get)(msg, ## args)
17 #define EVTAG_ASSIGN(msg, member, ...) (*(msg)->base->member##_assign)(msg, ## __VA_ARGS__)
18 #define EVTAG_GET(msg, member, ...) (*(msg)->base->member##_get)(msg, ## __VA_ARGS__)
20 #define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg)
21 #define EVTAG_LEN(msg, member) ((msg)->member##_length)
27 /* Tag definition for msg */
36 /* Structure declaration for msg */
38 int (*from_name_assign
)(struct msg
*, const char *);
39 int (*from_name_get
)(struct msg
*, char * *);
40 int (*to_name_assign
)(struct msg
*, const char *);
41 int (*to_name_get
)(struct msg
*, char * *);
42 int (*attack_assign
)(struct msg
*, const struct kill
*);
43 int (*attack_get
)(struct msg
*, struct kill
* *);
44 int (*run_assign
)(struct msg
*, int, const struct run
*);
45 int (*run_get
)(struct msg
*, int, struct run
* *);
46 struct run
* (*run_add
)(struct msg
*);
50 struct msg_access_
*base
;
54 struct kill
* attack_data
;
55 struct run
**run_data
;
57 int run_num_allocated
;
59 ev_uint8_t from_name_set
;
60 ev_uint8_t to_name_set
;
61 ev_uint8_t attack_set
;
65 struct msg
*msg_new(void);
66 void msg_free(struct msg
*);
67 void msg_clear(struct msg
*);
68 void msg_marshal(struct evbuffer
*, const struct msg
*);
69 int msg_unmarshal(struct msg
*, struct evbuffer
*);
70 int msg_complete(struct msg
*);
71 void evtag_marshal_msg(struct evbuffer
*, ev_uint32_t
,
73 int evtag_unmarshal_msg(struct evbuffer
*, ev_uint32_t
,
75 int msg_from_name_assign(struct msg
*, const char *);
76 int msg_from_name_get(struct msg
*, char * *);
77 int msg_to_name_assign(struct msg
*, const char *);
78 int msg_to_name_get(struct msg
*, char * *);
79 int msg_attack_assign(struct msg
*, const struct kill
*);
80 int msg_attack_get(struct msg
*, struct kill
* *);
81 int msg_run_assign(struct msg
*, int, const struct run
*);
82 int msg_run_get(struct msg
*, int, struct run
* *);
83 struct run
* msg_run_add(struct msg
*);
84 /* --- msg done --- */
86 /* Tag definition for kill */
94 /* Structure declaration for kill */
96 int (*weapon_assign
)(struct kill
*, const char *);
97 int (*weapon_get
)(struct kill
*, char * *);
98 int (*action_assign
)(struct kill
*, const char *);
99 int (*action_get
)(struct kill
*, char * *);
100 int (*how_often_assign
)(struct kill
*, const ev_uint32_t
);
101 int (*how_often_get
)(struct kill
*, ev_uint32_t
*);
105 struct kill_access_
*base
;
109 ev_uint32_t how_often_data
;
111 ev_uint8_t weapon_set
;
112 ev_uint8_t action_set
;
113 ev_uint8_t how_often_set
;
116 struct kill
*kill_new(void);
117 void kill_free(struct kill
*);
118 void kill_clear(struct kill
*);
119 void kill_marshal(struct evbuffer
*, const struct kill
*);
120 int kill_unmarshal(struct kill
*, struct evbuffer
*);
121 int kill_complete(struct kill
*);
122 void evtag_marshal_kill(struct evbuffer
*, ev_uint32_t
,
123 const struct kill
*);
124 int evtag_unmarshal_kill(struct evbuffer
*, ev_uint32_t
,
126 int kill_weapon_assign(struct kill
*, const char *);
127 int kill_weapon_get(struct kill
*, char * *);
128 int kill_action_assign(struct kill
*, const char *);
129 int kill_action_get(struct kill
*, char * *);
130 int kill_how_often_assign(struct kill
*, const ev_uint32_t
);
131 int kill_how_often_get(struct kill
*, ev_uint32_t
*);
132 /* --- kill done --- */
134 /* Tag definition for run */
142 /* Structure declaration for run */
144 int (*how_assign
)(struct run
*, const char *);
145 int (*how_get
)(struct run
*, char * *);
146 int (*some_bytes_assign
)(struct run
*, const ev_uint8_t
*, ev_uint32_t
);
147 int (*some_bytes_get
)(struct run
*, ev_uint8_t
* *, ev_uint32_t
*);
148 int (*fixed_bytes_assign
)(struct run
*, const ev_uint8_t
*);
149 int (*fixed_bytes_get
)(struct run
*, ev_uint8_t
**);
153 struct run_access_
*base
;
156 ev_uint8_t
*some_bytes_data
;
157 ev_uint32_t some_bytes_length
;
158 ev_uint8_t fixed_bytes_data
[24];
161 ev_uint8_t some_bytes_set
;
162 ev_uint8_t fixed_bytes_set
;
165 struct run
*run_new(void);
166 void run_free(struct run
*);
167 void run_clear(struct run
*);
168 void run_marshal(struct evbuffer
*, const struct run
*);
169 int run_unmarshal(struct run
*, struct evbuffer
*);
170 int run_complete(struct run
*);
171 void evtag_marshal_run(struct evbuffer
*, ev_uint32_t
,
173 int evtag_unmarshal_run(struct evbuffer
*, ev_uint32_t
,
175 int run_how_assign(struct run
*, const char *);
176 int run_how_get(struct run
*, char * *);
177 int run_some_bytes_assign(struct run
*, const ev_uint8_t
*, ev_uint32_t
);
178 int run_some_bytes_get(struct run
*, ev_uint8_t
* *, ev_uint32_t
*);
179 int run_fixed_bytes_assign(struct run
*, const ev_uint8_t
*);
180 int run_fixed_bytes_get(struct run
*, ev_uint8_t
**);
181 /* --- run done --- */
183 #endif /* ___REGRESS_RPC_ */