19#ifndef RES_AEAP_TRANSPORT_H
20#define RES_AEAP_TRANSPORT_H
129 const char *protocol,
int timeout);
142 const char *
url,
const char *protocol,
int timeout);
Asterisk External Application Protocol API.
AST_AEAP_DATA_TYPE
Supported Asterisk external application data types.
Asterisk external application transport virtual table.
intmax_t(* write)(struct aeap_transport *self, const void *buf, intmax_t size, enum AST_AEAP_DATA_TYPE wtype)
Write data to a transport.
int(* connect)(struct aeap_transport *self, const char *url, const char *protocol, int timeout)
Connect a transport.
void(* destroy)(struct aeap_transport *self)
Destroy a transport.
int(* disconnect)(struct aeap_transport *self)
Disconnect a transport.
intmax_t(* read)(struct aeap_transport *self, void *buf, intmax_t size, enum AST_AEAP_DATA_TYPE *rtype)
Read data from a transport.
Asterisk external application transport structure to be "derived" by specific transport implementatio...
struct aeap_transport_vtable * vtable
Structure for mutex and tracking information.
intmax_t aeap_transport_write(struct aeap_transport *transport, const void *buf, intmax_t size, enum AST_AEAP_DATA_TYPE wtype)
Write data to the transport.
int aeap_transport_connect(struct aeap_transport *transport, const char *url, const char *protocol, int timeout)
Connect a transport.
void aeap_transport_destroy(struct aeap_transport *transport)
Destroy a transport.
intmax_t aeap_transport_read(struct aeap_transport *transport, void *buf, intmax_t size, enum AST_AEAP_DATA_TYPE *rtype)
Read data from the transport.
int aeap_transport_is_connected(struct aeap_transport *transport)
Whether or not the transport is in a connected state.
struct aeap_transport * aeap_transport_create(const char *type)
Create an Asterisk external application transport.
struct aeap_transport * aeap_transport_create_and_connect(const char *type, const char *url, const char *protocol, int timeout)
Create an Asterisk external application transport, and connect it.
int aeap_transport_disconnect(struct aeap_transport *transport)
Disconnect a transport.