139 #ifndef _AST_FRAMEHOOK_H_ 140 #define _AST_FRAMEHOOK_H_ 184 typedef struct ast_frame *(*ast_framehook_event_callback)(
227 #define AST_FRAMEHOOK_INTERFACE_VERSION 4
ast_framehook_event_callback event_cb
Main Channel structure associated with a channel.
struct ast_frame *(* ast_framehook_event_callback)(struct ast_channel *chan, struct ast_frame *frame, enum ast_framehook_event event, void *data)
This callback is called every time an event occurs on the framehook.
void(* ast_framehook_chan_fixup_callback)(void *data, int framehook_id, struct ast_channel *old_chan, struct ast_channel *new_chan)
This callback is called when a masquerade occurs on a channel with a framehook.
int ast_framehook_list_is_empty(struct ast_framehook_list *framehooks)
Determine if an framehook list is empty or not.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
ast_framehook_destroy_callback destroy_cb
int ast_framehook_list_destroy(struct ast_channel *chan)
This is used by the channel API to detach and destroy all framehooks on a channel during channel dest...
void(* ast_framehook_destroy_callback)(void *data)
This callback is called immediately before the framehook is destroyed.
int ast_framehook_list_contains_no_active_of_type(struct ast_framehook_list *framehooks, enum ast_frame_type type)
Determine if a framehook list is free of active framehooks consuming a specific type of frame...
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
Asterisk internal frame definitions.
A set of macros to manage forward-linked lists.
ast_frame_type
Frame types.
void ast_framehook_list_fixup(struct ast_channel *old_chan, struct ast_channel *new_chan)
This is used by the channel API during a masquerade operation to move all mobile framehooks from the ...
struct ast_frame * ast_framehook_list_write_event(struct ast_framehook_list *framehooks, struct ast_frame *frame)
This is used by the channel API push a frame write event to a channel's framehook list...
ast_framehook_chan_fixup_callback chan_fixup_cb
ast_framehook_chan_fixup_callback chan_breakdown_cb
int ast_framehook_list_contains_no_active(struct ast_framehook_list *framehooks)
Determine if a framehook list is free of active framehooks or not.
ast_framehook_consume_callback consume_cb
Data structure associated with a single frame of data.
union ast_frame::@263 data
int(* ast_framehook_consume_callback)(void *data, enum ast_frame_type type)
This callback is called to determine if the framehook is currently consuming frames of a given type...
struct ast_frame * ast_framehook_list_read_event(struct ast_framehook_list *framehooks, struct ast_frame *frame)
This is used by the channel API push a frame read event to a channel's framehook list.