Asterisk - The Open Source Telephony Project GIT-master-f36a736
ast_expr.h
Go to the documentation of this file.
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
19/*! \file
20 *
21 * ???????
22 * \todo Explain this file!
23 */
24
25
26#ifndef _ASTERISK_EXPR_H
27#define _ASTERISK_EXPR_H
28#ifndef STANDALONE
29#endif
30#if defined(__cplusplus) || defined(c_plusplus)
31extern "C" {
32#endif
33
34/*!\brief Evaluate the given expression
35 * \param expr An expression
36 * \param buf Result buffer
37 * \param length Size of the result buffer, in bytes
38 * \param chan Channel to use for evaluating included dialplan functions, if any
39 * \return Length of the result string, in bytes
40 */
41int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan);
42
43/*!\brief Evaluate the given expression
44 * \param str Dynamic result buffer
45 * \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
46 * \param chan Channel to use for evaluating included dialplan functions, if any
47 * \param expr An expression
48 * \return Length of the result string, in bytes
49 */
50int ast_str_expr(struct ast_str **str, ssize_t maxlen, struct ast_channel *chan, char *expr);
51
52#if defined(__cplusplus) || defined(c_plusplus)
53}
54#endif
55
56#endif /* _ASTERISK_EXPR_H */
const char * str
Definition: app_jack.c:147
int ast_str_expr(struct ast_str **str, ssize_t maxlen, struct ast_channel *chan, char *expr)
Evaluate the given expression.
Definition: ast_expr2f.c:2433
int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan)
Evaluate the given expression.
Definition: ast_expr2f.c:2391
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
Main Channel structure associated with a channel.
Support for dynamic strings.
Definition: strings.h:623