mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-28 06:49:41 +03:00
4e67d451a7
Documented fetch. svn path=/import/netsurf/; revision=303
32 lines
859 B
C
32 lines
859 B
C
/*
|
|
* 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>
|
|
*/
|
|
|
|
/** \file
|
|
* Fetching of data from a URL (interface).
|
|
*/
|
|
|
|
#ifndef _NETSURF_DESKTOP_FETCH_H_
|
|
#define _NETSURF_DESKTOP_FETCH_H_
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef enum {FETCH_TYPE, FETCH_DATA, FETCH_FINISHED, FETCH_ERROR, FETCH_REDIRECT} fetch_msg;
|
|
|
|
struct content;
|
|
struct fetch;
|
|
|
|
void fetch_init(void);
|
|
struct fetch * fetch_start(char *url, char *referer,
|
|
void (*callback)(fetch_msg msg, void *p, char *data, unsigned long size),
|
|
void *p, bool only_2xx);
|
|
void fetch_abort(struct fetch *f);
|
|
void fetch_poll(void);
|
|
void fetch_quit(void);
|
|
const char *fetch_filetype(const char *unix_path);
|
|
|
|
#endif
|