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