yumapro
24.10-1
YumaPro SDK
|
XML output to a session control block or a file. More...
Data Structures | |
struct | walker_cookie_t |
XML walker cookie for GET callback processing. More... | |
Functions | |
void | xml_wr_buff (ses_cb_t *scb, const xmlChar *buff, uint32 bufflen) |
Write some xmlChars to the specified session. More... | |
void | xml_wr_begin_elem_ex (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent, boolean empty) |
Write a start or empty XML tag to the specified session. More... | |
void | xml_wr_begin_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, int32 indent) |
Write a start XML tag to the specified session without attributes. More... | |
void | xml_wr_empty_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, int32 indent) |
Write an empty XML tag to the specified session without attributes. More... | |
void | xml_wr_end_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t nsid, const xmlChar *elname, int32 indent) |
Write an end tag to the specified session. More... | |
void | xml_wr_string_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *str, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent) |
Write a start tag, simple string content, and an end tag to the specified session. More... | |
void | xml_wr_uint32_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, uint32 num, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent) |
Write a start tag, simple uint32 content, and an end tag to the specified session. More... | |
void | xml_wr_qname_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t val_nsid, const xmlChar *str, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent, boolean isdefault) |
Write a start tag, QName string content, and an end tag to the specified session. More... | |
void | xml_wr_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn) |
Write an NCX value in XML encoding while checking nodes for suppression of output with the supplied test fn. More... | |
void | xml_wr_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent) |
Output val_value_t node contents only. More... | |
void | xml_wr_max_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn, boolean force_xmlns) |
Generate entire val_value_t *w/filter) More... | |
void | xml_wr_max_check_val_force (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn, boolean force_xmlns, xmlns_id_t force_nsid, const xmlChar *force_name) |
Generate entire val_value_t *w/filter) More... | |
void | xml_wr_full_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn, boolean expand_varexpr) |
Generate entire val_value_t *w/filter) More... | |
void | xml_wr_full_check_val2 (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn, boolean force_xmlns, boolean expand_varexpr, xmlns_id_t parent_nsid) |
Generate entire val_value_t *w/filter) More... | |
void | xml_wr_file_write_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent, val_nodetest_fn_t testfn, boolean expand_varexpr, boolean file_write) |
Generate entire val_value_t *w/filter) More... | |
void | xml_wr_full_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent) |
Generate entire val_value_t. More... | |
void | xml_wr_full_val_origin (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent) |
Generate entire val_value_t with NMDA origin. More... | |
status_t | xml_wr_check_open_file (FILE *fp, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, int32 startindent, int32 indent, val_nodetest_fn_t testfn) |
Write the specified value to an open FILE in XML format. More... | |
status_t | xml_wr_check_open_file_ex (FILE *fp, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, boolean top_meta, int32 startindent, int32 indent, val_nodetest_fn_t testfn) |
Write the specified value to an open FILE in XML format Extended. More... | |
status_t | xml_wr_check_file (const xmlChar *filespec, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, int32 startindent, int32 indent, val_nodetest_fn_t testfn) |
Write the specified value to a FILE in XML format. More... | |
status_t | xml_wr_file (const xmlChar *filespec, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, int32 startindent, int32 indent) |
Write the specified value to a FILE in XML format. More... | |
void | xml_wr_check_child_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, obj_template_t *objnode, int32 indent, val_nodetest_fn_t testfn) |
Generate entire val_value_t *w/filter) for GET2. More... | |
void | xml_wr_check_child_obj_ex (ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *parent_get2cb, obj_template_t *objnode, int32 indent, val_nodetest_fn_t testfn) |
Write an entire <get2> val_value_t out from the obj_template_t callback. More... | |
XML output to a session control block or a file.
void xml_wr_begin_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
int32 | indent | ||
) |
Write a start XML tag to the specified session without attributes.
This is a low-level output function usually used internally
scb | session control block |
msg | top header from message in progress |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
void xml_wr_begin_elem_ex | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
const dlq_hdr_t * | attrQ, | ||
boolean | isattrq, | ||
int32 | indent, | ||
boolean | empty | ||
) |
Write a start or empty XML tag to the specified session.
This is a low-level output function usually used internally
scb | session control block |
msg | top header from message in progress |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
attrQ | Q of xml_attr_t or val_value_t records to write in the element; NULL == none |
isattrq | TRUE if the qQ contains xml_attr_t nodes FALSE if the Q contains val_value_t nodes (metadata) |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
empty | TRUE for empty node FALSE for start node |
void xml_wr_buff | ( | ses_cb_t * | scb, |
const xmlChar * | buff, | ||
uint32 | bufflen | ||
) |
Write some xmlChars to the specified session.
Simply writes the chars in buff
to session scb
scb | session control block to start msg |
buff | buffer to write |
bufflen | number of bytes to write, not including any EOS char at the end of the buffer |
void xml_wr_check_child_obj | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
obj_template_t * | objnode, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Generate entire val_value_t *w/filter) for GET2.
Write an entire <get2> val_value_t out from the obj_template_t callback Using an optional testfn to filter output This is the main API for server access to operational data
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | parent of the object to write |
objnode | child object node to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
void xml_wr_check_child_obj_ex | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
getcb_get2_t * | parent_get2cb, | ||
obj_template_t * | objnode, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Write an entire <get2> val_value_t out from the obj_template_t callback.
Using an optional testfn to filter output Start from parent_get2cb, not parent object node
scb | session control block |
msg | xml_msg_hdr_t in progress |
parent_get2cb | parent get2 control block of the object to write |
objnode | child object node to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
status_t xml_wr_check_file | ( | const xmlChar * | filespec, |
val_value_t * | val, | ||
xml_attrs_t * | attrs, | ||
boolean | docmode, | ||
boolean | xmlhdr, | ||
boolean | withns, | ||
boolean | expand_varexpr, | ||
boolean | with_owners, | ||
int32 | startindent, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Write the specified value to a FILE in XML format.
This is a main module API for high level code. A test function is added.
filespec | exact path of filename to open |
val | value for output |
attrs | top-level attributes to generate |
docmode | TRUE if XML_DOC output mode should be used FALSE if XML output mode should be used |
xmlhdr | TRUE if <?xml?> directive should be output FALSE if not |
withns | TRUE if xmlns attributes should be used FALSE to leave them out |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
with_owners | TRUE to generate ywx:owner attributes as needed |
startindent | starting indent point |
indent | indent amount (0..9 spaces) |
testfn | callback test function to use (NULL for no test) |
status_t xml_wr_check_open_file | ( | FILE * | fp, |
val_value_t * | val, | ||
xml_attrs_t * | attrs, | ||
boolean | docmode, | ||
boolean | xmlhdr, | ||
boolean | withns, | ||
boolean | expand_varexpr, | ||
boolean | with_owners, | ||
int32 | startindent, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Write the specified value to an open FILE in XML format.
This is a main module API for high level code
fp | open FILE control block |
val | value for output |
attrs | top-level attributes to generate |
docmode | TRUE if XML_DOC output mode should be used FALSE if XML output mode should be used |
xmlhdr | TRUE if <?xml?> directive should be output FALSE if not |
withns | TRUE if xmlns attributes should be used FALSE to leave them out |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
with_owners | TRUE to generate ywx:owner attributes as needed |
startindent | starting indent point |
indent | indent amount (0..9 spaces) |
testfn | callback test function to use (NULL for no test) |
status_t xml_wr_check_open_file_ex | ( | FILE * | fp, |
val_value_t * | val, | ||
xml_attrs_t * | attrs, | ||
boolean | docmode, | ||
boolean | xmlhdr, | ||
boolean | withns, | ||
boolean | expand_varexpr, | ||
boolean | with_owners, | ||
boolean | top_meta, | ||
int32 | startindent, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Write the specified value to an open FILE in XML format Extended.
This is a main module API for high level code. The top_meta parameter is added.
fp | open FILE control block |
val | value for output |
attrs | top-level attributes to generate |
docmode | TRUE if XML_DOC output mode should be used FALSE if XML output mode should be used |
xmlhdr | TRUE if <?xml?> directive should be output FALSE if not |
withns | TRUE if xmlns attributes should be used FALSE to leave them out |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
with_owners | TRUE to generate ywx:owner attributes as needed |
top_meta | TRUE to check val->metaQ id attrs is NULL |
startindent | starting indent point |
indent | indent amount (0..9 spaces) |
testfn | callback test function to use (NULL for no test) |
void xml_wr_check_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn | ||
) |
Write an NCX value in XML encoding while checking nodes for suppression of output with the supplied test fn.
!!! NOTE !!!
This function generates the contents of the val_value_t but not the top node itself. This function is called recursively and this is the intended behavior.
To generate XML for an entire val_value_t, including the top-level node, use the xml_wr_full_val fn.
If the acm_cache and acm_cbfn fields are set in the msg header then access control will be checked If FALSE, then nothing will be written to the output session
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
void xml_wr_empty_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
int32 | indent | ||
) |
Write an empty XML tag to the specified session without attributes.
This is a low-level output function usually used internally
scb | session control block |
msg | top header from message in progress |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
void xml_wr_end_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
int32 | indent | ||
) |
Write an end tag to the specified session.
This is a low-level output function usually used internally
scb | session control block |
msg | top header from message in progress |
nsid | namespace ID of the element to write zero to force no prefix lookup; use default NS |
elname | unqualified name of element to write |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
status_t xml_wr_file | ( | const xmlChar * | filespec, |
val_value_t * | val, | ||
xml_attrs_t * | attrs, | ||
boolean | docmode, | ||
boolean | xmlhdr, | ||
boolean | withns, | ||
boolean | expand_varexpr, | ||
boolean | with_owners, | ||
int32 | startindent, | ||
int32 | indent | ||
) |
Write the specified value to a FILE in XML format.
This is a main module API for high level code.
filespec | exact path of filename to open |
val | value for output |
attrs | top-level attributes to generate |
docmode | TRUE if XML_DOC output mode should be used FALSE if XML output mode should be used |
xmlhdr | TRUE if <?xml?> directive should be output FALSE if not |
withns | TRUE if xmlns attributes should be used FALSE to leave them out |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
with_owners | TRUE to generate ywx:owner attributes as needed |
startindent | starting indent point |
indent | indent amount (0..9 spaces) |
void xml_wr_file_write_check_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn, | ||
boolean | expand_varexpr, | ||
boolean | file_write | ||
) |
Generate entire val_value_t *w/filter)
Write an entire val_value_t out as XML, including the top level Using an optional testfn to filter output and file_write to specify how to handle ncx:password nodes
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
file_write | TRUE if write the specified value to an open FILE in XML format; FALSE otherwise |
void xml_wr_full_check_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn, | ||
boolean | expand_varexpr | ||
) |
Generate entire val_value_t *w/filter)
Write an entire val_value_t out as XML, including the top level Using an optional testfn to filter output
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
void xml_wr_full_check_val2 | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn, | ||
boolean | force_xmlns, | ||
boolean | expand_varexpr, | ||
xmlns_id_t | parent_nsid | ||
) |
Generate entire val_value_t *w/filter)
Write an entire val_value_t out as XML, including the top level Using an optional testfn to filter output
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
force_xmlns | force XMLNS attribute |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
parent_nsid | naespace ID of parent node (0 if unknown) |
void xml_wr_full_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent | ||
) |
Generate entire val_value_t.
Write an entire val_value_t out as XML, including the top level
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
void xml_wr_full_val_origin | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent | ||
) |
Generate entire val_value_t with NMDA origin.
Write an entire val_value_t out as XML, including the top level Send NMDA origin attribute if set in the val_value_t
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
void xml_wr_max_check_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn, | ||
boolean | force_xmlns | ||
) |
Generate entire val_value_t *w/filter)
Write an entire val_value_t out as XML, including the top level Using an optional testfn to filter output
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
force_xmlns | force XMLNS attribute |
void xml_wr_max_check_val_force | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent, | ||
val_nodetest_fn_t | testfn, | ||
boolean | force_xmlns, | ||
xmlns_id_t | force_nsid, | ||
const xmlChar * | force_name | ||
) |
Generate entire val_value_t *w/filter)
Write an entire val_value_t out as XML, including the top level Using an optional testfn to filter output
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |
testfn | callback function to use, NULL if not used |
force_xmlns | force XMLNS attribute |
force_nsid | top-level NSID to use instead of val (if set) |
force_name | top-level name to use instead of val (if set) |
void xml_wr_qname_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
xmlns_id_t | val_nsid, | ||
const xmlChar * | str, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
const dlq_hdr_t * | attrQ, | ||
boolean | isattrq, | ||
int32 | indent, | ||
boolean | isdefault | ||
) |
Write a start tag, QName string content, and an end tag to the specified session.
The ses_start_msg must be called before this function, in order for it to allow any writes
scb | session control block |
msg | top header from message in progress |
val_nsid | namespace ID of the QName prefix |
str | local-name part of the QName |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
attrQ | Q of xml_attr_t or val_value_t records to write in the element; NULL == none |
isattrq | TRUE if the qQ contains xml_attr_t nodes FALSE if the Q contains val_value_t nodes (metadata) |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
isdefault | TRUE if the XML value node represents a default leaf == FALSE otherwise |
void xml_wr_string_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
const xmlChar * | str, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
const dlq_hdr_t * | attrQ, | ||
boolean | isattrq, | ||
int32 | indent | ||
) |
Write a start tag, simple string content, and an end tag to the specified session.
A flag element and ename will vary from this format.
Simple content nodes are completed on a single line to prevent introduction of extra whitespace
scb | session control block |
msg | top header from message in progress |
str | simple string to write as element content |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
attrQ | Q of xml_attr_t or val_value_t records to write in the element; NULL == none |
isattrq | TRUE if the qQ contains xml_attr_t nodes FALSE if the Q contains val_value_t nodes (metadata) |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
void xml_wr_uint32_elem | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
uint32 | num, | ||
xmlns_id_t | parent_nsid, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | elname, | ||
const dlq_hdr_t * | attrQ, | ||
boolean | isattrq, | ||
int32 | indent | ||
) |
Write a start tag, simple uint32 content, and an end tag to the specified session.
A flag element and ename will vary from this format.
Simple content nodes are completed on a single line to prevent introduction of extra whitespace
scb | session control block |
msg | top header from message in progress |
num | number to write as element content |
parent_nsid | namespace ID of the parent element, if known |
nsid | namespace ID of the element to write |
elname | unqualified name of element to write |
attrQ | Q of xml_attr_t or val_value_t records to write in the element; NULL == none |
isattrq | TRUE if the qQ contains xml_attr_t nodes FALSE if the Q contains val_value_t nodes (metadata) |
indent | number of chars to indent after a newline == -1 means no newline or indent == 0 means just newline |
void xml_wr_val | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg, | ||
val_value_t * | val, | ||
int32 | indent | ||
) |
Output val_value_t node contents only.
Write an NCX value node in XML encoding See xml_wr_check_write for full details of this fn. It is the same, except a NULL testfn is supplied.
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
indent | start indent amount if indent enabled |