Add void *data arg in fsm_process_event()
[eleutheria.git] / misc / fsm / fsm.h
blob2c7b8da1e1b1be518ce740a31481a9784819939d
1 #ifndef FSM_H
2 #define FSM_H
4 #include "types.h"
6 /* Function prototypes */
7 fsmret_t fsm_init(fsm_t **state, size_t size, unsigned int factor);
8 fsmret_t fsm_add_state(fsm_t *fsm, unsigned int key, state_t *state);
9 fsmret_t fsm_free(fsm_t *fsm);
10 void fsm_print_states(const fsm_t *fsm);
11 fsmret_t fsm_set_state(fsm_t *fsm, unsigned int stkey);
12 fsmret_t fsm_process_event(fsm_t *fsm, unsigned int evtkey, void *data);
14 #endif /* FSM_H */