NetSurf
Data Structures | Functions | Variables
download.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "utils/errors.h"
#include "utils/ring.h"
#include "netsurf/download.h"
#include "desktop/download.h"
#include "monkey/output.h"
#include "monkey/browser.h"
Include dependency graph for download.c:

Go to the source code of this file.

Data Structures

struct  gui_download_window
 context for each download. More...
 

Functions

static struct gui_download_windowgui_download_window_create (download_context *ctx, struct gui_window *parent)
 
static nserror gui_download_window_data (struct gui_download_window *dw, const char *data, unsigned int size)
 
static void gui_download_window_error (struct gui_download_window *dw, const char *error_msg)
 
static void gui_download_window_done (struct gui_download_window *dw)
 

Variables

static uint32_t dwin_ctr = 0
 
static struct gui_download_windowdw_ring = NULL
 
static struct gui_download_table download_table
 
struct gui_download_tablemonkey_download_table = &download_table
 

Function Documentation

◆ gui_download_window_create()

static struct gui_download_window * gui_download_window_create ( download_context ctx,
struct gui_window parent 
)
static

Definition at line 45 of file download.c.

References gui_download_window::ctx, gui_download_window::dlctx, dw_ring, dwin_ctr, gui_download_window::dwin_num, gui_download_window::g, MOUT_DOWNLOAD, moutf(), parent, and RING_INSERT.

Here is the call graph for this function:

◆ gui_download_window_data()

static nserror gui_download_window_data ( struct gui_download_window dw,
const char *  data,
unsigned int  size 
)
static

Definition at line 64 of file download.c.

References gui_download_window::dwin_num, MOUT_DOWNLOAD, moutf(), NSERROR_OK, and gui_download_window::size.

Here is the call graph for this function:

◆ gui_download_window_done()

static void gui_download_window_done ( struct gui_download_window dw)
static

Definition at line 80 of file download.c.

References gui_download_window::dlctx, download_context_destroy(), dw_ring, gui_download_window::dwin_num, MOUT_DOWNLOAD, moutf(), and RING_REMOVE.

Here is the call graph for this function:

◆ gui_download_window_error()

static void gui_download_window_error ( struct gui_download_window dw,
const char *  error_msg 
)
static

Definition at line 73 of file download.c.

References gui_download_window::dwin_num, MOUT_DOWNLOAD, and moutf().

Here is the call graph for this function:

Variable Documentation

◆ download_table

struct gui_download_table download_table
static
Initial value:
= {
}
static nserror gui_download_window_data(struct gui_download_window *dw, const char *data, unsigned int size)
Definition: download.c:64
static void gui_download_window_error(struct gui_download_window *dw, const char *error_msg)
Definition: download.c:73
static void gui_download_window_done(struct gui_download_window *dw)
Definition: download.c:80
static struct gui_download_window * gui_download_window_create(download_context *ctx, struct gui_window *parent)
Definition: download.c:45

Definition at line 88 of file download.c.

◆ dw_ring

struct gui_download_window* dw_ring = NULL
static

Definition at line 42 of file download.c.

Referenced by gui_download_window_create(), and gui_download_window_done().

◆ dwin_ctr

uint32_t dwin_ctr = 0
static

Definition at line 31 of file download.c.

Referenced by gui_download_window_create().

◆ monkey_download_table

struct gui_download_table* monkey_download_table = &download_table

Definition at line 95 of file download.c.

Referenced by main().