diff options
author | Max Kellermann <max@duempel.org> | 2011-08-28 17:29:09 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-29 11:23:51 +0200 |
commit | 9ccaa904393ddf2189f7d7815cef29a3e3393cbc (patch) | |
tree | ec6e7a2bba829b6cbc8607ef304eecb279408465 /src/ntp_server.h | |
parent | 4733c5fef00abacfbca414d96114bd7a5427ca12 (diff) | |
download | mpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.tar.gz mpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.tar.xz mpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.zip |
ntp_server: use the I/O thread
Diffstat (limited to 'src/ntp_server.h')
-rw-r--r-- | src/ntp_server.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/ntp_server.h b/src/ntp_server.h index 56593fef0..2b970dff2 100644 --- a/src/ntp_server.h +++ b/src/ntp_server.h @@ -20,6 +20,8 @@ #ifndef MPD_NTP_SERVER_H #define MPD_NTP_SERVER_H +#include <glib.h> + #include <stdbool.h> struct timeval; @@ -27,24 +29,18 @@ struct timeval; struct ntp_server { unsigned short port; int fd; + + GIOChannel *channel; + GSource *source; }; void ntp_server_init(struct ntp_server *ntp); void -ntp_server_close(struct ntp_server *ntp); - -/* - * Recv the NTP datagram from the AirTunes, send back an NTP response. - */ -bool -ntp_server_handle(struct ntp_server *ntp); +ntp_server_open(struct ntp_server *ntp, int fd); -/* - * check to see if there are any timing requests, and respond if there are any - */ -bool -ntp_server_check(struct ntp_server *ntp, struct timeval *tout); +void +ntp_server_close(struct ntp_server *ntp); #endif |