jabberd2
2.2.16
|
#include "util.h"
Go to the source code of this file.
typedef struct _xdata_field_st* xdata_field_t |
typedef struct _xdata_option_st* xdata_option_t |
typedef struct _xdata_item_st* xdata_item_t |
enum xdata_type_t |
enum xdata_field_type_t |
JABBERD2_API xdata_t xdata_new | ( | xdata_type_t | type, |
char * | title, | ||
char * | instructions | ||
) |
creation
Definition at line 26 of file xdata.c.
References pool_new, pmalloco(), _xdata_st::p, _xdata_st::type, _xdata_st::title, pstrdup(), _xdata_st::instructions, log_debug, and ZONE.
Referenced by xdata_parse().
parse a nad and build
Definition at line 269 of file xdata.c.
References log_debug, ZONE, nad_st::ecur, NAD_NURI_L, NAD_ENS, uri_XDATA, NAD_NURI, NAD_ENAME_L, NAD_ENAME, nad_find_attr(), NAD_AVAL_L, NAD_AVAL, xdata_new(), xd_type_FORM, xd_type_RESULT, xd_type_SUBMIT, xd_type_CANCEL, nad_find_elem(), NAD_CDATA_L, pool_free(), _xdata_st::p, _xdata_st::title, pmalloco(), NAD_CDATA, _xdata_st::instructions, pstrdupx(), _xdata_st::type, _xdata_field_parse(), xdata_add_field(), and xd_type_NONE.
JABBERD2_API xdata_field_t xdata_field_new | ( | xdata_t | xd, |
xdata_field_type_t | type, | ||
char * | var, | ||
char * | label, | ||
char * | desc, | ||
int | required | ||
) |
new field
Definition at line 49 of file xdata.c.
References pmalloco(), _xdata_st::p, _xdata_field_st::p, _xdata_field_st::type, _xdata_field_st::var, pstrdup(), _xdata_field_st::label, _xdata_field_st::desc, and _xdata_field_st::required.
JABBERD2_API xdata_item_t xdata_item_new | ( | xdata_t | xd | ) |
new item
Definition at line 73 of file xdata.c.
References pmalloco(), _xdata_st::p, and _xdata_item_st::p.
JABBERD2_API void xdata_add_field | ( | xdata_t | xd, |
xdata_field_t | xdf | ||
) |
field insertion
Definition at line 86 of file xdata.c.
References _xdata_st::fields, _xdata_st::flast, and _xdata_field_st::next.
Referenced by xdata_parse().
JABBERD2_API void xdata_add_rfield | ( | xdata_t | xd, |
xdata_field_t | xdf | ||
) |
Definition at line 98 of file xdata.c.
References _xdata_st::rfields, _xdata_st::rflast, and _xdata_field_st::next.
JABBERD2_API void xdata_add_field_item | ( | xdata_item_t | item, |
xdata_field_t | xdf | ||
) |
Definition at line 110 of file xdata.c.
References _xdata_item_st::fields, _xdata_item_st::flast, and _xdata_field_st::next.
JABBERD2_API void xdata_add_item | ( | xdata_t | xd, |
xdata_item_t | xdi | ||
) |
item insertion
Definition at line 123 of file xdata.c.
References _xdata_st::items, _xdata_st::ilast, and _xdata_item_st::next.
JABBERD2_API void xdata_add_option | ( | xdata_field_t | xdf, |
char * | value, | ||
int | lvalue, | ||
char * | label, | ||
int | llabel | ||
) |
option insertion
JABBERD2_API void xdata_add_value | ( | xdata_field_t | xdf, |
char * | value, | ||
int | vlen | ||
) |
value insertion
Definition at line 160 of file xdata.c.
References _xdata_field_st::values, _xdata_field_st::nvalues, pstrdupx(), _xdata_field_st::p, and pool_cleanup().
Referenced by _xdata_field_parse().