00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ASTERISK_OPTIONS_H
00024 #define _ASTERISK_OPTIONS_H
00025
00026 #if defined(__cplusplus) || defined(c_plusplus)
00027 extern "C" {
00028 #endif
00029
00030 #define AST_CACHE_DIR_LEN 512
00031 #define AST_FILENAME_MAX 80
00032 #define AST_CHANNEL_NAME 80
00033
00034
00035
00036 enum ast_option_flags {
00037
00038 AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0),
00039
00040 AST_OPT_FLAG_NO_FORK = (1 << 1),
00041
00042 AST_OPT_FLAG_QUIET = (1 << 2),
00043
00044 AST_OPT_FLAG_CONSOLE = (1 << 3),
00045
00046 AST_OPT_FLAG_HIGH_PRIORITY = (1 << 4),
00047
00048 AST_OPT_FLAG_INIT_KEYS = (1 << 5),
00049
00050 AST_OPT_FLAG_REMOTE = (1 << 6),
00051
00052 AST_OPT_FLAG_EXEC = (1 << 7),
00053
00054 AST_OPT_FLAG_NO_COLOR = (1 << 8),
00055
00056 AST_OPT_FLAG_FULLY_BOOTED = (1 << 9),
00057
00058 AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10),
00059
00060 AST_OPT_FLAG_DUMP_CORE = (1 << 12),
00061
00062 AST_OPT_FLAG_CACHE_RECORD_FILES = (1 << 13),
00063
00064 AST_OPT_FLAG_TIMESTAMP = (1 << 14),
00065
00066 AST_OPT_FLAG_OVERRIDE_CONFIG = (1 << 15),
00067
00068 AST_OPT_FLAG_RECONNECT = (1 << 16),
00069
00070 AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17),
00071
00072 AST_OPT_FLAG_DONT_WARN = (1 << 18),
00073
00074 AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN = (1 << 19),
00075
00076 AST_OPT_FLAG_INTERNAL_TIMING = (1 << 20),
00077
00078 AST_OPT_FLAG_ALWAYS_FORK = (1 << 21),
00079
00080 AST_OPT_FLAG_MUTE = (1 << 22),
00081
00082 AST_OPT_FLAG_DEBUG_FILE = (1 << 23),
00083
00084 AST_OPT_FLAG_VERBOSE_FILE = (1 << 24),
00085
00086 AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25),
00087
00088 AST_OPT_FLAG_INITIATED_SECONDS = (1 << 26),
00089
00090 AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27),
00091
00092 AST_OPT_FLAG_HIDE_CONSOLE_CONNECT = (1 << 28),
00093 };
00094
00095
00096 #define AST_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN
00097
00098 #define ast_opt_exec_includes ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES)
00099 #define ast_opt_no_fork ast_test_flag(&ast_options, AST_OPT_FLAG_NO_FORK)
00100 #define ast_opt_quiet ast_test_flag(&ast_options, AST_OPT_FLAG_QUIET)
00101 #define ast_opt_console ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE)
00102 #define ast_opt_high_priority ast_test_flag(&ast_options, AST_OPT_FLAG_HIGH_PRIORITY)
00103 #define ast_opt_init_keys ast_test_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS)
00104 #define ast_opt_remote ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE)
00105 #define ast_opt_exec ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC)
00106 #define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
00107 #define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
00108 #define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
00109 #define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
00110 #define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
00111 #define ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)
00112 #define ast_opt_override_config ast_test_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG)
00113 #define ast_opt_reconnect ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT)
00114 #define ast_opt_transmit_silence ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE)
00115 #define ast_opt_dont_warn ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN)
00116 #define ast_opt_end_cdr_before_h_exten ast_test_flag(&ast_options, AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN)
00117 #define ast_opt_internal_timing ast_test_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING)
00118 #define ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK)
00119 #define ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE)
00120 #define ast_opt_dbg_file ast_test_flag(&ast_options, AST_OPT_FLAG_DEBUG_FILE)
00121 #define ast_opt_verb_file ast_test_flag(&ast_options, AST_OPT_FLAG_VERBOSE_FILE)
00122 #define ast_opt_light_background ast_test_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND)
00123 #define ast_opt_force_black_background ast_test_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND)
00124 #define ast_opt_hide_connect ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_CONSOLE_CONNECT)
00125
00126 extern struct ast_flags ast_options;
00127
00128 enum ast_compat_flags {
00129 AST_COMPAT_DELIM_PBX_REALTIME = (1 << 0),
00130 AST_COMPAT_DELIM_RES_AGI = (1 << 1),
00131 AST_COMPAT_APP_SET = (1 << 2),
00132 };
00133
00134 #define ast_compat_pbx_realtime ast_test_flag(&ast_compat, AST_COMPAT_DELIM_PBX_REALTIME)
00135 #define ast_compat_res_agi ast_test_flag(&ast_compat, AST_COMPAT_DELIM_RES_AGI)
00136 #define ast_compat_app_set ast_test_flag(&ast_compat, AST_COMPAT_APP_SET)
00137
00138 extern struct ast_flags ast_compat;
00139
00140 extern int option_verbose;
00141 extern int option_maxfiles;
00142 extern int option_debug;
00143 extern int option_maxcalls;
00144 extern double option_maxload;
00145 #if defined(HAVE_SYSINFO)
00146 extern long option_minmemfree;
00147 #endif
00148 extern char defaultlanguage[];
00149
00150 extern struct timeval ast_startuptime;
00151 extern struct timeval ast_lastreloadtime;
00152 extern pid_t ast_mainpid;
00153
00154 extern char record_cache_dir[AST_CACHE_DIR_LEN];
00155 extern char dahdi_chan_name[AST_CHANNEL_NAME];
00156 extern int dahdi_chan_name_len;
00157
00158 extern int ast_language_is_prefix;
00159
00160 #if defined(__cplusplus) || defined(c_plusplus)
00161 }
00162 #endif
00163
00164 #endif