Go to the documentation of this file.00001 #ifndef HEADER_CURL_PROGRESS_H
00002 #define HEADER_CURL_PROGRESS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "timeval.h"
00026
00027
00028 typedef enum {
00029 TIMER_NONE,
00030 TIMER_STARTOP,
00031 TIMER_STARTSINGLE,
00032 TIMER_NAMELOOKUP,
00033 TIMER_CONNECT,
00034 TIMER_APPCONNECT,
00035 TIMER_PRETRANSFER,
00036 TIMER_STARTTRANSFER,
00037 TIMER_POSTRANSFER,
00038 TIMER_STARTACCEPT,
00039 TIMER_REDIRECT,
00040 TIMER_LAST
00041 } timerid;
00042
00043 int Curl_pgrsDone(struct connectdata *);
00044 void Curl_pgrsStartNow(struct Curl_easy *data);
00045 void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
00046 void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
00047 void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
00048 void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
00049 int Curl_pgrsUpdate(struct connectdata *);
00050 void Curl_pgrsResetTimesSizes(struct Curl_easy *data);
00051 void Curl_pgrsTime(struct Curl_easy *data, timerid timer);
00052 long Curl_pgrsLimitWaitTime(curl_off_t cursize,
00053 curl_off_t startsize,
00054 curl_off_t limit,
00055 struct timeval start,
00056 struct timeval now);
00057
00058
00059 #define LEAST_SIZE_PROGRESS BUFSIZE
00060
00061 #define PROGRESS_DOWNLOAD (1<<0)
00062 #define PROGRESS_UPLOAD (1<<1)
00063 #define PROGRESS_DOWN_AND_UP (PROGRESS_UPLOAD | PROGRESS_DOWNLOAD)
00064
00065 #define PGRS_SHOW_DL (1<<0)
00066 #define PGRS_SHOW_UL (1<<1)
00067 #define PGRS_DONE_DL (1<<2)
00068 #define PGRS_DONE_UL (1<<3)
00069 #define PGRS_HIDE (1<<4)
00070 #define PGRS_UL_SIZE_KNOWN (1<<5)
00071 #define PGRS_DL_SIZE_KNOWN (1<<6)
00072
00073 #define PGRS_HEADERS_OUT (1<<7)
00074
00075
00076 #endif
00077