FreeSWITCH API Documentation
1.7.0
|
Macros | |
#define | switch_regex_safe_free(re) |
Typedefs | |
typedef struct real_pcre | switch_regex_t |
Functions | |
switch_regex_t * | switch_regex_compile (const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables) |
int | switch_regex_copy_substring (const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size) |
void | switch_regex_free (void *data) |
int | switch_regex_perform (const char *field, const char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen) |
void | switch_perform_substitution (switch_regex_t *re, int match_count, const char *data, const char *field_data, char *substituted, switch_size_t len, int *ovector) |
switch_status_t | switch_regex_match (const char *target, const char *expression) |
Function to evaluate an expression against a string. More... | |
switch_status_t | switch_regex_match_partial (const char *target, const char *expression, int *partial_match) |
Function to evaluate an expression against a string. More... | |
void | switch_capture_regex (switch_regex_t *re, int match_count, const char *field_data, int *ovector, const char *var, switch_cap_callback_t callback, void *user_data) |
void | switch_regex_set_var_callback (const char *var, const char *val, void *user_data) |
void | switch_regex_set_event_header_callback (const char *var, const char *val, void *user_data) |
#define switch_regex_safe_free | ( | re | ) |
Definition at line 79 of file switch_regex.h.
Referenced by switch_channel_set_timestamps(), switch_ivr_check_presence_mapping(), switch_ivr_menu_execute(), switch_ivr_phrase_macro_event(), switch_regex_perform(), and switch_str_time().
typedef struct real_pcre switch_regex_t |
Definition at line 43 of file switch_regex.h.
void switch_capture_regex | ( | switch_regex_t * | re, |
int | match_count, | ||
const char * | field_data, | ||
int * | ovector, | ||
const char * | var, | ||
switch_cap_callback_t | callback, | ||
void * | user_data | ||
) |
Definition at line 193 of file switch_regex.c.
void switch_perform_substitution | ( | switch_regex_t * | re, |
int | match_count, | ||
const char * | data, | ||
const char * | field_data, | ||
char * | substituted, | ||
switch_size_t | len, | ||
int * | ovector | ||
) |
Definition at line 131 of file switch_regex.c.
Referenced by switch_ivr_menu_execute(), and switch_ivr_phrase_macro_event().
switch_regex_t* switch_regex_compile | ( | const char * | pattern, |
int | options, | ||
const char ** | errorptr, | ||
int * | erroroffset, | ||
const unsigned char * | tables | ||
) |
Definition at line 36 of file switch_regex.c.
int switch_regex_copy_substring | ( | const char * | subject, |
int * | ovector, | ||
int | stringcount, | ||
int | stringnumber, | ||
char * | buffer, | ||
int | size | ||
) |
Definition at line 44 of file switch_regex.c.
Referenced by switch_str_time().
void switch_regex_free | ( | void * | data | ) |
Definition at line 49 of file switch_regex.c.
switch_status_t switch_regex_match | ( | const char * | target, |
const char * | expression | ||
) |
Function to evaluate an expression against a string.
target | The string to find a match in |
expression | The regular expression to run against the string |
Definition at line 295 of file switch_regex.c.
References switch_regex_match_partial().
Referenced by switch_ivr_dmachine_check_match(), switch_play_and_get_digits(), and switch_xml_config_parse_event().
switch_status_t switch_regex_match_partial | ( | const char * | target, |
const char * | expression, | ||
int * | partial_match | ||
) |
Function to evaluate an expression against a string.
target | The string to find a match in |
expression | The regular expression to run against the string |
partial_match | If non-zero returns SUCCESS if the target is a partial match, on successful return, this is set to non-zero if the match was partial and zero if it was a full match |
Definition at line 210 of file switch_regex.c.
References SWITCH_CHANNEL_LOG, switch_goto_status, SWITCH_LOG_ERROR, switch_log_printf(), switch_safe_free, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_regex_match().
int switch_regex_perform | ( | const char * | field, |
const char * | expression, | ||
switch_regex_t ** | new_re, | ||
int * | ovector, | ||
uint32_t | olen | ||
) |
Definition at line 55 of file switch_regex.c.
References switch_ast2regex(), SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), switch_regex_safe_free, and switch_safe_free.
Referenced by switch_channel_set_timestamps(), switch_ivr_check_presence_mapping(), switch_ivr_menu_execute(), switch_ivr_phrase_macro_event(), and switch_str_time().
void switch_regex_set_event_header_callback | ( | const char * | var, |
const char * | val, | ||
void * | user_data | ||
) |
Definition at line 308 of file switch_regex.c.
References switch_event_add_header_string(), and SWITCH_STACK_BOTTOM.
void switch_regex_set_var_callback | ( | const char * | var, |
const char * | val, | ||
void * | user_data | ||
) |
Definition at line 301 of file switch_regex.c.
References switch_channel_add_variable_var_check(), switch_core_session_get_channel(), SWITCH_FALSE, and SWITCH_STACK_PUSH.