Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/xml2/include/libxml/uri.h
4394 views
1
/**
2
* Summary: library of generic URI related routines
3
* Description: library of generic URI related routines
4
* Implements RFC 2396
5
*
6
* Copy: See Copyright for the status of this software.
7
*
8
* Author: Daniel Veillard
9
*/
10
11
#ifndef __XML_URI_H__
12
#define __XML_URI_H__
13
14
#include <stdio.h>
15
#include <libxml/xmlversion.h>
16
#include <libxml/xmlstring.h>
17
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
22
/**
23
* xmlURI:
24
*
25
* A parsed URI reference. This is a struct containing the various fields
26
* as described in RFC 2396 but separated for further processing.
27
*
28
* Note: query is a deprecated field which is incorrectly unescaped.
29
* query_raw takes precedence over query if the former is set.
30
* See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
31
*/
32
typedef struct _xmlURI xmlURI;
33
typedef xmlURI *xmlURIPtr;
34
struct _xmlURI {
35
char *scheme; /* the URI scheme */
36
char *opaque; /* opaque part */
37
char *authority; /* the authority part */
38
char *server; /* the server part */
39
char *user; /* the user part */
40
int port; /* the port number */
41
char *path; /* the path string */
42
char *query; /* the query string (deprecated - use with caution) */
43
char *fragment; /* the fragment identifier */
44
int cleanup; /* parsing potentially unclean URI */
45
char *query_raw; /* the query string (as it appears in the URI) */
46
};
47
48
/*
49
* This function is in tree.h:
50
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
51
* xmlNodePtr cur);
52
*/
53
XMLPUBFUN xmlURIPtr
54
xmlCreateURI (void);
55
XMLPUBFUN xmlChar *
56
xmlBuildURI (const xmlChar *URI,
57
const xmlChar *base);
58
XMLPUBFUN xmlChar *
59
xmlBuildRelativeURI (const xmlChar *URI,
60
const xmlChar *base);
61
XMLPUBFUN xmlURIPtr
62
xmlParseURI (const char *str);
63
XMLPUBFUN xmlURIPtr
64
xmlParseURIRaw (const char *str,
65
int raw);
66
XMLPUBFUN int
67
xmlParseURIReference (xmlURIPtr uri,
68
const char *str);
69
XMLPUBFUN xmlChar *
70
xmlSaveUri (xmlURIPtr uri);
71
XMLPUBFUN void
72
xmlPrintURI (FILE *stream,
73
xmlURIPtr uri);
74
XMLPUBFUN xmlChar *
75
xmlURIEscapeStr (const xmlChar *str,
76
const xmlChar *list);
77
XMLPUBFUN char *
78
xmlURIUnescapeString (const char *str,
79
int len,
80
char *target);
81
XMLPUBFUN int
82
xmlNormalizeURIPath (char *path);
83
XMLPUBFUN xmlChar *
84
xmlURIEscape (const xmlChar *str);
85
XMLPUBFUN void
86
xmlFreeURI (xmlURIPtr uri);
87
XMLPUBFUN xmlChar*
88
xmlCanonicPath (const xmlChar *path);
89
XMLPUBFUN xmlChar*
90
xmlPathToURI (const xmlChar *path);
91
92
#ifdef __cplusplus
93
}
94
#endif
95
#endif /* __XML_URI_H__ */
96
97