TizenRT Public API  v2.0 M2
eventloop.h File Reference
#include <libtuv/uv.h>
#include <stdbool.h>
Include dependency graph for eventloop.h:

Go to the source code of this file.

Macros

#define EVENTLOOP_CALLBACK_STOP   0
 Return value of callback function for event. More...
 

Typedefs

typedef uv_timer_t el_timer_t
 EventLoop Timer structure. More...
 
typedef uv_loop_t el_loop_t
 EventLoop Loop structure. More...
 
typedef uv_signal_t el_event_t
 EventLoop Event structure. More...
 
typedef bool(* timeout_callback) (void *data)
 EventLoop Timeout Callback. More...
 
typedef void(* thread_safe_callback) (void *data)
 EventLoop Thread Safe Callback. More...
 
typedef bool(* event_callback) (void *registered_cb_data, void *received_event_data)
 EventLoop Event Callback This is specific type for callback function used in eventloop_add_event_handler.
When some tasks send event, registered callback functions are called with some data.
The first parameter, registered_cb_data is function data registered in eventloop_add_event_handler.
The second parameter, received_event_data is data received from event sender.
. More...
 

Enumerations

Functions

el_timer_teventloop_add_timer (unsigned int timeout, bool repeat, timeout_callback func, void *cb_data)
 Create timer to call the function in the given period of time. More...
 
int eventloop_delete_timer (el_timer_t *timer)
 Delete specific timer. More...
 
el_timer_teventloop_add_timer_async (unsigned int timeout, bool repeat, timeout_callback func, void *cb_data)
 Create timer to call the function in the given period of time asynchronously. More...
 
el_event_teventloop_add_event_handler (int type, event_callback func, void *cb_data)
 Set event callback which will be called a certain event occur. More...
 
int eventloop_del_event_handler (el_event_t *handle)
 Delete registered handler for event. More...
 
int eventloop_send_event (int type, void *event_data, int data_size)
 Send an event. More...
 
int eventloop_loop_run (void)
 Run the loop of its own task. More...
 
int eventloop_loop_stop (void)
 Stop the loop of its own task. More...
 
int eventloop_thread_safe_function_call (thread_safe_callback func, void *cb_data)
 Callback is added at the each eventloop to be called thread safely.
. More...