23#ifndef _NETSURF_UTILS_NSURL_H_
24#define _NETSURF_UTILS_NSURL_H_
26#include <libwapcaplet/libwapcaplet.h>
132 char **url_s,
size_t *url_l);
nserror
Enumeration of error codes.
nserror nsurl_get_utf8(const nsurl *url, char **url_s, size_t *url_l)
Get a UTF-8 string (for human readable IDNs) from a NetSurf URL object.
bool nsurl_compare(const nsurl *url1, const nsurl *url2, nsurl_component parts)
Compare two URLs.
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
nserror nsurl_defragment(const nsurl *url, nsurl **no_frag)
Create a NetSurf URL object without a fragment from a NetSurf URL.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
nserror nsurl_refragment(const nsurl *url, lwc_string *frag, nsurl **new_url)
Create a NetSurf URL object, adding a fragment to an existing URL object.
uint32_t nsurl_hash(const nsurl *url)
Get a URL's hash value.
nserror nsurl_get(const nsurl *url, nsurl_component parts, char **url_s, size_t *url_l)
Get URL (section) as a string, from a NetSurf URL object.
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
nserror nsurl_replace_query(const nsurl *url, const char *query, nsurl **new_url)
Create a NetSurf URL object, with query string replaced.
size_t nsurl_length(const nsurl *url)
Find the length of a NetSurf URL object's URL, as returned by nsurl_access.
bool nsurl_has_component(const nsurl *url, nsurl_component part)
Enquire about the existence of componenets in a given URL.
void nsurl_dump(const nsurl *url)
Dump a NetSurf URL's internal components to stderr.
enum nsurl_scheme_type nsurl_get_scheme_type(const nsurl *url)
Get the scheme type from a NetSurf URL object.
const char * nsurl_access_log(const nsurl *url)
Variant of nsurl_access for logging.
nserror nsurl_replace_scheme(const nsurl *url, lwc_string *scheme, nsurl **new_url)
Create a NetSurf URL object, with scheme replaced.
nserror nsurl_nice(const nsurl *url, char **result, bool remove_extensions)
Attempt to find a nice filename for a URL.
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
lwc_string * nsurl_get_component(const nsurl *url, nsurl_component part)
Get part of a URL as a lwc_string, from a NetSurf URL object.
nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
Join a base url to a relative link part, creating a new NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
nsurl_scheme_type
A type for URL schemes.
const char * nsurl_access_leaf(const nsurl *url)
Access a URL's path leaf as a string.
nserror nsurl_parent(const nsurl *url, nsurl **new_url)
Create a NetSurf URL object for URL with parent location of an existing URL.