Lines Matching refs:data

131 int Curl_pgrsDone(struct Curl_easy *data)  in Curl_pgrsDone()  argument
134 data->progress.lastshow = 0; in Curl_pgrsDone()
135 rc = Curl_pgrsUpdate(data); /* the final (forced) update */ in Curl_pgrsDone()
139 if(!(data->progress.flags & PGRS_HIDE) && in Curl_pgrsDone()
140 !data->progress.callback) in Curl_pgrsDone()
143 fprintf(data->set.err, "\n"); in Curl_pgrsDone()
145 data->progress.speeder_c = 0; /* reset the progress meter display */ in Curl_pgrsDone()
150 void Curl_pgrsResetTransferSizes(struct Curl_easy *data) in Curl_pgrsResetTransferSizes() argument
152 Curl_pgrsSetDownloadSize(data, -1); in Curl_pgrsResetTransferSizes()
153 Curl_pgrsSetUploadSize(data, -1); in Curl_pgrsResetTransferSizes()
160 void Curl_pgrsTimeWas(struct Curl_easy *data, timerid timer, in Curl_pgrsTimeWas() argument
172 data->progress.t_startop = timestamp; in Curl_pgrsTimeWas()
176 data->progress.t_startsingle = timestamp; in Curl_pgrsTimeWas()
177 data->progress.is_t_startransfer_set = FALSE; in Curl_pgrsTimeWas()
184 data->progress.t_postqueue = in Curl_pgrsTimeWas()
185 Curl_timediff_us(timestamp, data->progress.t_startop); in Curl_pgrsTimeWas()
188 data->progress.t_acceptdata = timestamp; in Curl_pgrsTimeWas()
191 delta = &data->progress.t_nslookup; in Curl_pgrsTimeWas()
194 delta = &data->progress.t_connect; in Curl_pgrsTimeWas()
197 delta = &data->progress.t_appconnect; in Curl_pgrsTimeWas()
200 delta = &data->progress.t_pretransfer; in Curl_pgrsTimeWas()
203 delta = &data->progress.t_starttransfer; in Curl_pgrsTimeWas()
210 if(data->progress.is_t_startransfer_set) { in Curl_pgrsTimeWas()
214 data->progress.is_t_startransfer_set = TRUE; in Curl_pgrsTimeWas()
218 delta = &data->progress.t_posttransfer; in Curl_pgrsTimeWas()
221 data->progress.t_redirect = Curl_timediff_us(timestamp, in Curl_pgrsTimeWas()
222 data->progress.start); in Curl_pgrsTimeWas()
226 timediff_t us = Curl_timediff_us(timestamp, data->progress.t_startsingle); in Curl_pgrsTimeWas()
240 struct curltime Curl_pgrsTime(struct Curl_easy *data, timerid timer) in Curl_pgrsTime() argument
244 Curl_pgrsTimeWas(data, timer, now); in Curl_pgrsTime()
248 void Curl_pgrsStartNow(struct Curl_easy *data) in Curl_pgrsStartNow() argument
250 data->progress.speeder_c = 0; /* reset the progress meter display */ in Curl_pgrsStartNow()
251 data->progress.start = Curl_now(); in Curl_pgrsStartNow()
252 data->progress.is_t_startransfer_set = FALSE; in Curl_pgrsStartNow()
253 data->progress.ul.limit.start = data->progress.start; in Curl_pgrsStartNow()
254 data->progress.dl.limit.start = data->progress.start; in Curl_pgrsStartNow()
255 data->progress.ul.limit.start_size = 0; in Curl_pgrsStartNow()
256 data->progress.dl.limit.start_size = 0; in Curl_pgrsStartNow()
257 data->progress.dl.cur_size = 0; in Curl_pgrsStartNow()
258 data->progress.ul.cur_size = 0; in Curl_pgrsStartNow()
260 data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT; in Curl_pgrsStartNow()
261 Curl_ratelimit(data, data->progress.start); in Curl_pgrsStartNow()
324 CURLcode Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size) in Curl_pgrsSetDownloadCounter() argument
326 data->progress.dl.cur_size = size; in Curl_pgrsSetDownloadCounter()
333 void Curl_ratelimit(struct Curl_easy *data, struct curltime now) in Curl_ratelimit() argument
336 if(data->set.max_recv_speed) { in Curl_ratelimit()
337 if(Curl_timediff(now, data->progress.dl.limit.start) >= in Curl_ratelimit()
339 data->progress.dl.limit.start = now; in Curl_ratelimit()
340 data->progress.dl.limit.start_size = data->progress.dl.cur_size; in Curl_ratelimit()
343 if(data->set.max_send_speed) { in Curl_ratelimit()
344 if(Curl_timediff(now, data->progress.ul.limit.start) >= in Curl_ratelimit()
346 data->progress.ul.limit.start = now; in Curl_ratelimit()
347 data->progress.ul.limit.start_size = data->progress.ul.cur_size; in Curl_ratelimit()
355 void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size) in Curl_pgrsSetUploadCounter() argument
357 data->progress.ul.cur_size = size; in Curl_pgrsSetUploadCounter()
360 void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size) in Curl_pgrsSetDownloadSize() argument
363 data->progress.dl.total_size = size; in Curl_pgrsSetDownloadSize()
364 data->progress.flags |= PGRS_DL_SIZE_KNOWN; in Curl_pgrsSetDownloadSize()
367 data->progress.dl.total_size = 0; in Curl_pgrsSetDownloadSize()
368 data->progress.flags &= ~PGRS_DL_SIZE_KNOWN; in Curl_pgrsSetDownloadSize()
372 void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size) in Curl_pgrsSetUploadSize() argument
375 data->progress.ul.total_size = size; in Curl_pgrsSetUploadSize()
376 data->progress.flags |= PGRS_UL_SIZE_KNOWN; in Curl_pgrsSetUploadSize()
379 data->progress.ul.total_size = 0; in Curl_pgrsSetUploadSize()
380 data->progress.flags &= ~PGRS_UL_SIZE_KNOWN; in Curl_pgrsSetUploadSize()
384 void Curl_pgrsEarlyData(struct Curl_easy *data, curl_off_t sent) in Curl_pgrsEarlyData() argument
386 data->progress.earlydata_sent = sent; in Curl_pgrsEarlyData()
404 static bool progress_calc(struct Curl_easy *data, struct curltime now) in progress_calc() argument
407 struct Progress * const p = &data->progress; in progress_calc()
503 static void progress_meter(struct Curl_easy *data) in progress_meter() argument
505 struct Progress *p = &data->progress; in progress_meter()
518 if(data->state.resume_from) { in progress_meter()
519 fprintf(data->set.err, in progress_meter()
521 data->state.resume_from); in progress_meter()
523 fprintf(data->set.err, in progress_meter()
553 fprintf(data->set.err, in progress_meter()
573 fflush(data->set.err); in progress_meter()
585 static int pgrsupdate(struct Curl_easy *data, bool showprogress) in pgrsupdate() argument
587 if(!(data->progress.flags & PGRS_HIDE)) { in pgrsupdate()
588 if(data->set.fxferinfo) { in pgrsupdate()
591 Curl_set_in_callback(data, TRUE); in pgrsupdate()
592 result = data->set.fxferinfo(data->set.progress_client, in pgrsupdate()
593 data->progress.dl.total_size, in pgrsupdate()
594 data->progress.dl.cur_size, in pgrsupdate()
595 data->progress.ul.total_size, in pgrsupdate()
596 data->progress.ul.cur_size); in pgrsupdate()
597 Curl_set_in_callback(data, FALSE); in pgrsupdate()
600 failf(data, "Callback aborted"); in pgrsupdate()
604 else if(data->set.fprogress) { in pgrsupdate()
607 Curl_set_in_callback(data, TRUE); in pgrsupdate()
608 result = data->set.fprogress(data->set.progress_client, in pgrsupdate()
609 (double)data->progress.dl.total_size, in pgrsupdate()
610 (double)data->progress.dl.cur_size, in pgrsupdate()
611 (double)data->progress.ul.total_size, in pgrsupdate()
612 (double)data->progress.ul.cur_size); in pgrsupdate()
613 Curl_set_in_callback(data, FALSE); in pgrsupdate()
616 failf(data, "Callback aborted"); in pgrsupdate()
622 progress_meter(data); in pgrsupdate()
628 int Curl_pgrsUpdate(struct Curl_easy *data) in Curl_pgrsUpdate() argument
631 bool showprogress = progress_calc(data, now); in Curl_pgrsUpdate()
632 return pgrsupdate(data, showprogress); in Curl_pgrsUpdate()
638 void Curl_pgrsUpdate_nometer(struct Curl_easy *data) in Curl_pgrsUpdate_nometer() argument
641 (void)progress_calc(data, now); in Curl_pgrsUpdate_nometer()