Home | History | Annotate | Download | only in gpxe

Lines Matching refs:uri

18  * Terminology for this data structure is as per uri(7), except that
21 * Note that all fields within a URI are optional and may be NULL.
24 * be accessed in array fashion in some places in uri.c where doing so
47 struct uri {
70 /** A field in a URI
73 * of the fields in the URI structure.
90 /** Extract field from URI */
91 #define uri_get_field( uri, field ) (&uri->scheme)[field]
93 /** All URI fields */
98 /** URI fields that should be decoded on storage */
103 * URI is an absolute URI
105 * @v uri URI
106 * @ret is_absolute URI is absolute
108 * An absolute URI begins with a scheme, e.g. "http:" or "mailto:".
109 * Note that this is a separate concept from a URI with an absolute
112 static inline int uri_is_absolute ( struct uri *uri ) {
113 return ( uri->scheme != NULL );
117 * URI has an absolute path
119 * @v uri URI
120 * @ret has_absolute_path URI has an absolute path
123 * concept from an absolute URI. Note also that a URI may not have a
126 static inline int uri_has_absolute_path ( struct uri *uri ) {
127 return ( uri->path && ( uri->path[0] == '/' ) );
131 * URI has a relative path
133 * @v uri URI
134 * @ret has_relative_path URI has a relative path
137 * this is a separate concept from a relative URI. Note also that a
138 * URI may not have a path at all.
140 static inline int uri_has_relative_path ( struct uri *uri ) {
141 return ( uri->path && ( uri->path[0] != '/' ) );
145 * Increment URI reference count
147 * @v uri URI, or NULL
148 * @ret uri URI as passed in
150 static inline __attribute__ (( always_inline )) struct uri *
151 uri_get ( struct uri *uri ) {
152 ref_get ( &uri->refcnt );
153 return uri;
157 * Decrement URI reference count
159 * @v uri URI, or NULL
162 uri_put ( struct uri *uri ) {
163 ref_put ( &uri->refcnt );
166 extern struct uri *cwuri;
168 extern struct uri * parse_uri ( const char *uri_string );
169 extern unsigned int uri_port ( struct uri *uri, unsigned int default_port );
170 extern int unparse_uri ( char *buf, size_t size, struct uri *uri,
172 extern struct uri * uri_dup ( struct uri *uri );
175 extern struct uri * resolve_uri ( struct uri *base_uri,
176 struct uri *relative_uri );
177 extern void churi ( struct uri *uri );