23 #ifndef AST_RES_AEAP_H
24 #define AST_RES_AEAP_H
35 #define AEAP_CONFIG_CLIENT "client"
73 const char *protocol);
136 AST_AEAP_DATA_TYPE_NONE,
137 AST_AEAP_DATA_TYPE_BINARY,
138 AST_AEAP_DATA_TYPE_STRING,
void(* on_binary)(struct ast_aeap *aeap, const void *buf, intmax_t size)
Raised when binary data is received.
Callbacks and other parameters used by an Asterisk external application object.
void ast_aeap_user_data_unregister(struct ast_aeap *aeap, const char *id)
Un-register a user data object.
void(* on_string)(struct ast_aeap *aeap, const char *buf, intmax_t size)
Raised when string data is received.
int ast_aeap_client_config_has_protocol(const struct ast_aeap_client_config *cfg, const char *protocol)
Check a given protocol against that in an Asterisk external application configuration.
const struct ast_aeap_message_handler * request_handlers
void(* ast_aeap_user_obj_cleanup)(void *obj)
Callback to cleanup a user object.
Structure for variables, used for configurations and for channel variables.
int(* ast_aeap_on_message)(struct ast_aeap *aeap, struct ast_aeap_message *message, void *obj)
Event raised when a message is received.
Full structure for sorcery.
uintmax_t request_handlers_size
const struct ast_aeap_message_type * msg_type
int ast_aeap_send_msg_tsx(struct ast_aeap *aeap, struct ast_aeap_tsx_params *params)
Send a transaction based message to an external application using the given parameters.
struct ast_sorcery * ast_aeap_sorcery(void)
Retrieve the AEAP sorcery object.
void * ast_aeap_user_data_object_by_id(struct ast_aeap *aeap, const char *id)
Retrieve a registered user data object by its id.
Parameters to be used when sending a transaction based message.
struct ast_aeap * ast_aeap_create(const char *type, const struct ast_aeap_params *params)
Create an Asterisk external application object.
static void cleanup(void)
Clean up any old apps that we don't need any more.
ast_aeap_user_obj_cleanup obj_cleanup
int ast_aeap_send_msg(struct ast_aeap *aeap, struct ast_aeap_message *msg)
Send a message to an external application.
int ast_aeap_connect(struct ast_aeap *aeap, const char *url, const char *protocol, int timeout)
Connect to an external application.
ast_aeap_on_timeout on_timeout
int ast_aeap_disconnect(struct ast_aeap *aeap)
Disconnect an Asterisk external application object.
struct ast_aeap * ast_aeap_create_by_id(const char *id, const struct ast_aeap_params *params)
Create an Asterisk external application object by sorcery id.
const struct ast_aeap_params * params
struct ast_aeap * ast_aeap_create_and_connect(const char *type, const struct ast_aeap_params *params, const char *url, const char *protocol, int timeout)
Create and connect to an Asterisk external application.
struct ast_aeap * ast_aeap_create_and_connect_by_id(const char *id, const struct ast_aeap_params *params, int timeout)
Create and connect to an Asterisk external application by sorcery id.
struct ast_variable * ast_aeap_custom_fields_get(const char *id)
Retrieve a list of custom configuration fields.
int ast_aeap_user_data_register(struct ast_aeap *aeap, const char *id, void *obj, ast_aeap_user_obj_cleanup cleanup)
Register a user data object.
void(* on_error)(struct ast_aeap *aeap)
Raised when an error occurs during reading.
Asterisk external application base message.
An Asterisk external application message handler.
void(* ast_aeap_on_timeout)(struct ast_aeap *aeap, struct ast_aeap_message *message, void *obj)
Event raised when a sent message does not receive a reply within a specified time interval...
AST_AEAP_DATA_TYPE
Supported Asterisk external application data types.
Message type virtual method table.
struct ast_aeap_message * msg
const struct ast_aeap_message_handler * response_handlers
const struct ast_format_cap * ast_aeap_client_config_codecs(const struct ast_aeap_client_config *cfg)
Retrieve codec capabilities from the configuration.
struct ao2_container * ast_aeap_client_configs_get(const char *protocol)
Retrieve a listing of all client configuration objects by protocol.
uintmax_t response_handlers_size
int ast_aeap_send_binary(struct ast_aeap *aeap, const void *buf, uintmax_t size)
Send a binary data to an external application.
ast_aeap_on_message on_message