Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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.  
  31. struct 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.  */
  39. typedef void (*save_complete_set_type_cb)(const char *path,
  40.                 lwc_string *mime_type);
  41.  
  42. /**
  43.  * Initialise save complete module.
  44.  */
  45. void save_complete_init(void);
  46.  
  47. /**
  48.  * Save an HTML page with all dependencies.
  49.  *
  50.  * \param  c         CONTENT_HTML to save
  51.  * \param  path      Native path to directory to save in to (must exist)
  52.  * \param  set_type  Callback to set type of a file, or NULL
  53.  * \return  true on success, false on error and error reported
  54.  */
  55. bool save_complete(struct hlcache_handle *c, const char *path,
  56.                 save_complete_set_type_cb set_type);
  57.  
  58. #endif
  59.