discover/discover-server: Restrict clients based on uid
[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 status;
10 struct plugin_option;
11 struct boot_status;
12 struct system_info;
13 struct device;
14 struct config;
15
16 struct discover_server *discover_server_init(struct waitset *waitset);
17
18 void discover_server_destroy(struct discover_server *server);
19
20 void discover_server_set_device_source(struct discover_server *server,
21                 struct device_handler *handler);
22
23 void discover_server_set_auth_mode(struct discover_server *server,
24                 bool restrict_clients);
25
26 void discover_server_notify_device_add(struct discover_server *server,
27                 struct device *device);
28 void discover_server_notify_boot_option_add(struct discover_server *server,
29                 struct boot_option *option);
30 void discover_server_notify_device_remove(struct discover_server *server,
31                 struct device *device);
32 void discover_server_notify_boot_status(struct discover_server *server,
33                 struct status *status);
34 void discover_server_notify_system_info(struct discover_server *server,
35                 const struct system_info *sysinfo);
36 void discover_server_notify_config(struct discover_server *server,
37                 const struct config *config);
38 void discover_server_notify_plugin_option_add(struct discover_server *server,
39                 struct plugin_option *option);
40 void discover_server_notify_plugins_remove(struct discover_server *server);
41 #endif /* _DISCOVER_SERVER_H */