discover: destroy client if message read failed
[petitboot] / discover / discover-server.h
1 #ifndef _DISCOVER_SERVER_H
2 #define _DISCOVER_SERVER_H
3
4 #include <waiter/waiter.h>
5
6 struct discover_server;
7 struct device_handler;
8 struct boot_option;
9 struct boot_status;
10 struct device;
11
12 struct discover_server *discover_server_init(struct waitset *waitset);
13
14 void discover_server_destroy(struct discover_server *server);
15
16 void discover_server_set_device_source(struct discover_server *server,
17                 struct device_handler *handler);
18
19 void discover_server_notify_device_add(struct discover_server *server,
20                 struct device *device);
21 void discover_server_notify_boot_option_add(struct discover_server *server,
22                 struct boot_option *option);
23 void discover_server_notify_device_remove(struct discover_server *server,
24                 struct device *device);
25 void discover_server_notify_boot_status(struct discover_server *server,
26                 struct boot_status *status);
27 #endif /* _DISCOVER_SERVER_H */