Asterisk - The Open Source Telephony Project
21.4.1
|
Callbacks defined by CC monitors. More...
#include <ccss.h>
Data Fields | |
int(* | cancel_available_timer )(struct ast_cc_monitor *monitor, int *sched_id) |
Cancel the running available timer. More... | |
void(* | destructor )(void *private_data) |
Destroy private data on the monitor. More... | |
int(* | request_cc )(struct ast_cc_monitor *monitor, int *available_timer_id) |
Request CCSS. More... | |
int(* | status_response )(struct ast_cc_monitor *monitor, enum ast_device_state devstate) |
Status response to an ast_cc_monitor_status_request(). More... | |
int(* | suspend )(struct ast_cc_monitor *monitor) |
Suspend monitoring. More... | |
const char * | type |
Type of monitor the callbacks belong to. More... | |
int(* | unsuspend )(struct ast_cc_monitor *monitor) |
Unsuspend monitoring. More... | |
Callbacks defined by CC monitors.
int(* cancel_available_timer) (struct ast_cc_monitor *monitor, int *sched_id) |
Cancel the running available timer.
monitor | CC core monitor control. |
sched_id | Available timer scheduler id to cancel. Will never be NULL for a device monitor. |
In most cases, this function will likely consist of just a call to AST_SCHED_DEL. It might have been possible to do this within the core, but unfortunately the mixture of sched_thread and sched usage in Asterisk prevents such usage.
0 | on success |
-1 | on failure. |
void(* destructor) (void *private_data) |
Destroy private data on the monitor.
private_data | The private data pointer from the monitor. |
Implementers of this callback are responsible for destroying all heap-allocated data in the monitor's private_data pointer, including the private_data itself.
int(* request_cc) (struct ast_cc_monitor *monitor, int *available_timer_id) |
Request CCSS.
monitor | CC core monitor control. |
available_timer_id | The scheduler ID for the available timer. Will never be NULL for a device monitor. |
Perform whatever steps are necessary in order to request CC. In addition, the monitor implementation is responsible for starting the available timer in this callback.
0 | on success |
-1 | on failure. |
int(* status_response) (struct ast_cc_monitor *monitor, enum ast_device_state devstate) |
Status response to an ast_cc_monitor_status_request().
monitor | CC core monitor control. |
devstate | Current status of a Party A device. |
Alert a monitor as to the status of the agent for which the monitor had previously requested a status request.
0 | on success |
-1 | on failure. |
int(* suspend) (struct ast_cc_monitor *monitor) |
const char* type |
int(* unsuspend) (struct ast_cc_monitor *monitor) |