ast_expr.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 1999 - 2005, Digium, Inc.
  5. *
  6. * Mark Spencer <markster@digium.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*! \file
  19. *
  20. * ???????
  21. * \todo Explain this file!
  22. */
  23. #ifndef _ASTERISK_EXPR_H
  24. #define _ASTERISK_EXPR_H
  25. #ifndef STANDALONE
  26. #endif
  27. #if defined(__cplusplus) || defined(c_plusplus)
  28. extern "C" {
  29. #endif
  30. /*!\brief Evaluate the given expression
  31. * \param expr An expression
  32. * \param buf Result buffer
  33. * \param length Size of the result buffer, in bytes
  34. * \param chan Channel to use for evaluating included dialplan functions, if any
  35. * \return Length of the result string, in bytes
  36. */
  37. int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan);
  38. /*!\brief Evaluate the given expression
  39. * \param str Dynamic result buffer
  40. * \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
  41. * \param chan Channel to use for evaluating included dialplan functions, if any
  42. * \param expr An expression
  43. * \return Length of the result string, in bytes
  44. */
  45. int ast_str_expr(struct ast_str **str, ssize_t maxlen, struct ast_channel *chan, char *expr);
  46. #if defined(__cplusplus) || defined(c_plusplus)
  47. }
  48. #endif
  49. #endif /* _ASTERISK_EXPR_H */