lib: Add boot_status type & protocol definitions
[petitboot] / lib / types / types.h
1 #ifndef _TYPES_H
2 #define _TYPES_H
3
4 #include <list/list.h>
5
6 struct device {
7         char            *id;
8         char            *name;
9         char            *description;
10         char            *icon_file;
11
12         int             n_options;
13         struct list     boot_options;
14
15         void            *ui_info;
16 };
17
18 struct boot_option {
19         char            *device_id;
20         char            *id;
21         char            *name;
22         char            *description;
23         char            *icon_file;
24         char            *boot_image_file;
25         char            *initrd_file;
26         char            *boot_args;
27
28         struct list_item        list;
29
30         void            *ui_info;
31 };
32
33 struct boot_command {
34         char *option_id;
35         char *boot_image_file;
36         char *initrd_file;
37         char *boot_args;
38 };
39
40 struct boot_status {
41         enum {
42                 BOOT_STATUS_INFO,
43                 BOOT_STATUS_ERROR,
44         } type;
45         char    *message;
46         char    *detail;
47         int     progress;
48 };
49
50 #endif /* _TYPES_H */