diff options
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r-- | utils/nsurl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h index c6590bdbb..fcae12e0c 100644 --- a/utils/nsurl.h +++ b/utils/nsurl.h @@ -30,6 +30,16 @@ /** NetSurf URL object */ typedef struct nsurl nsurl; +/** A type for URL schemes */ +enum nsurl_scheme_type { + NSURL_SCHEME_OTHER, + NSURL_SCHEME_HTTP, + NSURL_SCHEME_HTTPS, + NSURL_SCHEME_FILE, + NSURL_SCHEME_FTP, + NSURL_SCHEME_MAILTO, + NSURL_SCHEME_DATA +}; typedef enum nsurl_component { NSURL_SCHEME = (1 << 0), @@ -146,6 +156,15 @@ lwc_string *nsurl_get_component(const nsurl *url, nsurl_component part); /** + * Get the scheme type from a NetSurf URL object + * + * \param url NetSurf URL object + * \return The URL scheme type. + */ +enum nsurl_scheme_type nsurl_get_scheme_type(const nsurl *url); + + +/** * Enquire about the existence of componenets in a given URL * * \param url NetSurf URL object @@ -369,4 +388,14 @@ nserror nsurl_nice(const nsurl *url, char **result, bool remove_extensions); */ nserror nsurl_parent(const nsurl *url, nsurl **new_url); +/** + * Dump a NetSurf URL's internal components to stderr + * + * This is helper functionality for developers, and shouldn't be called + * generally. + * + * \param url The NetSurf URL to dump components of + */ +void nsurl_dump(const nsurl *url); + #endif |