Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 1 | /** |
| 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 Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 14 | #include <libxml/tree.h> |
Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 15 | |
| 16 | #ifdef __cplusplus |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | /** |
| 21 | * |
| 22 | */ |
| 23 | typedef struct _xmlURI xmlURI; |
| 24 | typedef xmlURI *xmlURIPtr; |
| 25 | struct _xmlURI { |
| 26 | char *scheme; |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 27 | char *opaque; |
Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 28 | char *authority; |
| 29 | char *server; |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 30 | char *user; |
Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 31 | int port; |
Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 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 | */ |
Daniel Veillard | fc708e2 | 2000-04-08 13:17:27 +0000 | [diff] [blame] | 42 | xmlURIPtr xmlCreateURI (void); |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 43 | xmlChar * xmlBuildURI (const xmlChar *URI, |
| 44 | const xmlChar *base); |
| 45 | xmlURIPtr xmlParseURI (const char *URI); |
Daniel Veillard | be80396 | 2000-06-28 23:40:59 +0000 | [diff] [blame] | 46 | int xmlParseURIReference (xmlURIPtr uri, |
| 47 | const char *str); |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 48 | xmlChar * xmlSaveUri (xmlURIPtr uri); |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 49 | void xmlPrintURI (FILE *stream, |
| 50 | xmlURIPtr uri); |
| 51 | char * xmlURIUnescapeString (const char *str, |
| 52 | int len, |
| 53 | char *target); |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 54 | int xmlNormalizeURIPath (char *path); |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 55 | void xmlFreeURI (xmlURIPtr uri); |
Daniel Veillard | 3dd82e7 | 2000-03-20 11:48:04 +0000 | [diff] [blame] | 56 | |
| 57 | #ifdef __cplusplus |
| 58 | } |
| 59 | #endif |
| 60 | #endif /* __XML_URI_H__ */ |