libzrtp  1.2.0
ZRTP VoIP security
Data Fields
zrtp_callback_scheduler_t Struct Reference

Delay Calls callbacks. More...

#include <zrtp_iface.h>

Data Fields

zrtp_status_t(* on_init )(zrtp_global_t *zrtp)
 Delay Calls initialization. More...
 
void(* on_down )()
 Delay Calls deinitialization. More...
 
void(* on_call_later )(zrtp_stream_t *stream, zrtp_retry_task_t *task)
 Interface for performing delay call. More...
 
void(* on_cancel_call_later )(zrtp_stream_t *ctx, zrtp_retry_task_t *task)
 Interface for canceling a delay calls. More...
 
void(* on_wait_call_later )(zrtp_stream_t *stream)
 Interface for waiting for scheduling tasks is finished. More...
 

Detailed Description

Delay Calls callbacks.

Field Documentation

void(* zrtp_callback_scheduler_t::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.

Parameters
stream- stream context for processing the callback function;
task- task structure that should be processed.
See also
zrtp_callback_scheduler_t::on_cancel_call_later
void(* zrtp_callback_scheduler_t::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:

  • If there is a specified task for a specified stream, this task should be deleted.
  • If the task parameter is equal to NULL - ALL tasks for the specified stream must be terminated and removed from the queue.
Parameters
ctx- stream context for the operation;
task- delayed call wrapper structure.
See also
zrtp_callback_scheduler_t::on_call_later
void(* zrtp_callback_scheduler_t::on_down) ()

Delay Calls deinitialization.

libzrtp calls this function when zrtp scheduler is no longer needed at zrtp_down().

See also
zrtp_callback_scheduler_t::on_init()
zrtp_status_t(* zrtp_callback_scheduler_t::on_init) (zrtp_global_t *zrtp)

Delay Calls initialization.

libzrtp calls this function before start using scheduler routine at zrtp_init().

Parameters
zrtp- libzrtp global context;
See also
zrtp_callback_scheduler_t::on_down()
void(* zrtp_callback_scheduler_t::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().

Parameters
stream- stream context for the operation;
See also
zrtp_callback_scheduler_t::on_call_later.

The documentation for this struct was generated from the following file: