00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _XL_LIB_H_
00029 #define _XL_LIB_H_
00030
00031 #include "../../parser/msg_parser.h"
00032
00033 typedef int (*item_func_t) (struct sip_msg*, str*, str*, int, int);
00034 typedef void (*item_free_t) (str*);
00035
00036 typedef struct _xl_elog
00037 {
00038 str text;
00039 str hparam;
00040 int hindex;
00041 int hflags;
00042 item_func_t itf;
00043 item_free_t free_f;
00044 struct _xl_elog *next;
00045 } xl_elog_t, *xl_elog_p;
00046
00047
00048
00049 typedef int (*xl_parse_cb) (str *, int, xl_elog_p);
00050
00051 typedef int (xl_elog_free_all_f)(xl_elog_p log);
00052
00053 typedef int (xl_parse_format_f)(char *s, xl_elog_p *el);
00054
00055 typedef int (xl_parse_format2_f)(char *s, xl_elog_p *el, xl_parse_cb cb);
00056 typedef int (xl_print_log_f)(struct sip_msg*, xl_elog_t*, char*, int*);
00057
00058 typedef str* (xl_get_nulstr_f)(void);
00059
00060 typedef struct xl_api {
00061 xl_print_log_f *xprint;
00062 xl_parse_format_f *xparse;
00063 xl_parse_format_f *shm_xparse;
00064 xl_parse_format2_f *xparse2;
00065 xl_parse_format2_f *shm_xparse2;
00066 xl_elog_free_all_f *xfree;
00067 xl_elog_free_all_f *shm_xfree;
00068 xl_get_nulstr_f *xnulstr;
00069 } xl_api_t;
00070
00071 typedef int (xl_bind_f)(xl_api_t *xl_api);
00072
00073
00074 xl_bind_f xl_bind;
00075
00076 xl_elog_free_all_f xl_elog_free_all;
00077 xl_parse_format_f xl_parse_format;
00078
00079 xl_elog_free_all_f xl_elog_shm_free_all;
00080 xl_parse_format_f xl_shm_parse_format;
00081
00082 xl_parse_format2_f xl_parse_format2;
00083
00084 xl_parse_format2_f xl_shm_parse_format2;
00085
00086
00087 xl_print_log_f xl_print_log;
00088 xl_get_nulstr_f xl_get_nulstr;
00089
00090 int xl_mod_init();
00091 int xl_child_init(int);
00092 #endif
00093