-
Notifications
You must be signed in to change notification settings - Fork 0
/
progress.h
32 lines (28 loc) · 1.23 KB
/
progress.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* zsync - client side rsync over http
* Copyright (C) 2004,2005,2009 Colin Phipps <cph@moria.org.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Artistic License v2 (see the accompanying
* file COPYING for the full license terms), or, at your option, any later
* version of the same license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* COPYING file for details.
*/
struct progress;
extern int no_progress;
/* struct progress* = start_progress()
* Returns a progress structure. Caller is responsible for calling
* end_progress() on it later (which will free the memory that it uses).
*/
struct progress* start_progress(void) __attribute__((malloc));
void do_progress(struct progress* p, float pcnt, long long newdl);
/* end_progress(struct progress*, done)
* done parameter is 0 for error, 1 for okay-but-incomplete, 2 for completed
* This frees the memory allocated for the progress data; the pointer is no
* longer valid when this function returns.
*/
void end_progress(struct progress* p, int done);