summaryrefslogtreecommitdiff
path: root/utils/nsurl.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-11 19:23:22 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-11 19:23:22 +0100
commitd84e3fd773e48f13dcfd594b5365fc93dbca93c9 (patch)
treefd0bd2d536d5a5afcd3fbb0c1221416790d1e6eb /utils/nsurl.h
parent6b7669dc0914a61d93dbc783783a46064fe61455 (diff)
downloadnetsurf-d84e3fd773e48f13dcfd594b5365fc93dbca93c9.tar.gz
netsurf-d84e3fd773e48f13dcfd594b5365fc93dbca93c9.tar.bz2
Add nsurl_replace_query. Add tests. Make tester itterate remaining lwc_strings.
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r--utils/nsurl.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 3b140e7ac..068d08b8d 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -243,6 +243,25 @@ nserror nsurl_refragment(const nsurl *url, lwc_string *frag, nsurl **new_url);
/**
+ * Create a NetSurf URL object, with query string replaced
+ *
+ * \param url NetSurf URL to create new NetSurf URL from
+ * \param query Query string to use
+ * \param new_url Returns new NetSurf URL with query string provided
+ * \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.
+ *
+ * Any query component in url is replaced with query in new_url.
+ */
+nserror nsurl_replace_query(const nsurl *url, const char *query,
+ 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