139#ifndef _AST_FRAMEHOOK_H_
140#define _AST_FRAMEHOOK_H_
184typedef struct ast_frame *(*ast_framehook_event_callback)(
227#define AST_FRAMEHOOK_INTERFACE_VERSION 4
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_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.
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
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.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
@ AST_FRAMEHOOK_EVENT_ATTACHED
@ AST_FRAMEHOOK_EVENT_DETACHED
@ AST_FRAMEHOOK_EVENT_WRITE
@ AST_FRAMEHOOK_EVENT_READ
void(* ast_framehook_destroy_callback)(void *data)
This callback is called immediately before the framehook is destroyed.
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.
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.
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
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_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 ...
int ast_framehook_list_contains_no_active(struct ast_framehook_list *framehooks)
Determine if a framehook list is free of active framehooks or not.
int ast_framehook_list_is_empty(struct ast_framehook_list *framehooks)
Determine if an framehook list is empty or not.
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.
Asterisk internal frame definitions.
ast_frame_type
Frame types.
A set of macros to manage forward-linked lists.
Main Channel structure associated with a channel.
Data structure associated with a single frame of data.
union ast_frame::@226 data
ast_framehook_chan_fixup_callback chan_fixup_cb
ast_framehook_event_callback event_cb
ast_framehook_consume_callback consume_cb
ast_framehook_chan_fixup_callback chan_breakdown_cb
ast_framehook_destroy_callback destroy_cb