From e21806ba296e3062960ad4f85e216d81753c5b7a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 20 Jan 2007 18:10:17 +0000 Subject: Extract common function from expat based parser --- common/sdp-xml.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'common/sdp-xml.h') diff --git a/common/sdp-xml.h b/common/sdp-xml.h index ab8ed09b..2d4d7d79 100644 --- a/common/sdp-xml.h +++ b/common/sdp-xml.h @@ -39,6 +39,22 @@ sdp_data_t *sdp_xml_parse_url(const char *data); sdp_data_t *sdp_xml_parse_int(const char *data, uint8_t dtd); sdp_data_t *sdp_xml_parse_uuid(const char *data); +struct sdp_xml_data { + char *text; /* Pointer to the current buffer */ + int size; /* Size of the current buffer */ + sdp_data_t *data; /* The current item being built */ + struct sdp_xml_data *next; /* Next item on the stack */ + char type; /* 0 = Text or Hexadecimal */ + char *name; /* Name, optional in the dtd */ + /* TODO: What is it used for? */ +}; + +struct sdp_xml_data *sdp_xml_data_alloc(); +void sdp_xml_data_free(struct sdp_xml_data *elem); +struct sdp_xml_data *sdp_xml_data_expand(struct sdp_xml_data *elem); + +sdp_data_t *sdp_xml_parse_datatype(const char *el, struct sdp_xml_data *elem); + sdp_record_t *sdp_xml_parse_record(const char *data, int size); - + #endif /* __SDP_XML_H */ -- cgit