mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
add arrays to event headers and chanvars
This commit is contained in:
1 parent
b978d39d48
commit
c1c759526d
16 files changed
+889
-252
No files matched your search
@@ -67,6 +67,10 @@ SWITCH_BEGIN_EXTERN_C
|
||||
char *name;
|
||||
/*! the header value */
|
||||
char *value;
|
||||
/*! array space */
|
||||
char **array;
|
||||
/*! array index */
|
||||
int idx;
|
||||
/*! hash of the header name */
|
||||
unsigned long hash;
|
||||
struct switch_event_header *next;
|
||||
@@ -99,7 +103,8 @@ struct switch_event {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
EF_UNIQ_HEADERS = (1 << 0)
|
||||
EF_UNIQ_HEADERS = (1 << 0),
|
||||
EF_CONTAINS_ARRAYS = (1 << 1),
|
||||
} switch_event_flag_t;
|
||||
|
||||
|
||||
@@ -146,7 +151,10 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event,
|
||||
\param header_name the name of the header to read
|
||||
\return the value of the requested header
|
||||
*/
|
||||
_Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, const char *header_name);
|
||||
|
||||
_Ret_opt_z_ SWITCH_DECLARE(switch_event_header_t *) switch_event_get_header_ptr(switch_event_t *event, const char *header_name);
|
||||
_Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header_idx(switch_event_t *event, const char *header_name, int idx);
|
||||
#define switch_event_get_header(_e, _h) switch_event_get_header_idx(_e, _h, -1)
|
||||
|
||||
#define switch_event_get_header_nil(e, h) switch_str_nil(switch_event_get_header(e,h))
|
||||
|
||||
|
||||
Reference in new issue
Block a user