VirtualBox

source: vbox/trunk/src/libs/curl-8.11.1/lib/progress.h@ 108333

最後變更 在這個檔案從108333是 108048,由 vboxsync 提交於 7 週 前

curl-8.11.1: Applied and adjusted our curl changes to 8.7.1. jiraref:VBP-1535

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.9 KB
 
1#ifndef HEADER_CURL_PROGRESS_H
2#define HEADER_CURL_PROGRESS_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 * SPDX-License-Identifier: curl
24 *
25 ***************************************************************************/
26
27#include "timeval.h"
28
29
30typedef enum {
31 TIMER_NONE,
32 TIMER_STARTOP,
33 TIMER_STARTSINGLE, /* start of transfer, might get queued */
34 TIMER_POSTQUEUE, /* start, immediately after dequeue */
35 TIMER_NAMELOOKUP,
36 TIMER_CONNECT,
37 TIMER_APPCONNECT,
38 TIMER_PRETRANSFER,
39 TIMER_STARTTRANSFER,
40 TIMER_POSTRANSFER,
41 TIMER_STARTACCEPT,
42 TIMER_REDIRECT,
43 TIMER_LAST /* must be last */
44} timerid;
45
46int Curl_pgrsDone(struct Curl_easy *data);
47void Curl_pgrsStartNow(struct Curl_easy *data);
48void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
49void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
50
51/* It is fine to not check the return code if 'size' is set to 0 */
52CURLcode Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
53
54void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
55void Curl_ratelimit(struct Curl_easy *data, struct curltime now);
56int Curl_pgrsUpdate(struct Curl_easy *data);
57void Curl_pgrsUpdate_nometer(struct Curl_easy *data);
58
59void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
60struct curltime Curl_pgrsTime(struct Curl_easy *data, timerid timer);
61timediff_t Curl_pgrsLimitWaitTime(struct pgrs_dir *d,
62 curl_off_t speed_limit,
63 struct curltime now);
64/**
65 * Update progress timer with the elapsed time from its start to `timestamp`.
66 * This allows updating timers later and is used by happy eyeballing, where
67 * we only want to record the winner's times.
68 */
69void Curl_pgrsTimeWas(struct Curl_easy *data, timerid timer,
70 struct curltime timestamp);
71
72void Curl_pgrsEarlyData(struct Curl_easy *data, curl_off_t sent);
73
74#define PGRS_HIDE (1<<4)
75#define PGRS_UL_SIZE_KNOWN (1<<5)
76#define PGRS_DL_SIZE_KNOWN (1<<6)
77#define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */
78
79#endif /* HEADER_CURL_PROGRESS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette