From: mtk Date: Wed, 5 May 2010 12:19:10 +0000 (+0000) Subject: allow the IOEvent of an ActiveSocketSource to be enabled/disabled X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=9d13f0ba899d246a930acbe0d06ba00a962a2de6;p=senf.git allow the IOEvent of an ActiveSocketSource to be enabled/disabled git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1620 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/SocketSource.cti b/senf/PPI/SocketSource.cti index 8bb2e7c..756a9eb 100644 --- a/senf/PPI/SocketSource.cti +++ b/senf/PPI/SocketSource.cti @@ -53,6 +53,18 @@ prefix_ void senf::ppi::module::ActiveSocketSource::handle(Handle handle event_.set(handle_, IOEvent::Read); } +template +prefix_ bool senf::ppi::module::ActiveSocketSource::enabled() +{ + return event_.enabled(); +} + +template +prefix_ void senf::ppi::module::ActiveSocketSource::enabled( bool state) +{ + event_.enabled( state); +} + ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ diff --git a/senf/PPI/SocketSource.hh b/senf/PPI/SocketSource.hh index 4ae8e8e..7c06aff 100644 --- a/senf/PPI/SocketSource.hh +++ b/senf/PPI/SocketSource.hh @@ -140,6 +140,9 @@ namespace module { /**< Assigning an empty or in-valid() handle will disable the module until a new, valid handle is assigned. */ + bool enabled(); ///< Check is the IOEvent of the Source is enabled + void enabled( bool state); ///< Change the state of the Source's IOEvent + private: void read();