#include <zrtp_iface.h>
Data Fields | |
zrtp_status_t(* | on_init )(zrtp_global_t *zrtp) |
Delay Calls initialization. | |
void(* | on_down )() |
Delay Calls deinitialization. | |
void(* | on_call_later )(zrtp_stream_t *stream, zrtp_retry_task_t *task) |
Interface for performing delay call. | |
void(* | on_cancel_call_later )(zrtp_stream_t *ctx, zrtp_retry_task_t *task) |
Interface for canceling a delay calls. | |
void(* | on_wait_call_later )(zrtp_stream_t *stream) |
Interface for waiting for scheduling tasks is finished. |
void(* on_call_later)(zrtp_stream_t *stream, zrtp_retry_task_t *task) |
Interface for performing delay call.
This function should add delay call request (task
) to the processing queue. When the zrtp_retry_task_t::timeout is expired, scheduler should call zrtp_retry_task_t::callback and remove tasks from the processing queue.
stream | - stream context for processing the callback function; | |
task | - task structure that should be processed. |
void(* on_cancel_call_later)(zrtp_stream_t *ctx, zrtp_retry_task_t *task) |
Interface for canceling a delay calls.
This function cancels delay call if it still in the processing queue. The algorithm is the following:
task
parameter is equal to NULL - ALL tasks for the specified stream must be terminated and removed from the queue.
ctx | - stream context for the operation; | |
task | - delayed call wrapper structure. |
void(* on_down)() |
Delay Calls deinitialization.
libzrtp calls this function when zrtp scheduler is no longer needed at zrtp_down().
zrtp_status_t(* on_init)(zrtp_global_t *zrtp) |
Delay Calls initialization.
libzrtp calls this function before start using scheduler routine at zrtp_init().
zrtp | - libzrtp global context; |
void(* on_wait_call_later)(zrtp_stream_t *stream) |
Interface for waiting for scheduling tasks is finished.
This function is called by libzrtp when the state-mamchine is in a position to destroy ZRTP session and all incapsulated streams. Allocated for the stream memory may be cleared and released. If after this operation, scheduler perform time-out call it will bring system to crash.
The scheduler implementation must guarantee that any delay call for the stream
will not be performed after on_wait_call_later().
stream | - stream context for the operation; |