23 #ifndef _ASTERISK_CHANVARS_H
24 #define _ASTERISK_CHANVARS_H
36 struct varshead *ast_var_list_create(
void);
37 void ast_var_list_destroy(
struct varshead *head);
39 struct ast_var_t *_ast_var_assign(
const char *name,
const char *value,
const char *file,
int lineno,
const char *
function);
40 #define ast_var_assign(name, value) _ast_var_assign(name, value, __FILE__, __LINE__, __PRETTY_FUNCTION__)
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 char *ast_var_find(
const struct varshead *head,
const char *name);
49 #define AST_VAR_LIST_TRAVERSE(head, var) AST_LIST_TRAVERSE(head, var, entries)
51 static inline void AST_VAR_LIST_INSERT_TAIL(
struct varshead *head,
struct ast_var_t *var) {
57 static inline void AST_VAR_LIST_INSERT_HEAD(
struct varshead *head,
struct ast_var_t *var) {
A set of macros to manage forward-linked lists.
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.