Asterisk - The Open Source Telephony Project
21.4.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
include
asterisk
ael_structs.h
Go to the documentation of this file.
1
/*
2
* Asterisk -- An open source telephony toolkit.
3
*
4
* Copyright (C) 1999 - 2007, 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 Structures for AEL - the Asterisk extension language
21
*
22
* \ref pbx_ael.c
23
* \todo document this file (ael.h)
24
*/
25
26
#ifndef _ASTERISK_AEL_STRUCTS_H
27
#define _ASTERISK_AEL_STRUCTS_H
28
29
/*
30
* We include asterisk/paths.h here because it is a convenient place
31
* that doesn't require us to rebuild ael files from .fl/.y
32
*/
33
#include "
asterisk/paths.h
"
34
35
#include "pval.h"
36
37
#if !defined(SOLARIS) && !defined(__CYGWIN__)
38
/* #include <err.h> */
39
#else
40
#define quad_t int64_t
41
#endif
42
43
#if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
44
#define QUAD_MIN LONG_LONG_MIN
45
#endif
46
#if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
47
#define QUAD_MAX LONG_LONG_MAX
48
#endif
49
50
# if ! defined(QUAD_MIN)
51
# define QUAD_MIN (-0x7fffffffffffffffLL-1)
52
# endif
53
# if ! defined(QUAD_MAX)
54
# define QUAD_MAX (0x7fffffffffffffffLL)
55
# endif
56
57
58
#if 0
59
#endif
60
void
ael2_semantic_check(
pval
*item,
int
*errs,
int
*warns,
int
*notes);
61
pval
*npval(pvaltype type,
int
first_line,
int
last_line,
int
first_column,
int
last_column);
62
pval
*linku1(
pval
*head,
pval
*tail);
63
void
ael2_print(
char
*fname,
pval
*tree);
64
struct
pval
*ael2_parse(
char
*fname,
int
*errs);
/* in ael.flex */
65
void
destroy_pval(
pval
*item);
66
67
extern
char
*prev_word;
/* in ael.flex */
68
69
#ifndef YY_TYPEDEF_YY_SCANNER_T
70
#define YY_TYPEDEF_YY_SCANNER_T
71
typedef
void
* yyscan_t;
72
#endif
73
74
/* for passing info into and out of yyparse */
75
struct
parse_io
76
{
77
struct
pval
*
pval
;
/* yyparse will set this to point to the parse tree */
78
yyscan_t scanner;
/* yylex needs a scanner. Set it up, and pass it in */
79
int
syntax_error_count;
/* the count of syntax errors encountered */
80
};
81
82
/* for CODE GENERATION */
83
84
typedef
enum
{ AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_RAND_CONTROL, AEL_LABEL, AEL_RETURN } ael_priority_type;
85
86
87
struct
ael_priority
88
{
89
int
priority_num;
90
ael_priority_type type;
91
92
char
*app;
93
char
*appargs;
94
95
struct
pval
*origin;
96
struct
ael_extension
*exten;
97
98
struct
ael_priority
*goto_true;
99
struct
ael_priority
*goto_false;
100
struct
ael_priority
*next;
101
};
102
103
struct
ael_extension
104
{
105
char
*name;
106
char
*cidmatch;
107
char
*
hints
;
108
int
regexten;
109
int
is_switch;
110
int
has_switch;
/* set if a switch exists in the extension */
111
int
checked_switch;
/* set if we checked for a switch in the extension -- so we don't have to do it again */
112
113
struct
ast_context
*context;
114
115
struct
ael_priority
*plist;
116
struct
ael_priority
*plist_last;
117
struct
ael_extension
*next_exten;
118
119
struct
ael_priority
*
loop_break
;
/*!< set by latest loop for breaks */
120
struct
ael_priority
*
loop_continue
;
/*!< set by lastest loop for continuing */
121
struct
ael_priority
*return_target;
122
int
return_needed;
123
};
124
125
#endif
/* _ASTERISK_AEL_STRUCTS_H */
paths.h
Asterisk file paths, configured in asterisk.conf.
pval
Definition:
pval.h:48
ael_extension::loop_break
struct ael_priority * loop_break
Definition:
ael_structs.h:119
ael_extension::loop_continue
struct ael_priority * loop_continue
Definition:
ael_structs.h:120
hints
Definition:
extconf.c:3622
ael_extension
Definition:
ael_structs.h:103
parse_io
Definition:
ael_structs.h:75
ael_priority
Definition:
ael_structs.h:87
ast_context
ast_context: An extension context
Definition:
pbx.c:284
Generated on Tue Jul 15 2025 11:50:26 for Asterisk - The Open Source Telephony Project by
1.8.10