4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief FdDispatcher inline non-template implementation */
29 #include "FdManager.hh"
31 #define prefix_ inline
32 //-/////////////////////////////////////////////////////////////////////////////////////////////////
34 //-/////////////////////////////////////////////////////////////////////////////////////////////////
35 // senf::scheduler::FdEvent
37 prefix_ senf::scheduler::FdEvent::FdEvent(std::string const & name, Callback const & cb)
38 : detail::FIFORunner::TaskInfo (name), cb_ (cb), fd_ (-1), pollable_ (true), events_ (0)
41 prefix_ senf::scheduler::FdEvent::~FdEvent()
43 if (detail::FdDispatcher::alive())
47 prefix_ senf::scheduler::FdEvent & senf::scheduler::FdEvent::action(Callback const & cb)
53 prefix_ senf::scheduler::FdEvent & senf::scheduler::FdEvent::addEvents(int e)
55 events( events() | e );
59 prefix_ senf::scheduler::FdEvent & senf::scheduler::FdEvent::removeEvents(int e)
61 events( events() & ~e );
65 prefix_ int senf::scheduler::FdEvent::events()
70 //-/////////////////////////////////////////////////////////////////////////////////////////////////
71 // senf::scheduler::detail::FdDispatcher
73 prefix_ senf::scheduler::detail::FdDispatcher::FdDispatcher()
76 prefix_ bool senf::scheduler::detail::FdDispatcher::empty()
82 //-/////////////////////////////////////////////////////////////////////////////////////////////////
83 // senf::scheduler::detail::FileDispatcher
85 prefix_ void senf::scheduler::detail::FileDispatcher::timeout(int t)
89 detail::FdManager::instance().timeout(managerTimeout_);
92 prefix_ int senf::scheduler::detail::FileDispatcher::timeout()
95 return managerTimeout_;
98 prefix_ bool senf::scheduler::detail::FileDispatcher::empty()
104 //-/////////////////////////////////////////////////////////////////////////////////////////////////
106 prefix_ int senf::scheduler::detail::retrieve_filehandle(int fd)
111 //-/////////////////////////////////////////////////////////////////////////////////////////////////
118 // comment-column: 40
119 // c-file-style: "senf"
120 // indent-tabs-mode: nil
121 // ispell-local-dictionary: "american"
122 // compile-command: "scons -u test"