Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:09:33

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