1 /* 2 * zsync - client side rsync over http 3 * Copyright (C) 2004,2005,2009 Colin Phipps <cph@moria.org.uk> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the Artistic License v2 (see the accompanying 7 * file COPYING for the full license terms), or, at your option, any later 8 * version of the same license. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * COPYING file for details. 14 */ 15 16 struct progress { 17 time_t starttime; 18 time_t lasttime; 19 float lastpcnt; 20 long long lastdl; 21 }; 22 23 extern int no_progress; 24 25 void do_progress(struct progress* p, float pcnt, long long newdl); 26 27 /* end_progress - done parameter is 0 for error, 1 for okay-but-incomplete, 2 for completed */ 28 void end_progress(struct progress* p, int done); 29