NetSurf
save_complete.h
Go to the documentation of this file.
1/*
2 * Copyright 2004 John M Bell <jmb202@ecs.soton.ac.uk>
3 * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
4 *
5 * This file is part of NetSurf, http://www.netsurf-browser.org/
6 *
7 * NetSurf is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * NetSurf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20/** \file
21 * Save HTML document with dependencies (interface).
22 */
23
24#ifndef NETSURF_DESKTOP_SAVE_COMPLETE_H_
25#define NETSURF_DESKTOP_SAVE_COMPLETE_H_
26
27#include <stdbool.h>
28
29#include <libwapcaplet/libwapcaplet.h>
30
31struct hlcache_handle;
32
33/**
34 * Callback to set type of a file
35 *
36 * \param path Native path of file
37 * \param mime_type MIME type of file content
38 */
39typedef void (*save_complete_set_type_cb)(const char *path,
40 lwc_string *mime_type);
41
42/**
43 * Initialise save complete module.
44 */
45void save_complete_init(void);
46
47
48/**
49 * Finalise save complete module.
50 */
52
53/**
54 * Save an HTML page with all dependencies.
55 *
56 * \param c CONTENT_HTML to save
57 * \param path Native path to directory to save in to (must exist)
58 * \param set_type Callback to set type of a file, or NULL
59 * \return NSERROR_OK on success else error code
60 */
61nserror save_complete(struct hlcache_handle *c, const char *path,
63
64#endif
nserror
Enumeration of error codes.
Definition: errors.h:29
void save_complete_init(void)
Initialise save complete module.
void(* save_complete_set_type_cb)(const char *path, lwc_string *mime_type)
Callback to set type of a file.
Definition: save_complete.h:39
nserror save_complete(struct hlcache_handle *c, const char *path, save_complete_set_type_cb set_type)
Save an HTML page with all dependencies.
nserror save_complete_finalise(void)
Finalise save complete module.
High-level cache handle.
Definition: hlcache.c:66
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
Definition: plot.c:821