Wed Jan 8 2020 09:49:46

Asterisk developer's documentation


chanvars.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  * \brief Channel Variables
21  */
22 
23 #ifndef _ASTERISK_CHANVARS_H
24 #define _ASTERISK_CHANVARS_H
25 
26 #include "asterisk/linkedlists.h"
27 
28 struct ast_var_t {
30  char *value;
31  char name[0];
32 };
33 
35 
36 #ifdef MALLOC_DEBUG
37 struct ast_var_t *_ast_var_assign(const char *name, const char *value, const char *file, int lineno, const char *function);
38 #define ast_var_assign(a,b) _ast_var_assign(a,b,__FILE__,__LINE__,__PRETTY_FUNCTION__)
39 #else
40 struct ast_var_t *ast_var_assign(const char *name, const char *value);
41 #endif
42 void ast_var_delete(struct ast_var_t *var);
43 const char *ast_var_name(const struct ast_var_t *var);
44 const char *ast_var_full_name(const struct ast_var_t *var);
45 const char *ast_var_value(const struct ast_var_t *var);
46 
47 #endif /* _ASTERISK_CHANVARS_H */
const char * ast_var_value(const struct ast_var_t *var)
Definition: chanvars.c:89
struct ast_var_t * ast_var_assign(const char *name, const char *value)
Definition: chanvars.c:41
const char * ast_var_name(const struct ast_var_t *var)
Definition: chanvars.c:69
#define var
Definition: ast_expr2f.c:606
void ast_var_delete(struct ast_var_t *var)
Definition: chanvars.c:63
char * value
Definition: chanvars.h:30
A set of macros to manage forward-linked lists.
char name[0]
Definition: chanvars.h:31
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
Definition: linkedlists.h:224
const char * ast_var_full_name(const struct ast_var_t *var)
Definition: chanvars.c:84
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
Definition: linkedlists.h:409
struct ast_var_t::@158 entries