uclient-http: send correct "Host:" header if port is set
[project/uclient.git] / progress.h
1 #ifndef __PROGRESS_H
2 #define __PROGRESS_H
3
4 #include <sys/types.h>
5
6 struct progress {
7         unsigned int last_size;
8         unsigned int last_update_sec;
9         unsigned int last_change_sec;
10         unsigned int start_sec;
11         char *curfile;
12 };
13
14
15 void progress_init(struct progress *p, const char *curfile);
16 void progress_update(struct progress *p, off_t beg_size,
17                      off_t transferred, off_t totalsize);
18
19 static inline void
20 progress_free(struct progress *p)
21 {
22         free(p->curfile);
23 }
24
25 #endif