Utils/Console: Add short help to 'ls' output
[senf.git] / PPI / Events.cc
index e5dc53a..eb89a50 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -47,6 +47,16 @@ prefix_ void senf::ppi::EventDescriptor::notifyUnthrottle()
         enabled(true);
 }
 
+prefix_ void senf::ppi::EventDescriptor::enabled(bool v)
+{
+    SENF_ASSERT(v_isRegistered()); // Module::registerEvent() call missing !!
+    if (v && ! enabled_)
+        v_enable();
+    else if (! v && enabled_)
+        v_disable();
+    enabled_ = v;
+}
+
 ///////////////////////////////cc.e////////////////////////////////////////
 #undef prefix_
 //#include "Events.mpp"