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