diff options
Diffstat (limited to 'pjlib-util/include')
-rw-r--r-- | pjlib-util/include/pjlib-util/scanner.h | 7 | ||||
-rw-r--r-- | pjlib-util/include/pjlib-util/xml.h | 23 |
2 files changed, 27 insertions, 3 deletions
diff --git a/pjlib-util/include/pjlib-util/scanner.h b/pjlib-util/include/pjlib-util/scanner.h index 59e9efe4..11c3a7b4 100644 --- a/pjlib-util/include/pjlib-util/scanner.h +++ b/pjlib-util/include/pjlib-util/scanner.h @@ -489,7 +489,8 @@ PJ_DECL(void) pj_scan_skip_line( pj_scanner *scanner ); * @param scanner The scanner. * @param state Variable to store scanner's state. */ -PJ_DECL(void) pj_scan_save_state( pj_scanner *scanner, pj_scan_state *state); +PJ_DECL(void) pj_scan_save_state( const pj_scanner *scanner, + pj_scan_state *state); /** @@ -501,7 +502,7 @@ PJ_DECL(void) pj_scan_save_state( pj_scanner *scanner, pj_scan_state *state); * @param state State of the scanner. */ PJ_DECL(void) pj_scan_restore_state( pj_scanner *scanner, - pj_scan_state *state); + pj_scan_state *state); /** * Get current column position. @@ -510,7 +511,7 @@ PJ_DECL(void) pj_scan_restore_state( pj_scanner *scanner, * * @return The column position. */ -PJ_INLINE(int) pj_scan_get_col( pj_scanner *scanner ) +PJ_INLINE(int) pj_scan_get_col( const pj_scanner *scanner ) { return scanner->curptr - scanner->start_line; } diff --git a/pjlib-util/include/pjlib-util/xml.h b/pjlib-util/include/pjlib-util/xml.h index d54fc2d5..a2b1d9eb 100644 --- a/pjlib-util/include/pjlib-util/xml.h +++ b/pjlib-util/include/pjlib-util/xml.h @@ -97,6 +97,29 @@ PJ_DECL(int) pj_xml_print( const pj_xml_node *node, char *buf, pj_size_t len, pj_bool_t include_prolog); /** + * Create an empty node. + * + * @param pool Pool. + * @param name Node name. + * + * @return The new node. + */ +PJ_DECL(pj_xml_node*) pj_xml_node_new(pj_pool_t *pool, const pj_str_t *name); + + +/** + * Create new XML attribute. + * + * @param pool Pool. + * @param name Attribute name. + * @param attr Attribute value. + * + * @return The new XML attribute. + */ +PJ_DECL(pj_xml_attr*) pj_xml_attr_new(pj_pool_t *pool, const pj_str_t *name, + const pj_str_t *value); + +/** * Add node to another node. * * @param parent Parent node. |