NetSurf
download.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 Ole Loots <ole@monochrom.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef NS_ATARI_DOWNLOAD_H
20#define NS_ATARI_DOWNLOAD_H
21
23
24#define MAX_SLEN_LBL_DONE 64
25#define MAX_SLEN_LBL_PERCENT 5
26#define MAX_SLEN_LBL_SPEED 13
27#define MAX_SLEN_LBL_FILE 256
28#define MAX_SLEN_BT_ABORT 5
29
30#define DOWNLOAD_BAR_MAX 300
31
32typedef enum {
39
41 struct download_context *ctx;
43 GUIWIN *guiwin;
45 OBJECT *tree;
48 FILE * fd;
53 uint32_t start;
54 uint32_t lastrdw;
55 uint32_t size_total;
57 char * fbuf;
58 size_t fbufsize;
59 bool abort;
61};
62
63#endif
nsatari_download_status
Definition: download.h:32
@ NSATARI_DOWNLOAD_NONE
Definition: download.h:33
@ NSATARI_DOWNLOAD_CANCELED
Definition: download.h:37
@ NSATARI_DOWNLOAD_COMPLETE
Definition: download.h:36
@ NSATARI_DOWNLOAD_ERROR
Definition: download.h:35
@ NSATARI_DOWNLOAD_WORKING
Definition: download.h:34
#define MAX_SLEN_LBL_PERCENT
Definition: download.h:25
struct gui_download_table * atari_download_table
Definition: download.c:453
#define MAX_SLEN_LBL_FILE
Definition: download.h:27
#define MAX_SLEN_LBL_DONE
Definition: download.h:24
#define MAX_SLEN_LBL_SPEED
Definition: download.h:26
A context for a download.
Definition: download.c:40
function table for download windows.
Definition: download.h:34
context for each download.
Definition: download.c:91
char lbl_speed[MAX_SLEN_LBL_SPEED]
Definition: download.h:51
struct gui_window * parent
Definition: download.h:42
uint32_t size_total
Definition: download.h:55
uint32_t size_downloaded
Definition: download.h:56
uint32_t lastrdw
Definition: download.h:54
nsatari_download_status status
Definition: download.h:46
char * destination
Definition: download.h:47
char lbl_done[MAX_SLEN_LBL_DONE]
Definition: download.h:49
GUIWIN * guiwin
Definition: download.h:43
struct download_context * ctx
Associated context, or 0 if the fetch has completed or aborted.
Definition: download.c:101
char lbl_file[MAX_SLEN_LBL_FILE]
Definition: download.h:52
char lbl_percent[MAX_SLEN_LBL_PERCENT]
Definition: download.h:50
uint32_t start
Definition: download.h:53
first entry in window list
Definition: gui.c:296