X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FFdEvent.hh;h=6080d0d5ccfd11bd1bebc74f6e2de6cb2f6ab11f;hb=cc2bf0a1a29245d102d1962118fb19ef178393cf;hp=4e9e792404616abb27ce9a4bd79954e1c5c6772f;hpb=df969ccba42d14c91711b27d3cb9ecd448db2617;p=senf.git diff --git a/Scheduler/FdEvent.hh b/Scheduler/FdEvent.hh index 4e9e792..6080d0d 100644 --- a/Scheduler/FdEvent.hh +++ b/Scheduler/FdEvent.hh @@ -75,9 +75,9 @@ namespace scheduler { handles are provided. The FdEvent class is an implementation of the RAII idiom: The event will be automatically - unregistered in the FdEvent destructor. The TimerEvent instance should be created - within the same scope or on a scope below where the callback is defined (e.g. if the - callback is a member function it should be defined as a class member). + unregistered in the FdEvent destructor. The FdEvent instance should be created within the + same scope or on a scope below where the callback is defined (e.g. if the callback is a + member function it should be defined as a class member). */ class FdEvent : public detail::FIFORunner::TaskInfo, @@ -99,7 +99,7 @@ namespace scheduler { , EV_ERR = detail::FdManager::EV_ERR ///< transport error , EV_ALL = (detail::FdManager::EV_READ | detail::FdManager::EV_WRITE - | detail::FdManager::EV_PRIO) ///< register all events + | detail::FdManager::EV_PRIO) ///< register all events (read, prio and write) }; /////////////////////////////////////////////////////////////////////////// @@ -138,7 +138,6 @@ namespace scheduler { void disable(); ///< Disable event void enable(); ///< Enable event - bool enabled(); ///< \c true if event enabled, \c false otherwise FdEvent & action(Callback const & cb); ///< Change event callback @@ -157,7 +156,9 @@ namespace scheduler { private: virtual void signal(int events); - virtual void run(); + virtual void v_run(); + virtual char const * v_type() const; + virtual std::string v_info() const; Callback cb_; int fd_; @@ -171,8 +172,14 @@ namespace scheduler { friend class detail::FileDispatcher; }; - int retrieve_filehandle(int fd); + /** \brief Get file descriptor from handle object + This function will query the \a handle for it's file descriptor. The real implementation + must be provided by a freestanding function \c retrieve_filehandle(Handle const & h) within + the namespace of \a Handle. + */ + template + int get_descriptor(Handle const & handle); }} ///////////////////////////////hh.e////////////////////////////////////////