From b46769d05371e501800a4658a0faf82c4ccdb0dd Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 12 Aug 2010 23:44:56 +0100 Subject: Some syntax checking fixups; don't make the same mistake of failing just if the MSN server is sending a little bit *more* info. And adding xt_insert_node() used in the ADL generation code. --- lib/xmltree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/xmltree.h') diff --git a/lib/xmltree.h b/lib/xmltree.h index 34e3be68..ddb3f02f 100644 --- a/lib/xmltree.h +++ b/lib/xmltree.h @@ -91,6 +91,7 @@ char *xt_find_attr( struct xt_node *node, const char *key ); struct xt_node *xt_new_node( char *name, const char *text, struct xt_node *children ); void xt_add_child( struct xt_node *parent, struct xt_node *child ); +void xt_insert_child( struct xt_node *parent, struct xt_node *child ); void xt_add_attr( struct xt_node *node, const char *key, const char *value ); int xt_remove_attr( struct xt_node *node, const char *key ); -- cgit v1.2.3 From d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 14 Aug 2010 13:20:59 +0100 Subject: Read incoming MSN status/away messages. --- lib/xmltree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/xmltree.h') diff --git a/lib/xmltree.h b/lib/xmltree.h index ddb3f02f..c1697ff5 100644 --- a/lib/xmltree.h +++ b/lib/xmltree.h @@ -78,9 +78,10 @@ struct xt_parser struct xt_parser *xt_new( const struct xt_handler_entry *handlers, gpointer data ); void xt_reset( struct xt_parser *xt ); -int xt_feed( struct xt_parser *xt, char *text, int text_len ); +int xt_feed( struct xt_parser *xt, const char *text, int text_len ); int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth ); void xt_cleanup( struct xt_parser *xt, struct xt_node *node, int depth ); +struct xt_node *xt_from_string( const char *in ); char *xt_to_string( struct xt_node *node ); void xt_print( struct xt_node *node ); struct xt_node *xt_dup( struct xt_node *node ); -- cgit v1.2.3 From d912fe4783cc9f5c2e7204f810df420359d5bee8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 15 Aug 2010 00:00:53 +0100 Subject: Add xt_find_path() to simplify digging through multi-level XML trees. --- lib/xmltree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/xmltree.h') diff --git a/lib/xmltree.h b/lib/xmltree.h index c1697ff5..5a0dbc8e 100644 --- a/lib/xmltree.h +++ b/lib/xmltree.h @@ -88,6 +88,7 @@ struct xt_node *xt_dup( struct xt_node *node ); void xt_free_node( struct xt_node *node ); void xt_free( struct xt_parser *xt ); struct xt_node *xt_find_node( struct xt_node *node, const char *name ); +struct xt_node *xt_find_path( struct xt_node *node, const char *name ); char *xt_find_attr( struct xt_node *node, const char *key ); struct xt_node *xt_new_node( char *name, const char *text, struct xt_node *children ); -- cgit v1.2.3