avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
AVAHI_LLIST_HEAD(AvahiWatch, watches);
AVAHI_LLIST_HEAD(AvahiTimeout, timeouts);
};
AVAHI_LLIST_HEAD(AvahiWatch, watches);
AVAHI_LLIST_HEAD(AvahiTimeout, timeouts);
};
static AvahiWatch* watch_new(const AvahiPoll *api, int fd, AvahiWatchEvent events, AvahiWatchCallback callback, void *userdata) {
AvahiWatch *w;
AvahiGLibPoll *g;
static AvahiWatch* watch_new(const AvahiPoll *api, int fd, AvahiWatchEvent events, AvahiWatchCallback callback, void *userdata) {
AvahiWatch *w;
AvahiGLibPoll *g;
static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {
AvahiTimeout *t;
AvahiGLibPoll *g;
static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {
AvahiTimeout *t;
AvahiGLibPoll *g;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
g_source_get_current_time(source, &now);
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
if (avahi_timeval_compare(&next_timeout->expiry, &tvnow) < 0) {
start_timeout_callback(next_timeout);
return TRUE;
}
}
if (avahi_timeval_compare(&next_timeout->expiry, &tvnow) < 0) {
start_timeout_callback(next_timeout);
return TRUE;
}
}
g->api.watch_new = watch_new;
g->api.watch_free = watch_free;
g->api.watch_update = watch_update;
g->api.watch_get_events = watch_get_events;
g->api.watch_new = watch_new;
g->api.watch_free = watch_free;
g->api.watch_update = watch_update;
g->api.watch_get_events = watch_get_events;
g->api.timeout_new = timeout_new;
g->api.timeout_free = timeout_free;
g->api.timeout_update = timeout_update;
g->watch_req_cleanup = FALSE;
g->timeout_req_cleanup = FALSE;
g->api.timeout_new = timeout_new;
g->api.timeout_free = timeout_free;
g->api.timeout_update = timeout_update;
g->watch_req_cleanup = FALSE;
g->timeout_req_cleanup = FALSE;
AVAHI_LLIST_HEAD_INIT(AvahiWatch, g->watches);
AVAHI_LLIST_HEAD_INIT(AvahiTimeout, g->timeouts);
AVAHI_LLIST_HEAD_INIT(AvahiWatch, g->watches);
AVAHI_LLIST_HEAD_INIT(AvahiTimeout, g->timeouts);
g_source_attach(&g->source, g->context);
g_source_set_priority(&g->source, priority);
g_source_set_can_recurse(&g->source, FALSE);
g_source_attach(&g->source, g->context);
g_source_set_priority(&g->source, priority);
g_source_set_can_recurse(&g->source, FALSE);