diff options
author | irungentoo <irungentoo@gmail.com> | 2014-02-16 19:13:34 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-02-16 19:13:34 -0500 |
commit | 9d1eb27717472f5655242fac7b8123a44f1ff33c (patch) | |
tree | fd205f1ea53749717d9930d93ddb153fc8a16929 /toxmsi/toxmsi_event.h | |
parent | fd3dc22ef3bd77beb78faf24cd43e9d2b9706f5d (diff) | |
parent | f79b327fd639b2dcca9d4d2c137f93c1dce622fc (diff) |
Merge branch 'av-fix' into av-good
Diffstat (limited to 'toxmsi/toxmsi_event.h')
-rw-r--r-- | toxmsi/toxmsi_event.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/toxmsi/toxmsi_event.h b/toxmsi/toxmsi_event.h deleted file mode 100644 index 032e4df5..00000000 --- a/toxmsi/toxmsi_event.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | #ifndef _MSI__EVENT_H_ | ||
2 | #define _MSI__EVENT_H_ | ||
3 | |||
4 | #include <stddef.h> | ||
5 | #include <inttypes.h> | ||
6 | #include <pthread.h> | ||
7 | |||
8 | typedef void* event_arg_t; | ||
9 | |||
10 | typedef void ( *event_t ) ( event_arg_t ); | ||
11 | typedef void ( *timed_event_t ) ( event_arg_t ); | ||
12 | |||
13 | typedef struct event_container_s { | ||
14 | event_t _event; | ||
15 | event_arg_t _event_args; | ||
16 | uint32_t _timeout; | ||
17 | long long _id; | ||
18 | |||
19 | } event_container_t; | ||
20 | |||
21 | typedef struct event_handler_s { | ||
22 | event_container_t* _events; | ||
23 | size_t _events_count; | ||
24 | |||
25 | event_container_t* _timed_events; | ||
26 | size_t _timed_events_count; | ||
27 | |||
28 | uint32_t _frequms; | ||
29 | int _running; | ||
30 | |||
31 | pthread_mutex_t _mutex; | ||
32 | pthread_t _thread_id; | ||
33 | |||
34 | } event_handler_t; | ||
35 | |||
36 | event_handler_t* init_event_poll ( uint32_t _frequms ); | ||
37 | int terminate_event_poll ( event_handler_t* _event_handler ); | ||
38 | |||
39 | void throw_event ( void* _event_handler_p, event_t _func, event_arg_t _arg ); | ||
40 | |||
41 | /* Not yet ready for use */ | ||
42 | int throw_timer_event ( void* _event_handler_p, event_t _func, event_arg_t _arg, uint32_t _timeout); | ||
43 | int cancel_timer_event ( void* _event_handler_p, int _id ); | ||
44 | |||
45 | |||
46 | #endif /* _MSI__EVENT_H_ */ | ||