NetSurf
frontends
atari
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
22
extern
struct
gui_download_table
*
atari_download_table
;
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
32
typedef
enum
{
33
NSATARI_DOWNLOAD_NONE
,
34
NSATARI_DOWNLOAD_WORKING
,
35
NSATARI_DOWNLOAD_ERROR
,
36
NSATARI_DOWNLOAD_COMPLETE
,
37
NSATARI_DOWNLOAD_CANCELED
38
}
nsatari_download_status
;
39
40
struct
gui_download_window
{
41
struct
download_context
*
ctx
;
42
struct
gui_window
*
parent
;
43
GUIWIN *
guiwin
;
44
short
aes_handle
;
45
OBJECT *
tree
;
46
nsatari_download_status
status
;
47
char
*
destination
;
48
FILE *
fd
;
49
char
lbl_done
[
MAX_SLEN_LBL_DONE
];
50
char
lbl_percent
[
MAX_SLEN_LBL_PERCENT
];
51
char
lbl_speed
[
MAX_SLEN_LBL_SPEED
];
52
char
lbl_file
[
MAX_SLEN_LBL_FILE
];
53
uint32_t
start
;
54
uint32_t
lastrdw
;
55
uint32_t
size_total
;
56
uint32_t
size_downloaded
;
57
char
*
fbuf
;
58
size_t
fbufsize
;
59
bool
abort
;
60
bool
close_on_finish
;
61
};
62
63
#endif
nsatari_download_status
nsatari_download_status
Definition:
download.h:32
NSATARI_DOWNLOAD_NONE
@ NSATARI_DOWNLOAD_NONE
Definition:
download.h:33
NSATARI_DOWNLOAD_CANCELED
@ NSATARI_DOWNLOAD_CANCELED
Definition:
download.h:37
NSATARI_DOWNLOAD_COMPLETE
@ NSATARI_DOWNLOAD_COMPLETE
Definition:
download.h:36
NSATARI_DOWNLOAD_ERROR
@ NSATARI_DOWNLOAD_ERROR
Definition:
download.h:35
NSATARI_DOWNLOAD_WORKING
@ NSATARI_DOWNLOAD_WORKING
Definition:
download.h:34
MAX_SLEN_LBL_PERCENT
#define MAX_SLEN_LBL_PERCENT
Definition:
download.h:25
atari_download_table
struct gui_download_table * atari_download_table
Definition:
download.c:453
MAX_SLEN_LBL_FILE
#define MAX_SLEN_LBL_FILE
Definition:
download.h:27
MAX_SLEN_LBL_DONE
#define MAX_SLEN_LBL_DONE
Definition:
download.h:24
MAX_SLEN_LBL_SPEED
#define MAX_SLEN_LBL_SPEED
Definition:
download.h:26
download_context
A context for a download.
Definition:
download.c:40
gui_download_table
function table for download windows.
Definition:
download.h:34
gui_download_window
context for each download.
Definition:
download.c:91
gui_download_window::lbl_speed
char lbl_speed[MAX_SLEN_LBL_SPEED]
Definition:
download.h:51
gui_download_window::parent
struct gui_window * parent
Definition:
download.h:42
gui_download_window::size_total
uint32_t size_total
Definition:
download.h:55
gui_download_window::size_downloaded
uint32_t size_downloaded
Definition:
download.h:56
gui_download_window::lastrdw
uint32_t lastrdw
Definition:
download.h:54
gui_download_window::status
nsatari_download_status status
Definition:
download.h:46
gui_download_window::destination
char * destination
Definition:
download.h:47
gui_download_window::close_on_finish
bool close_on_finish
Definition:
download.h:60
gui_download_window::lbl_done
char lbl_done[MAX_SLEN_LBL_DONE]
Definition:
download.h:49
gui_download_window::guiwin
GUIWIN * guiwin
Definition:
download.h:43
gui_download_window::ctx
struct download_context * ctx
Associated context, or 0 if the fetch has completed or aborted.
Definition:
download.c:101
gui_download_window::lbl_file
char lbl_file[MAX_SLEN_LBL_FILE]
Definition:
download.h:52
gui_download_window::lbl_percent
char lbl_percent[MAX_SLEN_LBL_PERCENT]
Definition:
download.h:50
gui_download_window::tree
OBJECT * tree
Definition:
download.h:45
gui_download_window::fbuf
char * fbuf
Definition:
download.h:57
gui_download_window::aes_handle
short aes_handle
Definition:
download.h:44
gui_download_window::start
uint32_t start
Definition:
download.h:53
gui_download_window::abort
bool abort
Definition:
download.h:59
gui_download_window::fd
FILE * fd
Definition:
download.h:48
gui_download_window::fbufsize
size_t fbufsize
Definition:
download.h:58
gui_window
first entry in window list
Definition:
gui.c:297
Generated on Fri Nov 15 2024 15:34:01 for NetSurf by
1.9.4