1 /* libguestfs - mini library for progress bars.
2 * Copyright (C) 2010-2011 Red Hat Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 /* Initialize the progress bar mini library.
28 * Function returns a handle, or NULL if there was an error.
30 #define PROGRESS_BAR_MACHINE_READABLE 1
31 extern struct progress_bar *progress_bar_init (unsigned flags);
33 /* This should be called at the start of each command. */
34 extern void progress_bar_reset (struct progress_bar *);
36 /* This should be called from the progress bar callback. It displays
39 extern void progress_bar_set (struct progress_bar *, uint64_t position, uint64_t total);
41 /* Free up progress bar handle and resources. */
42 extern void progress_bar_free (struct progress_bar *);
44 #endif /* PROGRESS_H */