23 #ifndef _ASTERISK_IO_H
24 #define _ASTERISK_IO_H
26 #include "asterisk/poll-compat.h"
29 #if defined(__cplusplus) || defined(c_plusplus)
34 #define AST_IO_IN POLLIN
36 #define AST_IO_OUT POLLOUT
38 #define AST_IO_PRI POLLPRI
42 #define AST_IO_ERR POLLERR
44 #define AST_IO_HUP POLLHUP
46 #define AST_IO_NVAL POLLNVAL
72 typedef int (*ast_io_cb)(
int *id,
int fd,
short events,
void *cbdata);
73 #define AST_IO_CB(a) ((ast_io_cb)(a))
188 #if defined(__cplusplus) || defined(c_plusplus)
int ast_io_wait(struct io_context *ioc, int howlong)
Waits for IO.
int ast_sd_get_fd_un(int type, const char *path)
Find a listening AF_LOCAL file descriptor provided by socket activation.
int ast_hide_password(int fd)
Hide password.
void ast_io_dump(struct io_context *ioc)
Dumps the IO array.
int * ast_io_add(struct io_context *ioc, int fd, ast_io_cb callback, short events, void *data)
Adds an IO context.
Socket address structure.
int ast_sd_get_fd(int type, const struct ast_sockaddr *addr)
Find a listening file descriptor provided by socket activation.
int ast_get_termcols(int fd)
Columns of Terminal.
int ast_restore_tty(int fd, int oldstatus)
Restores TTY mode.
void io_context_destroy(struct io_context *ioc)
Destroys a context.
int ast_sd_notify(const char *state)
a wrapper for sd_notify(): notify systemd of any state changes.
Global IO variables are now in a struct in order to be made threadsafe.
static struct stasis_rest_handlers events
REST handler for /api-docs/events.json.
int ast_io_remove(struct io_context *ioc, int *id)
Removes an IO context.
int * ast_io_change(struct io_context *ioc, int *id, int fd, ast_io_cb callback, short events, void *data)
Changes an IO handler.
struct io_context * io_context_create(void)
Creates a context Create a context for I/O operations Basically mallocs an IO structure and sets up s...