1234567891011121314151617181920212223242526 |
- /*
- * events.h
- *
- * Created on: Jan 5, 2018
- * Author: Philipp Hinz
- */
- #ifndef EVENTS_H_
- #define EVENTS_H_
- #define EVENT_LENGTH 20 /*< Maximum length of an event */
- struct event_t {
- const char *event;
- void *data = NULL;
- int len = 0;
- };
- void event_subscribe(const char *event, void (*handler)(event_t *), const char *subscriber);
- void event_trigger(event_t *event);
- void event_trigger(char *event);
- void event_trigger(const char *event);
- void event_trigger(const char *event, void *data, int len);
- void event_trigger(char *event, void *data, int len);
- #endif /* EVENTS_H_ */
|