#include "parse_event.h"
#include "../mem/mem.h"
#include "../dprint.h"
#include <string.h>
#include "../trim.h"
#include <stdio.h>
#include "../ut.h"

Go to the source code of this file.
Defines | |
| #define | DIALOG_SLA_STR "dialog;sla" |
| #define | DIALOG_SLA_STR_LEN 10 |
| #define | DIALOG_STR "dialog" |
| #define | DIALOG_STR_LEN 6 |
| #define | MWI_STR "message-summary" |
| #define | MWI_STR_LEN 15 |
| #define | PRES_SIP_PROFILE_STR "sip-profile" |
| #define | PRES_SIP_PROFILE_STR_LEN 11 |
| #define | PRES_STR "presence" |
| #define | PRES_STR_LEN 8 |
| #define | PRES_WINFO_STR "presence.winfo" |
| #define | PRES_WINFO_STR_LEN 14 |
| #define | PRES_XCAP_CHANGE_STR "xcap-change" |
| #define | PRES_XCAP_CHANGE_STR_LEN 11 |
Functions | |
| int | event_parser (char *_s, int _l, event_t *_e) |
| void | free_event (event_t **_e) |
| int | parse_event (struct hdr_field *_h) |
| void | print_event (event_t *_e) |
| static char * | skip_token (char *_b, int _l) |
The parser was written for Presence Agent module only. it recognize presence package only, no sub-packages, no parameters It should be replaced by a more generic parser if sub-packages or parameters should be parsed too.
Definition in file parse_event.c.
| #define DIALOG_SLA_STR "dialog;sla" |
Definition at line 61 of file parse_event.c.
| #define DIALOG_SLA_STR_LEN 10 |
Definition at line 62 of file parse_event.c.
| #define DIALOG_STR "dialog" |
| #define DIALOG_STR_LEN 6 |
| #define MWI_STR "message-summary" |
| #define MWI_STR_LEN 15 |
| #define PRES_SIP_PROFILE_STR "sip-profile" |
| #define PRES_SIP_PROFILE_STR_LEN 11 |
| #define PRES_STR "presence" |
| #define PRES_STR_LEN 8 |
| #define PRES_WINFO_STR "presence.winfo" |
| #define PRES_WINFO_STR_LEN 14 |
| #define PRES_XCAP_CHANGE_STR "xcap-change" |
| #define PRES_XCAP_CHANGE_STR_LEN 11 |
| int event_parser | ( | char * | _s, | |
| int | _l, | |||
| event_t * | _e | |||
| ) |
Definition at line 83 of file parse_event.c.
References buf, CLASS_ANY, DIALOG_STR, DIALOG_STR_LEN, EVENT_DIALOG, EVENT_DIALOG_SLA, EVENT_MWI, EVENT_OTHER, EVENT_PRESENCE, EVENT_PRESENCE_WINFO, EVENT_SIP_PROFILE, EVENT_XCAP_CHANGE, _str::len, LM_ERR, MWI_STR, MWI_STR_LEN, param::name, param::next, NULL, event::params, parse_params(), event::parsed, PRES_SIP_PROFILE_STR, PRES_SIP_PROFILE_STR_LEN, PRES_STR, PRES_STR_LEN, PRES_WINFO_STR, PRES_WINFO_STR_LEN, PRES_XCAP_CHANGE_STR, PRES_XCAP_CHANGE_STR_LEN, _str::s, skip_token(), event::text, and trim_leading().
Referenced by add_rls_event(), contains_event(), parse_event(), and pres_htable_restore().
| void free_event | ( | event_t ** | _e | ) |
Free all memory
Definition at line 190 of file parse_event.c.
References free_params(), and pkg_free.
Referenced by clean_hdr_field().
| int parse_event | ( | struct hdr_field * | _h | ) |
Parse Event header field body
Definition at line 160 of file parse_event.c.
References hdr_field::body, event_parser(), _str::len, LM_ERR, hdr_field::parsed, pkg_free, pkg_malloc, and _str::s.
Referenced by handle_publish(), handle_subscribe(), and rls_handle_subscribe().
| void print_event | ( | event_t * | _e | ) |
Print structure, for debugging only
Definition at line 205 of file parse_event.c.
References EVENT_PRESENCE, _str::len, event::parsed, _str::s, event::text, and ZSW.
| static char* skip_token | ( | char * | _b, | |
| int | _l | |||
| ) | [inline, static] |
1.5.6