1 #ifndef _DISCOVER_CLIENT_H
2 #define _DISCOVER_CLIENT_H
4 #include <pb-protocol/pb-protocol.h>
6 struct discover_client;
9 * struct discover_client_ops - Application supplied client info.
10 * @add_device: PB_PROTOCOL_ACTION_ADD event callback.
11 * @remove_device: PB_PROTOCOL_ACTION_REMOVE event callback.
12 * @cb_arg: Client managed convenience variable passed to callbacks.
15 struct discover_client_ops {
16 int (*add_device)(const struct device *device, void *arg);
17 void (*remove_device)(const struct device *device, void *arg);
21 struct discover_client *discover_client_init(
22 const struct discover_client_ops *ops);
24 int discover_client_get_fd(const struct discover_client *client);
26 void discover_client_destroy(struct discover_client *client);
29 * Process data from the server.
31 * Will read from the client socket, and call add_device on any discovered
35 int discover_client_process(struct discover_client *client);