|
avahi 0.6.30
|
00001 #ifndef foosimplewatchhfoo 00002 #define foosimplewatchhfoo 00003 00004 /*** 00005 This file is part of avahi. 00006 00007 avahi is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU Lesser General Public License as 00009 published by the Free Software Foundation; either version 2.1 of the 00010 License, or (at your option) any later version. 00011 00012 avahi is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00014 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 00015 Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with avahi; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00020 USA. 00021 ***/ 00022 00025 #include <sys/poll.h> 00026 #include <avahi-common/cdecl.h> 00027 #include <avahi-common/watch.h> 00028 00029 AVAHI_C_DECL_BEGIN 00030 00034 typedef struct AvahiSimplePoll AvahiSimplePoll; 00035 00037 AvahiSimplePoll *avahi_simple_poll_new(void); 00038 00040 void avahi_simple_poll_free(AvahiSimplePoll *s); 00041 00045 const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s); 00046 00056 int avahi_simple_poll_iterate(AvahiSimplePoll *s, int sleep_time); 00057 00060 void avahi_simple_poll_quit(AvahiSimplePoll *s); 00061 00063 typedef int (*AvahiPollFunc)(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata); 00064 00066 void avahi_simple_poll_set_func(AvahiSimplePoll *s, AvahiPollFunc func, void *userdata); 00067 00069 int avahi_simple_poll_prepare(AvahiSimplePoll *s, int timeout); 00070 00072 int avahi_simple_poll_run(AvahiSimplePoll *s); 00073 00075 int avahi_simple_poll_dispatch(AvahiSimplePoll *s); 00076 00078 int avahi_simple_poll_loop(AvahiSimplePoll *s); 00079 00081 void avahi_simple_poll_wakeup(AvahiSimplePoll *s); 00082 00083 AVAHI_C_DECL_END 00084 00085 #endif