mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
parser: Pass resource type to resource loader
This commit is contained in:
@@ -36,6 +36,16 @@ extern "C" {
|
||||
*/
|
||||
#define XML_DEFAULT_VERSION "1.0"
|
||||
|
||||
typedef enum {
|
||||
XML_RESOURCE_UNKNOWN = 0,
|
||||
XML_RESOURCE_MAIN_DOCUMENT,
|
||||
XML_RESOURCE_DTD,
|
||||
XML_RESOURCE_GENERAL_ENTITY,
|
||||
XML_RESOURCE_PARAMETER_ENTITY,
|
||||
XML_RESOURCE_XINCLUDE,
|
||||
XML_RESOURCE_XINCLUDE_TEXT
|
||||
} xmlResourceType;
|
||||
|
||||
/**
|
||||
* xmlParserInput:
|
||||
*
|
||||
@@ -161,7 +171,7 @@ typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
||||
|
||||
typedef int
|
||||
(*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
|
||||
int type, int flags, xmlParserInputPtr *out);
|
||||
xmlResourceType type, int flags, xmlParserInputPtr *out);
|
||||
|
||||
/**
|
||||
* xmlParserCtxt:
|
||||
|
||||
@@ -88,6 +88,9 @@ xmlParserNsUpdateSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
|
||||
XML_HIDDEN void *
|
||||
xmlParserNsLookupSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix);
|
||||
|
||||
XML_HIDDEN xmlParserInputPtr
|
||||
xmlLoadResource(xmlParserCtxtPtr ctxt, const char *url, const char *publicId,
|
||||
xmlResourceType type);
|
||||
XML_HIDDEN xmlParserInputPtr
|
||||
xmlNewInputURL(xmlParserCtxtPtr ctxt, const char *url, const char *publicId,
|
||||
const char *encoding, int flags);
|
||||
|
||||
Reference in New Issue
Block a user