summaryrefslogtreecommitdiffstats
path: root/discover/parser.h
blob: 1b88831d72b4b0d8de6f452874c0f98011114eca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _PARSER_H
#define _PARSER_H

struct discover_context;

struct parser {
	char *name;
	int priority;
	int (*parse)(struct discover_context *ctx);
	struct parser *next;
};

enum generic_icon_type {
	ICON_TYPE_DISK,
	ICON_TYPE_USB,
	ICON_TYPE_OPTICAL,
	ICON_TYPE_NETWORK,
	ICON_TYPE_UNKNOWN
};

#define streq(a,b) (!strcasecmp((a),(b)))

void parser_init(void);

void iterate_parsers(struct discover_context *ctx);
int parse_user_event(struct device *device, struct event *event);

#endif /* _PARSER_H */
OpenPOWER on IntegriCloud