diff options
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index b0f589a9d..8b8094e37 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -468,6 +468,27 @@ struct ast_set_party_redirecting { struct ast_set_party_id to; }; +/*! \brief Typedef for a custom read function */ +typedef int (*ast_acf_read_fn_t)(struct ast_channel *, const char *, char *, char *, size_t); + +/*! \brief Typedef for a custom read2 function */ +typedef int (*ast_acf_read2_fn_t)(struct ast_channel *, const char *, char *, struct ast_str **, ssize_t); + +/*! \brief Typedef for a custom write function */ +typedef int (*ast_acf_write_fn_t)(struct ast_channel *, const char *, char *, const char *); + +/*! \brief Structure to handle passing func_channel_write info to channels via setoption */ +typedef struct { + /*! \brief ast_chan_write_info_t version. Must be incremented if structure is changed */ + #define AST_CHAN_WRITE_INFO_T_VERSION 1 + uint32_t version; + ast_acf_write_fn_t write_fn; + struct ast_channel *chan; + const char *function; + char *data; + const char *value; +} ast_chan_write_info_t; + /*! * \brief * Structure to describe a channel "technology", ie a channel driver |