2004-02-17 15:41:38 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2004 John M Bell <jmb202@ecs.soton.ac.uk>
|
2009-12-18 02:55:02 +03:00
|
|
|
* Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-02-17 15:41:38 +03:00
|
|
|
*/
|
|
|
|
|
2004-03-27 21:44:26 +03:00
|
|
|
/** \file
|
|
|
|
* Save HTML document with dependencies (interface).
|
|
|
|
*/
|
|
|
|
|
2019-11-05 02:39:13 +03:00
|
|
|
#ifndef NETSURF_DESKTOP_SAVE_COMPLETE_H_
|
|
|
|
#define NETSURF_DESKTOP_SAVE_COMPLETE_H_
|
2004-02-17 15:41:38 +03:00
|
|
|
|
2008-07-27 02:29:15 +04:00
|
|
|
#include <stdbool.h>
|
2011-05-07 00:40:09 +04:00
|
|
|
|
|
|
|
#include <libwapcaplet/libwapcaplet.h>
|
2009-12-18 02:55:02 +03:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle;
|
2004-02-17 15:41:38 +03:00
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
/**
|
|
|
|
* 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);
|
2004-02-17 15:41:38 +03:00
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
/**
|
|
|
|
* Initialise save complete module.
|
|
|
|
*/
|
|
|
|
void save_complete_init(void);
|
2009-12-18 02:55:02 +03:00
|
|
|
|
2019-10-25 00:20:57 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Finalise save complete module.
|
|
|
|
*/
|
|
|
|
nserror save_complete_finalise(void);
|
|
|
|
|
2012-11-04 03:19:28 +04:00
|
|
|
/**
|
|
|
|
* 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
|
2019-11-05 02:39:13 +03:00
|
|
|
* \return NSERROR_OK on success else error code
|
2012-11-04 03:19:28 +04:00
|
|
|
*/
|
2019-11-05 02:39:13 +03:00
|
|
|
nserror save_complete(struct hlcache_handle *c, const char *path,
|
2012-11-04 03:19:28 +04:00
|
|
|
save_complete_set_type_cb set_type);
|
2009-12-18 02:55:02 +03:00
|
|
|
|
2004-02-17 15:41:38 +03:00
|
|
|
#endif
|