/*****************************************************************************\ * Copyright (c) 2004 Pelle Johansson. * * All rights reserved. * * * * This file is part of the moftpd package. Use and distribution of * * this software is governed by the terms in the file LICENCE, which * * should have come with this package. * \*****************************************************************************/ /* $moftpd: events.h 1251 2005-03-06 22:24:29Z morth $ */ #ifndef _EVENTS_H #define _EVENTS_H typedef int (*fdHandlerFun_t)(int fd, void *user, int urgent); void events_init (void); int event_channels (void); int add_read_fd(int fd, fdHandlerFun_t handler, void *user); int add_write_fd(int fd, fdHandlerFun_t handler, void *user); void remove_read_fd(int fd); void remove_write_fd(int fd); int run_events (void); int events_run_handler (int fd, int isWrite, int urgent); int events_run_data (void *data, int urgent); void events_einit (void); int events_earf (int fd, void *data); int events_eawf (int fd, void *data); void events_errf (int fd); void events_erwf (int fd); #endif /*_EVENTS_H*/