image_errors.h revision cc2ee177dbb3befca43e36cfc56778b006c3d050
1/**
2 * @file image_errors.h
3 * Report errors in images
4 *
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
7 *
8 * @author John Levon
9 */
10
11#ifndef IMAGE_ERRORS_H
12#define IMAGE_ERRORS_H
13
14#include <list>
15#include <string>
16
17class inverted_profile;
18
19/// possible reasons why we can't read a binary image
20enum image_error {
21	image_ok = 0,
22	image_not_found,
23	image_unreadable,
24	image_format_failure,
25	image_multiple_match
26};
27
28/// output why the image passed can't be read to stderr, we warranty only one
29/// error report by image name.
30void
31report_image_error(std::string const & image, image_error error, bool fatal);
32
33/// output why the image passed can't be read to stderr
34void report_image_error(inverted_profile const & profile, bool fatal);
35
36/// output why any bad images can't be read to stderr
37void report_image_errors(std::list<inverted_profile> const & plist);
38
39#endif /* IMAGE_ERRORS_H */
40