--- /dev/null
+/*\r
+ * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com.\r
+ * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.\r
+ * Redistribution and modifications are permitted subject to BSD license.\r
+ */\r
+#ifndef _XER_SUPPORT_H_\r
+#define _XER_SUPPORT_H_\r
+\r
+#include <asn_system.h> /* Platform-specific types */\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/*\r
+ * Types of data transferred to the application.\r
+ */\r
+typedef enum {\r
+ PXML_TEXT, /* Plain text between XML tags. */\r
+ PXML_TAG, /* A tag, starting with '<'. */\r
+ PXML_COMMENT, /* An XML comment, including "<!--" and "-->". */\r
+ /* \r
+ * The following chunk types are reported if the chunk\r
+ * terminates the specified XML element.\r
+ */\r
+ PXML_TAG_END, /* Tag ended */\r
+ PXML_COMMENT_END /* Comment ended */\r
+} pxml_chunk_type_e;\r
+\r
+/*\r
+ * Callback function that is called by the parser when parsed data is\r
+ * available. The _opaque is the pointer to a field containing opaque user \r
+ * data specified in pxml_create() call. The chunk type is _type and the text \r
+ * data is the piece of buffer identified by _bufid (as supplied to\r
+ * pxml_feed() call) starting at offset _offset and of _size bytes size. \r
+ * The chunk is NOT '\0'-terminated.\r
+ */\r
+typedef int (pxml_callback_f)(pxml_chunk_type_e _type,\r
+ const void *_chunk_data, size_t _chunk_size, void *_key);\r
+\r
+/*\r
+ * Parse the given buffer as it were a chunk of XML data.\r
+ * Invoke the specified callback each time the meaninful data is found.\r
+ * This function returns number of bytes consumed from the bufer.\r
+ * It will always be lesser than or equal to the specified _size.\r
+ * The next invocation of this function must account the difference.\r
+ */\r
+ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size,\r
+ pxml_callback_f *cb, void *_key);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _XER_SUPPORT_H_ */\r