diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-05-19 21:01:09 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-05-19 21:01:09 +0100 |
commit | 1347f9e3a66dfab4813099f979cb2668e0a29e11 (patch) | |
tree | 5accf4ec48cfd2a1f3ef826b50043ebb680141d5 /utils/nsurl.h | |
parent | 20d46406ed0f5abbca57e13360bec4c17495c999 (diff) | |
download | netsurf-1347f9e3a66dfab4813099f979cb2668e0a29e11.tar.gz netsurf-1347f9e3a66dfab4813099f979cb2668e0a29e11.tar.bz2 |
nsurl: Expose scheme type accessor.
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r-- | utils/nsurl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h index a80deeff9..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 |