From f824ab8af4d3d2e34bd59b860b9c6d5568c3bb44 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sat, 3 Nov 2012 23:19:28 +0000 Subject: Port save complete to libdom. --- desktop/save_complete.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'desktop/save_complete.h') 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 -#include #include 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 -- cgit v1.2.3