blob: e7aeda4156e4df6acd0c8649c6a665ef39ceb953 [file] [log] [blame]
Owen Taylor3473f882001-02-23 17:55:21 +00001/**
2 * uri.c: library of generic URI related routines
3 *
4 * Reference: RFC 2396
5 *
6 * See Copyright for the status of this software.
7 *
8 * Daniel.Veillard@w3.org
9 */
10
11#ifndef __XML_URI_H__
12#define __XML_URI_H__
13
14#include <libxml/tree.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/**
21 *
22 */
23typedef struct _xmlURI xmlURI;
24typedef xmlURI *xmlURIPtr;
25struct _xmlURI {
26 char *scheme;
27 char *opaque;
28 char *authority;
29 char *server;
30 char *user;
31 int port;
32 char *path;
33 char *query;
34 char *fragment;
35};
36
37/*
38 * This function is in tree.h:
39 * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
40 * xmlNodePtr cur);
41 */
42xmlURIPtr xmlCreateURI (void);
43xmlChar * xmlBuildURI (const xmlChar *URI,
44 const xmlChar *base);
45xmlURIPtr xmlParseURI (const char *URI);
46int xmlParseURIReference (xmlURIPtr uri,
47 const char *str);
48xmlChar * xmlSaveUri (xmlURIPtr uri);
49void xmlPrintURI (FILE *stream,
50 xmlURIPtr uri);
51char * xmlURIUnescapeString (const char *str,
52 int len,
53 char *target);
54int xmlNormalizeURIPath (char *path);
55xmlChar * xmlURIEscape (const xmlChar *str);
56void xmlFreeURI (xmlURIPtr uri);
57
58#ifdef __cplusplus
59}
60#endif
61#endif /* __XML_URI_H__ */