Arnaldo Carvalho de Melo | 34cea7f | 2010-08-08 19:56:47 -0300 | [diff] [blame] | 1 | #ifndef _PERF_UI_PROGRESS_H_ |
| 2 | #define _PERF_UI_PROGRESS_H_ 1 |
| 3 | |
Borislav Petkov | d944c4e | 2014-04-25 21:31:02 +0200 | [diff] [blame] | 4 | #include <linux/types.h> |
Arnaldo Carvalho de Melo | 34cea7f | 2010-08-08 19:56:47 -0300 | [diff] [blame] | 5 | |
Arnaldo Carvalho de Melo | 4d3001f | 2013-10-23 15:40:38 -0300 | [diff] [blame] | 6 | void ui_progress__finish(void); |
Arnaldo Carvalho de Melo | 48000a1 | 2014-12-17 17:24:45 -0300 | [diff] [blame] | 7 | |
Arnaldo Carvalho de Melo | 4d3001f | 2013-10-23 15:40:38 -0300 | [diff] [blame] | 8 | struct ui_progress { |
| 9 | const char *title; |
| 10 | u64 curr, next, step, total; |
| 11 | }; |
Arnaldo Carvalho de Melo | 48000a1 | 2014-12-17 17:24:45 -0300 | [diff] [blame] | 12 | |
Arnaldo Carvalho de Melo | 4d3001f | 2013-10-23 15:40:38 -0300 | [diff] [blame] | 13 | void ui_progress__init(struct ui_progress *p, u64 total, const char *title); |
| 14 | void ui_progress__update(struct ui_progress *p, u64 adv); |
| 15 | |
Arnaldo Carvalho de Melo | 4779a2e | 2013-10-23 14:08:48 -0300 | [diff] [blame] | 16 | struct ui_progress_ops { |
Arnaldo Carvalho de Melo | 4d3001f | 2013-10-23 15:40:38 -0300 | [diff] [blame] | 17 | void (*update)(struct ui_progress *p); |
Namhyung Kim | a5580f3 | 2012-11-13 22:30:34 +0900 | [diff] [blame] | 18 | void (*finish)(void); |
Namhyung Kim | 688f2f5 | 2012-11-13 22:30:32 +0900 | [diff] [blame] | 19 | }; |
| 20 | |
Arnaldo Carvalho de Melo | 4779a2e | 2013-10-23 14:08:48 -0300 | [diff] [blame] | 21 | extern struct ui_progress_ops *ui_progress__ops; |
Namhyung Kim | 688f2f5 | 2012-11-13 22:30:32 +0900 | [diff] [blame] | 22 | |
Arnaldo Carvalho de Melo | 34cea7f | 2010-08-08 19:56:47 -0300 | [diff] [blame] | 23 | #endif |