2003-06-30 12:44:03 +00:00
|
|
|
/*
|
2005-08-21 12:04:18 +00:00
|
|
|
* Copyright 2005 James Bursa <bursa@users.sourceforge.net>
|
2007-08-08 16:16:03 +00: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/>.
|
2003-02-09 12:58:15 +00:00
|
|
|
*/
|
|
|
|
|
2003-09-30 20:33:45 +00:00
|
|
|
/** \file
|
|
|
|
* High-level fetching, caching and conversion (interface).
|
|
|
|
*
|
2004-06-10 23:55:23 +00:00
|
|
|
* The fetchcache() / fetchcache_go() pair of functions retrieve a URL from
|
|
|
|
* the cache, or fetch, convert, and cache it if not cached.
|
2003-09-30 20:33:45 +00:00
|
|
|
*/
|
|
|
|
|
2003-02-09 12:58:15 +00:00
|
|
|
#ifndef _NETSURF_DESKTOP_FETCHCACHE_H_
|
|
|
|
#define _NETSURF_DESKTOP_FETCHCACHE_H_
|
|
|
|
|
2003-09-17 12:57:43 +00:00
|
|
|
#include <stdbool.h>
|
2005-08-21 12:04:18 +00:00
|
|
|
#include <stdint.h>
|
2007-05-30 22:39:54 +00:00
|
|
|
#include "content/content.h"
|
2003-02-09 12:58:15 +00:00
|
|
|
|
2003-10-25 14:13:49 +00:00
|
|
|
struct form_successful_control;
|
|
|
|
|
2004-06-10 23:55:23 +00:00
|
|
|
void fetchcache_init(void);
|
|
|
|
struct content * fetchcache(const char *url,
|
2005-08-21 12:04:18 +00:00
|
|
|
void (*callback)(content_msg msg, struct content *c,
|
|
|
|
intptr_t p1, intptr_t p2, union content_msg_data data),
|
|
|
|
intptr_t p1, intptr_t p2,
|
2004-06-10 23:55:23 +00:00
|
|
|
int width, int height,
|
|
|
|
bool no_error_pages,
|
|
|
|
char *post_urlenc,
|
|
|
|
struct form_successful_control *post_multipart,
|
2007-01-27 20:58:20 +00:00
|
|
|
bool verifiable,
|
2005-01-03 02:09:20 +00:00
|
|
|
bool download);
|
2007-01-27 20:58:20 +00:00
|
|
|
void fetchcache_go(struct content *content, const char *referer,
|
2005-08-21 12:04:18 +00:00
|
|
|
void (*callback)(content_msg msg, struct content *c,
|
|
|
|
intptr_t p1, intptr_t p2, union content_msg_data data),
|
|
|
|
intptr_t p1, intptr_t p2,
|
2005-01-24 23:02:37 +00:00
|
|
|
int width, int height,
|
2004-06-10 23:55:23 +00:00
|
|
|
char *post_urlenc,
|
|
|
|
struct form_successful_control *post_multipart,
|
2009-07-10 00:26:37 +00:00
|
|
|
bool verifiable, struct content *parent);
|
2003-02-09 12:58:15 +00:00
|
|
|
|
|
|
|
#endif
|