blob: 705e3851d2e8eb0895f4d3de3ca9fe795d3030ac [file] [log] [blame]
Daniel Veillard3dd82e72000-03-20 11:48:04 +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
Daniel Veillard361d8452000-04-03 19:48:13 +000014#include <libxml/tree.h>
Daniel Veillard3dd82e72000-03-20 11:48:04 +000015
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/**
21 *
22 */
23typedef struct _xmlURI xmlURI;
24typedef xmlURI *xmlURIPtr;
25struct _xmlURI {
26 char *scheme;
Daniel Veillard361d8452000-04-03 19:48:13 +000027 char *opaque;
Daniel Veillard3dd82e72000-03-20 11:48:04 +000028 char *authority;
29 char *server;
Daniel Veillard361d8452000-04-03 19:48:13 +000030 char *user;
Daniel Veillard3dd82e72000-03-20 11:48:04 +000031 int port;
Daniel Veillard3dd82e72000-03-20 11:48:04 +000032 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 */
Daniel Veillardfc708e22000-04-08 13:17:27 +000042xmlURIPtr xmlCreateURI (void);
Daniel Veillardec303412000-03-24 13:41:54 +000043xmlChar * xmlBuildURI (const xmlChar *URI,
44 const xmlChar *base);
45xmlURIPtr xmlParseURI (const char *URI);
Daniel Veillardbe803962000-06-28 23:40:59 +000046int xmlParseURIReference (xmlURIPtr uri,
47 const char *str);
Daniel Veillardec303412000-03-24 13:41:54 +000048xmlChar * xmlSaveUri (xmlURIPtr uri);
Daniel Veillard361d8452000-04-03 19:48:13 +000049void xmlPrintURI (FILE *stream,
50 xmlURIPtr uri);
51char * xmlURIUnescapeString (const char *str,
52 int len,
53 char *target);
Daniel Veillardec303412000-03-24 13:41:54 +000054int xmlNormalizeURIPath (char *path);
Daniel Veillard361d8452000-04-03 19:48:13 +000055void xmlFreeURI (xmlURIPtr uri);
Daniel Veillard3dd82e72000-03-20 11:48:04 +000056
57#ifdef __cplusplus
58}
59#endif
60#endif /* __XML_URI_H__ */