/*---------------------------------------------------------------------------*/
/* XmlIo.h                                                                   */
/* copyright (c) innovaphone 2015                                            */
/*                                                                           */
/*---------------------------------------------------------------------------*/

@interface XmlIo : NSObject

#define XML_ROOT_TAG            0xffff
#define XML_NO_TAG              0xffff

@property (copy) void (^reset)(void);
@property (copy) int (^add)(int type, int base, NSString *s);
@property (copy) void (^set_complete)(int base);
@property (copy) int (^get_base)(int base);
@property (copy) int (^add_tag)(int base, NSString *name);
@property (copy) void (^add_attrib)(int base, NSString *name, NSString *value);
@property (copy) void (^add_attrib_bool)(int base, NSString *name, bool b);
@property (copy) void (^add_attrib_int)(int base, NSString *name, int c);
@property (copy) void (^add_attrib_unsigned)(int base, NSString *name, int c);
@property (copy) void (^add_attrib_string)(int base, NSString *name, NSString *str);
@property (copy) void (^add_content)(int base, NSString *s);
@property (copy) void (^encode_to_string)(int current, NSMutableString *str);
@property (copy) void (^encode)(NSMutableString *str);

+ (unsigned) xml_to_str:(char *)buffer in:(const char *)in in_len:(unsigned)in_len;

+ (id) xmlIo;

- (id) init;

@end
