]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socketengines/socketengine_poll.h
Sort the module list to give a useful indicator of compile progress
[user/henk/code/inspircd.git] / include / socketengines / socketengine_poll.h
index f40cecd2cb4aaa774bc4c52b7d904e3cf7d549a0..a99ce915cdbcc19444c30c113af80735ff6dfbc3 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -43,21 +43,22 @@ private:
        /** These are used by poll() to hold socket events
         */
        struct pollfd *events;
+       /** This map maps fds to an index in the events array.
+        */
+       std::map<int, unsigned int> fd_mappings;
 public:
        /** Create a new PollEngine
-        * @param Instance The creator of this object
         */
-       PollEngine(InspIRCd* Instance);
+       PollEngine();
        /** Delete a PollEngine
         */
        virtual ~PollEngine();
-       virtual bool AddFd(EventHandler* eh);
-       virtual int GetMaxFds();
-       virtual int GetRemainingFds();
+       virtual bool AddFd(EventHandler* eh, int event_mask);
+       virtual void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
+       virtual EventHandler* GetRef(int fd);
        virtual bool DelFd(EventHandler* eh, bool force = false);
        virtual int DispatchEvents();
        virtual std::string GetName();
-       virtual void WantWrite(EventHandler* eh);
 };
 
 /** Creates a SocketEngine
@@ -67,7 +68,7 @@ class SocketEngineFactory
 public:
        /** Create a new instance of SocketEngine based on PollEngine
         */
-       SocketEngine* Create(InspIRCd* Instance) { return new PollEngine(Instance); }
+       SocketEngine* Create() { return new PollEngine; }
 };
 
 #endif