summaryrefslogtreecommitdiff
path: root/desktop/gui_fetch.h
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/gui_fetch.h')
-rw-r--r--desktop/gui_fetch.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/desktop/gui_fetch.h b/desktop/gui_fetch.h
index 46d31e0f4..20db39d20 100644
--- a/desktop/gui_fetch.h
+++ b/desktop/gui_fetch.h
@@ -47,9 +47,9 @@ struct gui_fetch_table {
/* Optional entries */
/**
- * Callback to translate resource to full url.
+ * Translate resource to full url.
*
- * @note used in resource fetcher
+ * @note Only used in resource fetcher
*
* Transforms a resource: path into a full URL. The returned URL
* is used as the target for a redirect. The caller takes ownership of
@@ -62,6 +62,33 @@ struct gui_fetch_table {
struct nsurl* (*get_resource_url)(const char *path);
/**
+ * Translate resource to source data.
+ *
+ * @note Only used in resource fetcher
+ *
+ * Obtains the data for a resource directly
+ *
+ * \param path The path of the resource to locate.
+ * \param data Pointer to recive data into
+ * \param data_len Pointer to length of returned data
+ * \return NSERROR_OK and the data and length values updated
+ * else appropriate error code.
+ */
+ nserror (*get_resource_data)(const char *path, const uint8_t **data, size_t *data_len);
+
+ /**
+ * Releases source data.
+ *
+ * @note Only used in resource fetcher
+ *
+ * Releases source data obtained from get_resource_data()
+ *
+ * \param data The value returned from a previous get_resource_data call
+ * \return NSERROR_OK on success else appropriate error code.
+ */
+ nserror (*release_resource_data)(const uint8_t *data);
+
+ /**
* Find a MIME type for a local file
*
* @note only used in curl fetcher on RISC OS otherwise its a