diff options
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r-- | utils/nsurl.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h index 23dd3f251..90fb5decb 100644 --- a/utils/nsurl.h +++ b/utils/nsurl.h @@ -23,6 +23,7 @@ #ifndef _NETSURF_UTILS_NSURL_H_ #define _NETSURF_UTILS_NSURL_H_ +#include <libwapcaplet/libwapcaplet.h> #include "utils/errors.h" @@ -124,6 +125,29 @@ nserror nsurl_get(const nsurl *url, nsurl_component parts, /** + * Get part of a URL as a lwc_string, from a NetSurf URL object + * + * \param url NetSurf URL object + * \param part The URL component required + * \return the required component as an lwc_string, or NULL + * + * The caller owns the returned lwc_string and should call lwc_string_unref + * when they are done with it. + * + * The valid values for the part parameter are: + * NSURL_SCHEME + * NSURL_USERNAME + * NSURL_PASSWORD + * NSURL_HOST + * NSURL_PORT + * NSURL_PATH + * NSURL_QUERY + * NSURL_FRAGMENT + */ +lwc_string *nsurl_get_lwc(const nsurl *url, nsurl_component part); + + +/** * Enquire about the existence of componenets in a given URL * * \param url NetSurf URL object |