summaryrefslogtreecommitdiff
path: root/utils/nsurl.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-30 22:26:03 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-30 22:34:09 +0000
commit13832a453a6a4433b4dc62fb0092810671e8751e (patch)
treeed169637ffb4d4b3086c7addc2e903f494947924 /utils/nsurl.h
parent3ff7557c34618d8e5d0dceccbbfafa2361712f69 (diff)
downloadnetsurf-13832a453a6a4433b4dc62fb0092810671e8751e.tar.gz
netsurf-13832a453a6a4433b4dc62fb0092810671e8751e.tar.bz2
Add a nsurl_nice, which can replace url_nice.
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r--utils/nsurl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 435df73bd..ec00dede9 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -285,6 +285,19 @@ nserror nsurl_replace_query(const nsurl *url, const char *query,
/**
+ * Attempt to find a nice filename for a URL.
+ *
+ * \param url A NetSurf URL object to create a filename from
+ * \param result Updated to caller-owned string with filename
+ * \param remove_extensions remove any extensions from the filename
+ * \return NSERROR_OK on success, appropriate error otherwise
+ *
+ * Caller must ensure string result string is freed, if NSERROR_OK returned.
+ */
+nserror nsurl_nice(const nsurl *url, char **result, bool remove_extensions);
+
+
+/**
* Create a NetSurf URL object for URL with parent location of an existing URL.
*
* \param url NetSurf URL to create new NetSurf URL from