diff options
Diffstat (limited to 'include/asterisk/ast_expr.h')
-rw-r--r-- | include/asterisk/ast_expr.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/ast_expr.h b/include/asterisk/ast_expr.h index a89b7b9a1..2dcb71f63 100644 --- a/include/asterisk/ast_expr.h +++ b/include/asterisk/ast_expr.h @@ -31,8 +31,24 @@ extern "C" { #endif +/*!\brief Evaluate the given expression + * \param expr An expression + * \param buf Result buffer + * \param length Size of the result buffer, in bytes + * \param chan Channel to use for evaluating included dialplan functions, if any + * \return Length of the result string, in bytes + */ int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan); +/*!\brief Evaluate the given expression + * \param str Dynamic result buffer + * \param maxlen <0 if the size of the buffer should remain constant, >0 if the size of the buffer should expand to that many bytes, maximum, or 0 for unlimited expansion of the result buffer + * \param chan Channel to use for evaluating included dialplan functions, if any + * \param expr An expression + * \return Length of the result string, in bytes + */ +int ast_str_expr(struct ast_str **str, ssize_t maxlen, struct ast_channel *chan, char *expr); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |