Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:41:50

0001 /**
0002  * Summary: library of generic URI related routines
0003  * Description: library of generic URI related routines
0004  *              Implements RFC 2396
0005  *
0006  * Copy: See Copyright for the status of this software.
0007  *
0008  * Author: Daniel Veillard
0009  */
0010 
0011 #ifndef __XML_URI_H__
0012 #define __XML_URI_H__
0013 
0014 #include <stdio.h>
0015 #include <libxml/xmlversion.h>
0016 #include <libxml/xmlstring.h>
0017 
0018 #ifdef __cplusplus
0019 extern "C" {
0020 #endif
0021 
0022 /**
0023  * xmlURI:
0024  *
0025  * A parsed URI reference. This is a struct containing the various fields
0026  * as described in RFC 2396 but separated for further processing.
0027  *
0028  * Note: query is a deprecated field which is incorrectly unescaped.
0029  * query_raw takes precedence over query if the former is set.
0030  * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
0031  */
0032 typedef struct _xmlURI xmlURI;
0033 typedef xmlURI *xmlURIPtr;
0034 struct _xmlURI {
0035     char *scheme;   /* the URI scheme */
0036     char *opaque;   /* opaque part */
0037     char *authority;    /* the authority part */
0038     char *server;   /* the server part */
0039     char *user;     /* the user part */
0040     int port;       /* the port number */
0041     char *path;     /* the path string */
0042     char *query;    /* the query string (deprecated - use with caution) */
0043     char *fragment; /* the fragment identifier */
0044     int  cleanup;   /* parsing potentially unclean URI */
0045     char *query_raw;    /* the query string (as it appears in the URI) */
0046 };
0047 
0048 /*
0049  * This function is in tree.h:
0050  * xmlChar *    xmlNodeGetBase  (xmlDocPtr doc,
0051  *                               xmlNodePtr cur);
0052  */
0053 XMLPUBFUN xmlURIPtr
0054         xmlCreateURI        (void);
0055 XMLPUBFUN int
0056         xmlBuildURISafe     (const xmlChar *URI,
0057                      const xmlChar *base,
0058                      xmlChar **out);
0059 XMLPUBFUN xmlChar *
0060         xmlBuildURI     (const xmlChar *URI,
0061                      const xmlChar *base);
0062 XMLPUBFUN int
0063         xmlBuildRelativeURISafe (const xmlChar *URI,
0064                      const xmlChar *base,
0065                      xmlChar **out);
0066 XMLPUBFUN xmlChar *
0067         xmlBuildRelativeURI (const xmlChar *URI,
0068                      const xmlChar *base);
0069 XMLPUBFUN xmlURIPtr
0070         xmlParseURI     (const char *str);
0071 XMLPUBFUN int
0072         xmlParseURISafe     (const char *str,
0073                      xmlURIPtr *uri);
0074 XMLPUBFUN xmlURIPtr
0075         xmlParseURIRaw      (const char *str,
0076                      int raw);
0077 XMLPUBFUN int
0078         xmlParseURIReference    (xmlURIPtr uri,
0079                      const char *str);
0080 XMLPUBFUN xmlChar *
0081         xmlSaveUri      (xmlURIPtr uri);
0082 XMLPUBFUN void
0083         xmlPrintURI     (FILE *stream,
0084                      xmlURIPtr uri);
0085 XMLPUBFUN xmlChar *
0086         xmlURIEscapeStr         (const xmlChar *str,
0087                      const xmlChar *list);
0088 XMLPUBFUN char *
0089         xmlURIUnescapeString    (const char *str,
0090                      int len,
0091                      char *target);
0092 XMLPUBFUN int
0093         xmlNormalizeURIPath (char *path);
0094 XMLPUBFUN xmlChar *
0095         xmlURIEscape        (const xmlChar *str);
0096 XMLPUBFUN void
0097         xmlFreeURI      (xmlURIPtr uri);
0098 XMLPUBFUN xmlChar*
0099         xmlCanonicPath      (const xmlChar *path);
0100 XMLPUBFUN xmlChar*
0101         xmlPathToURI        (const xmlChar *path);
0102 
0103 #ifdef __cplusplus
0104 }
0105 #endif
0106 #endif /* __XML_URI_H__ */