2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
*/
|
|
|
|
|
2003-09-18 03:27:33 +04:00
|
|
|
/** \file
|
|
|
|
* Fetching of data from a URL (interface).
|
2003-02-09 15:58:15 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_DESKTOP_FETCH_H_
|
|
|
|
#define _NETSURF_DESKTOP_FETCH_H_
|
|
|
|
|
2003-08-29 16:57:14 +04:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2003-06-26 15:41:26 +04:00
|
|
|
typedef enum {FETCH_TYPE, FETCH_DATA, FETCH_FINISHED, FETCH_ERROR, FETCH_REDIRECT} fetch_msg;
|
2003-02-09 15:58:15 +03:00
|
|
|
|
|
|
|
struct content;
|
|
|
|
struct fetch;
|
|
|
|
|
|
|
|
void fetch_init(void);
|
|
|
|
struct fetch * fetch_start(char *url, char *referer,
|
2003-08-29 16:57:14 +04:00
|
|
|
void (*callback)(fetch_msg msg, void *p, char *data, unsigned long size),
|
|
|
|
void *p, bool only_2xx);
|
2003-02-09 15:58:15 +03:00
|
|
|
void fetch_abort(struct fetch *f);
|
|
|
|
void fetch_poll(void);
|
|
|
|
void fetch_quit(void);
|
2003-03-15 18:53:20 +03:00
|
|
|
const char *fetch_filetype(const char *unix_path);
|
2003-02-09 15:58:15 +03:00
|
|
|
|
|
|
|
#endif
|