summaryrefslogtreecommitdiff
path: root/utils/nsurl.h
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-08-09 15:35:24 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2018-08-09 16:19:42 +0100
commitadd6dcc0158526bde3cb0785083c0761153fad57 (patch)
tree5dff173cfad22b014fef4e0dbbc9401fdfc00510 /utils/nsurl.h
parentbc280f0e3fb4fbbea868fb4b17f1ea71ecd90ead (diff)
downloadnetsurf-add6dcc0158526bde3cb0785083c0761153fad57.tar.gz
netsurf-add6dcc0158526bde3cb0785083c0761153fad57.tar.bz2
nsurl: Add variant of nsurl_access for logging.
Diffstat (limited to 'utils/nsurl.h')
-rw-r--r--utils/nsurl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 054baf26b..bc6e910a6 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -181,6 +181,24 @@ const char *nsurl_access(const nsurl *url);
/**
+ * Variant of \ref nsurl_access for logging.
+ *
+ * \param url NetSurf URL to retrieve a string pointer for.
+ * \return the required string
+ *
+ * This will not necessarily return the actual nsurl's URL, but something
+ * that is suitable for recording to logs. E.g. URLs with the `data` scheme
+ * will return a simple place holder, to avoid repeatedly dumping loads of data.
+ *
+ * The returned string is owned by the NetSurf URL object. It will die
+ * with the NetSurf URL object. Keep a reference to the URL if you need it.
+ *
+ * The returned string has a trailing '\0'.
+ */
+const char *nsurl_access_log(const nsurl *url);
+
+
+/**
* Get a UTF-8 string (for human readable IDNs) from a NetSurf URL object
*
* \param url NetSurf URL object