6 struct discover_context;
13 * Each parser is responsible for creating discover_boot_options from config
14 * files found on new devices. The boot items discovered during parse will have
15 * 'resources' attached (see @discover_boot_option), which may already be
16 * resolved (in the case of a device-local filename, or a URL), or unresolved
17 * (in the case of a filename on another device).
19 * If the boot option contains references to unresolved resources, the
20 * device handler will not inform clients about the boot options, as
21 * they're not properly "available" at this stage. The handler will attempt to
22 * resolve them whenever new devices are discovered, by calling the parser's
23 * resolve_resource function. Once a boot option's resources are full resolved,
24 * the option can be sent to clients.
28 const char * const *filenames;
29 int (*parse)(struct discover_context *ctx,
31 bool (*resolve_resource)(
32 struct device_handler *handler,
33 struct resource *res);
36 enum generic_icon_type {
44 #define streq(a,b) (!strcasecmp((a),(b)))
46 void parser_init(void);
48 void iterate_parsers(struct discover_context *ctx);
49 int parse_user_event(struct discover_context *ctx, struct event *event);
51 #endif /* _PARSER_H */