ELinks 0.18.0
progress.c File Reference
#include "elinks.h"
#include "network/progress.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/time.h"
Include dependency graph for progress.c:

Macros

#define SPD_DISP_TIME   ((milliseconds_T) 100)
 
#define CURRENT_SPD_AFTER   ((milliseconds_T) 100)
 

Functions

int has_progress (struct progress *progress)
 
struct progressinit_progress (off_t start)
 
void done_progress (struct progress *progress)
 
static void progress_timeout (void *progress_voidptr)
 Timer callback for progress.timer.
 
void update_progress (struct progress *progress, off_t loaded, off_t size, off_t pos)
 
void start_update_progress (struct progress *progress, void(*timer_func)(void *), void *timer_func_data)
 

Macro Definition Documentation

◆ CURRENT_SPD_AFTER

#define CURRENT_SPD_AFTER   ((milliseconds_T) 100)

◆ SPD_DISP_TIME

#define SPD_DISP_TIME   ((milliseconds_T) 100)

Function Documentation

◆ done_progress()

void done_progress ( struct progress * progress)

◆ has_progress()

int has_progress ( struct progress * progress)

◆ init_progress()

struct progress * init_progress ( off_t start)

◆ progress_timeout()

static void progress_timeout ( void * progress_voidptr)
static

Timer callback for progress.timer.

As explained in install_timer(), this function must erase the expired timer ID from all variables.

◆ start_update_progress()

void start_update_progress ( struct progress * progress,
void(* timer_func )(void *),
void * timer_func_data )

Unlike in install_timer(), timer_func need not erase the expired timer ID from progress->timer. update_progress() installs the timer with a wrapper function that takes care of erasing the timer ID.

◆ update_progress()

void update_progress ( struct progress * progress,
off_t loaded,
off_t size,
off_t pos )