Use enum type in pb_protocol_create_message
[petitboot] / discover / parser-utils.h
1 #ifndef PARSER_UTILS_H
2 #define PARSER_UTILS_H
3
4 #include "parser.h"
5
6 #define streq(a,b) (!strcasecmp((a),(b)))
7
8 #define artwork_pathname(file) (PKG_SHARE_DIR "/artwork/" file)
9
10 #define define_parser(__name, __priority, __parse_fn)                   \
11         struct parser                                                   \
12                 __attribute__((unused, section("parsers")))             \
13         __ ## __name ## _parser = {                                     \
14                 .name           = #__name,                              \
15                 .priority       = __priority,                           \
16                 .parse          = __parse_fn,                           \
17         };
18
19
20 void device_add_boot_option(struct device *device,
21                 struct boot_option *boot_option);
22
23 const char *generic_icon_file(enum generic_icon_type type);
24
25 enum generic_icon_type guess_device_type(struct discover_context *ctx);
26
27 #endif /* PARSER_UTILS_H */