summaryrefslogtreecommitdiff
path: root/desktop/save_complete.h
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2012-11-03 23:19:28 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2012-11-03 23:19:45 +0000
commitf824ab8af4d3d2e34bd59b860b9c6d5568c3bb44 (patch)
tree70f5f8d5a3ec2f952b18f59a6ed632f207f8a50f /desktop/save_complete.h
parent3f1b68384562fe294a1a263214a3fd26ea869bc9 (diff)
downloadnetsurf-f824ab8af4d3d2e34bd59b860b9c6d5568c3bb44.tar.gz
netsurf-f824ab8af4d3d2e34bd59b860b9c6d5568c3bb44.tar.bz2
Port save complete to libdom.
Diffstat (limited to 'desktop/save_complete.h')
-rw-r--r--desktop/save_complete.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/desktop/save_complete.h b/desktop/save_complete.h
index 6970ceaac..3c389a56f 100644
--- a/desktop/save_complete.h
+++ b/desktop/save_complete.h
@@ -25,19 +25,34 @@
#define _NETSURF_DESKTOP_SAVE_COMPLETE_H_
#include <stdbool.h>
-#include <libxml/HTMLtree.h>
#include <libwapcaplet/libwapcaplet.h>
struct hlcache_handle;
-void save_complete_init(void);
-bool save_complete(struct hlcache_handle *c, const char *path);
+/**
+ * Callback to set type of a file
+ *
+ * \param path Native path of file
+ * \param mime_type MIME type of file content
+ */
+typedef void (*save_complete_set_type_cb)(const char *path,
+ lwc_string *mime_type);
-bool save_complete_gui_save(const char *path, const char *filename,
- size_t len, const char *sourcedata, lwc_string *mime_type);
+/**
+ * Initialise save complete module.
+ */
+void save_complete_init(void);
-int save_complete_htmlSaveFileFormat(const char *path, const char *filename,
- xmlDocPtr cur, const char *encoding, int format);
+/**
+ * Save an HTML page with all dependencies.
+ *
+ * \param c CONTENT_HTML to save
+ * \param path Native path to directory to save in to (must exist)
+ * \param set_type Callback to set type of a file, or NULL
+ * \return true on success, false on error and error reported
+ */
+bool save_complete(struct hlcache_handle *c, const char *path,
+ save_complete_set_type_cb set_type);
#endif