31 if (!strncasecmp(
type,
"ws", 2)) {
49 const char *protocol,
int timeout)
69 const char *
url,
const char *protocol,
int timeout)
Asterisk main include file. File version handling, generic pbx functions.
#define ast_mutex_init(pmutex)
#define SCOPED_MUTEX(varname, lock)
scoped lock specialization for mutexes
#define ast_mutex_destroy(a)
#define ast_atomic_fetch_sub(ptr, val, memorder)
#define ast_atomic_fetch_add(ptr, val, memorder)
Support for atomic instructions.
AST_AEAP_DATA_TYPE
Supported Asterisk external application data types.
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
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.
struct aeap_transport_websocket * aeap_transport_websocket_create(void)
Creates (heap allocated), and initializes a transport websocket.