/** * xerxes - mysql proxying * ``Why do you persist in your loneliness?'' --Xerxes * (c) 2008 * Jan Losinski * Maximilian Marx */ #ifndef XERXES_EPOLL_HXX #define XERXES_EPOLL_HXX #include #include #include #include #include #include #include #include "socket.hxx" namespace xerxes { struct EPoll { EPoll(); virtual ~EPoll(); typedef boost::shared_ptr event_t; void add(Socket const& source, Socket const& target); void add(Socket const& socket); void del(Socket const& socket); int fd; std::map events; }; enum epoll_add_err_type{ ADD_ERR_SINGLE, ADD_ERR_SOURCE, ADD_ERR_TARGET }; class EpollErr{}; class EpollAddErr : public EpollErr { public: EpollAddErr(){ EpollAddErr(ADD_ERR_SINGLE); }; EpollAddErr(epoll_add_err_type t) :type(t){}; epoll_add_err_type type; }; class EpollDelErr : public EpollErr {}; class EpollCreateErr : public EpollErr {}; } #endif