UniMRCP
1.5.0
|
Poller Task. More...
Go to the source code of this file.
Typedefs | |
typedef typedefAPT_BEGIN_EXTERN_C struct apt_poller_task_t | apt_poller_task_t |
typedef apt_bool_t(* | apt_poll_signal_f )(void *obj, const apr_pollfd_t *descriptor) |
Functions | |
apt_poller_task_t * | apt_poller_task_create (apr_size_t max_pollset_size, apt_poll_signal_f signal_handler, void *obj, apt_task_msg_pool_t *msg_pool, apr_pool_t *pool) |
apt_bool_t | apt_poller_task_destroy (apt_poller_task_t *task) |
void | apt_poller_task_cleanup (apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_start (apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_terminate (apt_poller_task_t *task) |
apt_task_t * | apt_poller_task_base_get (const apt_poller_task_t *task) |
apt_task_vtable_t * | apt_poller_task_vtable_get (const apt_poller_task_t *task) |
void * | apt_poller_task_object_get (const apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_descriptor_add (const apt_poller_task_t *task, const apr_pollfd_t *descriptor) |
apt_bool_t | apt_poller_task_descriptor_remove (const apt_poller_task_t *task, const apr_pollfd_t *descriptor) |
apt_timer_t * | apt_poller_task_timer_create (apt_poller_task_t *task, apt_timer_proc_f proc, void *obj, apr_pool_t *pool) |
Poller Task.
typedef apt_bool_t(* apt_poll_signal_f)(void *obj, const apr_pollfd_t *descriptor) |
Function prototype to handle signalled descripors
typedef typedefAPT_BEGIN_EXTERN_C struct apt_poller_task_t apt_poller_task_t |
Opaque poller task declaration
apt_task_t* apt_poller_task_base_get | ( | const apt_poller_task_t * | task | ) |
Get task base.
task | the poller task to get task base from |
void apt_poller_task_cleanup | ( | apt_poller_task_t * | task | ) |
Cleanup poller task.
task | the task to cleanup |
apt_poller_task_t* apt_poller_task_create | ( | apr_size_t | max_pollset_size, |
apt_poll_signal_f | signal_handler, | ||
void * | obj, | ||
apt_task_msg_pool_t * | msg_pool, | ||
apr_pool_t * | pool | ||
) |
Create poller task.
max_pollset_size | the maximum number of descriptors pollset can hold |
signal_handler | the handler of signalled descriptors |
obj | the external object to pass to callback |
msg_pool | the pool of task messages |
pool | the pool to allocate memory from |
apt_bool_t apt_poller_task_descriptor_add | ( | const apt_poller_task_t * | task, |
const apr_pollfd_t * | descriptor | ||
) |
Add descriptor to pollset.
task | the task which holds the pollset |
descriptor | the descriptor to add |
apt_bool_t apt_poller_task_descriptor_remove | ( | const apt_poller_task_t * | task, |
const apr_pollfd_t * | descriptor | ||
) |
Remove descriptor from pollset.
task | the task which holds the pollset |
descriptor | the descriptor to remove |
apt_bool_t apt_poller_task_destroy | ( | apt_poller_task_t * | task | ) |
Destroy poller task.
task | the task to destroy |
void* apt_poller_task_object_get | ( | const apt_poller_task_t * | task | ) |
Get external object.
task | the poller task to get object from |
apt_bool_t apt_poller_task_start | ( | apt_poller_task_t * | task | ) |
Start poller task and wait for incoming messages.
task | the task to start |
apt_bool_t apt_poller_task_terminate | ( | apt_poller_task_t * | task | ) |
Terminate poller task.
task | the task to terminate |
apt_timer_t* apt_poller_task_timer_create | ( | apt_poller_task_t * | task, |
apt_timer_proc_f | proc, | ||
void * | obj, | ||
apr_pool_t * | pool | ||
) |
Create timer.
task | the poller task to create timer in the scope of |
proc | the timer callback |
obj | the object to pass to callback |
pool | the pool to allocate memory from |
apt_task_vtable_t* apt_poller_task_vtable_get | ( | const apt_poller_task_t * | task | ) |
Get task vtable.
task | the poller task to get vtable from |