#include "setup.h"#include <string.h>#include <time.h>#include <curl/curl.h>#include "urldata.h"#include "sendf.h"#include "progress.h"#include <curl/mprintf.h>Go to the source code of this file.
Defines | |
| #define | _MPRINTF_REPLACE |
| #define | ONE_KILOBYTE 1024 |
| #define | ONE_MEGABYTE (1024* ONE_KILOBYTE) |
| #define | ONE_GIGABYTE (1024* ONE_MEGABYTE) |
| #define | ONE_TERABYTE ((curl_off_t)1024* ONE_GIGABYTE) |
| #define | ONE_PETABYTE ((curl_off_t)1024* ONE_TERABYTE) |
Functions | |
| static void | time2str (char *r, long t) |
| static char * | max5data (curl_off_t bytes, char *max5) |
| void | Curl_pgrsDone (struct connectdata *conn) |
| void | Curl_pgrsResetTimes (struct SessionHandle *data) |
| void | Curl_pgrsTime (struct SessionHandle *data, timerid timer) |
| void | Curl_pgrsStartNow (struct SessionHandle *data) |
| void | Curl_pgrsSetDownloadCounter (struct SessionHandle *data, curl_off_t size) |
| void | Curl_pgrsSetUploadCounter (struct SessionHandle *data, curl_off_t size) |
| void | Curl_pgrsSetDownloadSize (struct SessionHandle *data, curl_off_t size) |
| void | Curl_pgrsSetUploadSize (struct SessionHandle *data, curl_off_t size) |
| int | Curl_pgrsUpdate (struct connectdata *conn) |
| #define _MPRINTF_REPLACE |
Definition at line 38 of file progress.c.
| #define ONE_GIGABYTE (1024* ONE_MEGABYTE) |
Referenced by max5data().
| #define ONE_KILOBYTE 1024 |
Referenced by max5data().
| #define ONE_MEGABYTE (1024* ONE_KILOBYTE) |
Referenced by max5data().
| #define ONE_PETABYTE ((curl_off_t)1024* ONE_TERABYTE) |
Referenced by max5data().
| #define ONE_TERABYTE ((curl_off_t)1024* ONE_GIGABYTE) |
Referenced by max5data().
| void Curl_pgrsDone | ( | struct connectdata * | conn | ) |
Definition at line 137 of file progress.c.
References Curl_pgrsUpdate(), connectdata::data, Progress::lastshow, SessionHandle::progress, and Progress::speeder_c.
Referenced by Curl_done(), and Curl_tftp_done().
| void Curl_pgrsResetTimes | ( | struct SessionHandle * | data | ) |
Definition at line 147 of file progress.c.
References SessionHandle::progress, Progress::t_connect, Progress::t_nslookup, Progress::t_pretransfer, and Progress::t_starttransfer.
Referenced by Curl_follow().
| void Curl_pgrsSetDownloadCounter | ( | struct SessionHandle * | data, | |
| curl_off_t | size | |||
| ) |
Definition at line 199 of file progress.c.
References Progress::downloaded, and SessionHandle::progress.
Referenced by Curl_file(), Curl_readwrite(), Curl_readwrite_init(), Curl_tftp(), and ftp_regular_transfer().
| void Curl_pgrsSetDownloadSize | ( | struct SessionHandle * | data, | |
| curl_off_t | size | |||
| ) |
Definition at line 209 of file progress.c.
References Progress::flags, PGRS_DL_SIZE_KNOWN, SessionHandle::progress, and Progress::size_dl.
Referenced by Curl_file(), Curl_readwrite(), Curl_readwrite_init(), and ftp_regular_transfer().
| void Curl_pgrsSetUploadCounter | ( | struct SessionHandle * | data, | |
| curl_off_t | size | |||
| ) |
Definition at line 204 of file progress.c.
References SessionHandle::progress, and Progress::uploaded.
Referenced by Curl_readwrite(), Curl_readwrite_init(), file_upload(), ftp_regular_transfer(), and tftp_tx().
| void Curl_pgrsSetUploadSize | ( | struct SessionHandle * | data, | |
| curl_off_t | size | |||
| ) |
Definition at line 218 of file progress.c.
References Progress::flags, PGRS_UL_SIZE_KNOWN, SessionHandle::progress, and Progress::size_ul.
Referenced by Curl_http(), file_upload(), ftp_regular_transfer(), ftp_state_stor_resp(), and tftp_send_first().
| void Curl_pgrsStartNow | ( | struct SessionHandle * | data | ) |
Definition at line 193 of file progress.c.
References Curl_tvnow, SessionHandle::progress, Progress::speeder_c, and Progress::start.
Referenced by Curl_file(), Curl_pretransfer(), and Curl_tftp_connect().
| void Curl_pgrsTime | ( | struct SessionHandle * | data, | |
| timerid | timer | |||
| ) |
Definition at line 155 of file progress.c.
References Curl_tvdiff_secs, Curl_tvnow, SessionHandle::progress, Progress::start, Progress::t_connect, Progress::t_nslookup, Progress::t_pretransfer, Progress::t_redirect, Progress::t_startsingle, Progress::t_starttransfer, TIMER_CONNECT, TIMER_NAMELOOKUP, TIMER_NONE, TIMER_POSTRANSFER, TIMER_PRETRANSFER, TIMER_REDIRECT, TIMER_STARTSINGLE, and TIMER_STARTTRANSFER.
Referenced by Curl_connect_host(), Curl_file(), Curl_follow(), Curl_protocol_connect(), Curl_readwrite(), Curl_readwrite_init(), multi_runsingle(), and SetupConnection().
| int Curl_pgrsUpdate | ( | struct connectdata * | conn | ) |
Definition at line 227 of file progress.c.
References Curl_tvdiff, Curl_tvnow, CURR_TIME, Progress::current_speed, connectdata::data, Progress::dlspeed, Progress::downloaded, UserDefined::err, failf, FALSE, Progress::flags, FORMAT_OFF_T, UserDefined::fprogress, Progress::lastshow, max5data(), PGRS_DL_SIZE_KNOWN, PGRS_HEADERS_OUT, PGRS_HIDE, PGRS_UL_SIZE_KNOWN, SessionHandle::progress, UserDefined::progress_client, SessionHandle::reqdata, HandleData::resume_from, SessionHandle::set, Progress::size_dl, Progress::size_ul, Progress::speeder, Progress::speeder_c, Progress::speeder_time, Progress::start, time2str(), Progress::timespent, TRUE, timeval::tv_sec, timeval::tv_usec, Progress::ulspeed, and Progress::uploaded.
Referenced by Curl_file(), Curl_GetFTPResponse(), Curl_pgrsDone(), Curl_readwrite(), Curl_tftp(), file_upload(), and multi_runsingle().
| static char* max5data | ( | curl_off_t | bytes, | |
| char * | max5 | |||
| ) | [static] |
Definition at line 69 of file progress.c.
References FORMAT_OFF_T, ONE_GIGABYTE, ONE_KILOBYTE, ONE_MEGABYTE, ONE_PETABYTE, and ONE_TERABYTE.
Referenced by Curl_pgrsUpdate().
| static void time2str | ( | char * | r, | |
| long | t | |||
| ) | [static] |
Definition at line 43 of file progress.c.
References simple_client::h, and simple_client::s.
Referenced by Curl_pgrsUpdate().
1.5.6