Scheduler: Implement new file descriptor event API
[senf.git] / PPI / IOEvent.hh
index d8a2b04..7707cfb 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
@@ -29,6 +29,7 @@
 // Custom includes
 #include "../Scheduler/Scheduler.hh"
 #include "Events.hh"
+#include "../Utils/Exception.hh"
 
 //#include "IOEvent.mpp"
 ///////////////////////////////hh.p////////////////////////////////////////
@@ -94,25 +95,23 @@ namespace ppi {
         ///////////////////////////////////////////////////////////////////////////
 
         /** \brief Unhandled error condition */
-        struct ErrorException : public std::exception
-        { virtual char const * what() const throw() 
-                { return "senf::ppi::IOEvent::ErrorException"; } };
+        struct ErrorException : public senf::Exception
+        { ErrorException() : senf::Exception("senf::ppi::IOEvent::ErrorException"){} };
 
         /** \brief Unhandled hangup condition */
-        struct HangupException : public std::exception
-        { virtual char const * what() const throw() 
-                { return "senf::ppi::IOEvent::HangupException"; } };
+        struct HangupException : public senf::Exception
+        { HangupException() : senf::Exception("senf::ppi::IOEvent::HangupException"){} };
 
     protected:
 
     private:
         virtual void v_enable();
-         virtual void v_disable();
+        virtual void v_disable();
         
-        void cb(Scheduler::EventId event);
+        void cb(int event);
 
         int fd_;
-        unsigned events_;
+        scheduler::FdEvent event_;
     };