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