Data Fields |
| void * | userdata |
| | Some abstract user data usable by the provider of the API.
|
| AvahiWatch *(* | watch_new )(const AvahiPoll *api, int fd, AvahiWatchEvent event, AvahiWatchCallback callback, void *userdata) |
| | Create a new watch for the specified file descriptor and for the specified events.
|
| void(* | watch_update )(AvahiWatch *w, AvahiWatchEvent event) |
| | Update the events to wait for.
|
| AvahiWatchEvent(* | watch_get_events )(AvahiWatch *w) |
| | Return the events that happened.
|
| void(* | watch_free )(AvahiWatch *w) |
| | Free a watch.
|
| AvahiTimeout *(* | timeout_new )(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) |
| | Set a wakeup time for the polling loop.
|
| void(* | timeout_update )(AvahiTimeout *, const struct timeval *tv) |
| | Update the absolute expiration time for a timeout, If tv is NULL, the timeout is disabled.
|
| void(* | timeout_free )(AvahiTimeout *t) |
| | Free a timeout.
|
Defines an abstracted event polling API.
This may be used to connect Avahi to other main loops. This is loosely based on Unix poll(2). A consumer will call watch_new() for all file descriptors it wants to listen for events on. In addition he can call timeout_new() to define time based events .
- Examples:
-
glib-integration.c.
Definition at line 60 of file watch.h.