summaryrefslogtreecommitdiff
path: root/utils/nsurl.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r--utils/nsurl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 96e7a76f8..3b140e7ac 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -241,4 +241,21 @@ nserror nsurl_defragment(const nsurl *url, nsurl **no_frag);
*/
nserror nsurl_refragment(const nsurl *url, lwc_string *frag, nsurl **new_url);
+
+/**
+ * Create a NetSurf URL object for URL with parent location of an existing URL.
+ *
+ * \param url NetSurf URL to create new NetSurf URL from
+ * \param new_url Returns new NetSurf URL with parent URL path
+ * \return NSERROR_OK on success, appropriate error otherwise
+ *
+ * If return value != NSERROR_OK, nothing will be returned in new_url.
+ *
+ * It is up to the client to call nsurl_destroy when they are finished with
+ * the created object.
+ *
+ * As well as stripping top most path segment, query and fragments are stripped.
+ */
+nserror nsurl_parent(const nsurl *url, nsurl **new_url);
+
#endif