]> git.ozlabs.org Git - petitboot/blob - common/discover-client.h
discover/grub2: Allow to separate the --id argument using a space char
[petitboot] / common / discover-client.h
1 #ifndef _DISCOVER_CLIENT_H
2 #define _DISCOVER_CLIENT_H
3
4 #include <pb-protocol/pb-protocol.h>
5 #include "ui/common/device.h"
6
7 struct discover_client;
8
9 struct discover_client_ops {
10         int     (*add_device)(struct device *);
11         void    (*remove_device)(char *);
12 };
13
14 struct discover_client *discover_client_init(struct discover_client_ops *ops);
15
16 int discover_client_get_fd(struct discover_client *client);
17
18 void discover_client_destroy(struct discover_client *client);
19
20 /**
21  * Process data from the server.
22  *
23  * Will read from the client socket, and call add_device on any discovered
24  * devices.
25  * 
26  */
27 int discover_client_process(struct discover_client *client);
28
29 #endif