]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/sockpm.cpp
Add virtual ~wxAnyScrollHelperBase() to fix compiler warning.
[wxWidgets.git] / src / os2 / sockpm.cpp
index 8168d7fb61ffc439434742f84d9b1c18515d8601..782567383b9bffd17be9c52ec733d78691a19104 100644 (file)
@@ -1,10 +1,11 @@
-/* -------------------------------------------------------------------------
- * Project: wxSocketImpl (Generic Socket) for WX
- * Name:    gsockpm.c
- * Purpose: wxSocketImpl: PM part
- * Licence: The wxWindows licence
- * CVSID:   $Id$
- * ------------------------------------------------------------------------- */
+///////////////////////////////////////////////////////////////////////////////
+// Name:        src/os2/sockpm.cpp
+// Purpose:     implementation of OS-2-specific handler event handling
+// Author:      Guilhem Lavaux, Vadim Zeitlin
+// Created:     1999
+// Copyright:   (c) 1999-2008 wxWidgets dev team
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 static void wxSocket_PM_Input(void *data)
 {
-    wxSocketImpl *socket = static_cast<wxSocketImpl *>(data);
+    wxFDIOHandler *handler = static_cast<wxSocketImplUnix *>(data);
 
-    socket->Detected_Read();
+    handler->OnReadWaiting();
 }
 
 static void wxSocket_PM_Output(void *data)
 {
-    wxSocketImpl *socket = static_cast<wxSocketImpl *>(data);
+    wxFDIOHandler *handler = static_cast<wxSocketImplUnix *>(data);
 
-    socket->Detected_Write();
+    handler->OnWriteWaiting();
 }
 
-class PMSocketManager : public wxSocketInputBasedManager
+class PMFDIOManager : public wxFDIOManager
 {
 public:
-    virtual int AddInput(wxSocketImpl *socket, SocketDir d)
+    virtual int AddInput(wxFDIOHandler *handler,
+                         int fd,
+                         wxFDIOManager::Direction d)
     {
-
       if (d == FD_OUTPUT)
-          return wxTheApp->AddSocketHandler(socket->m_fd, wxSockWriteMask,
-                                            wxSocket_PM_Output, (void *)socket);
+          return wxTheApp->AddSocketHandler(fd, wxSockWriteMask,
+                                            wxSocket_PM_Output, handler);
       else
-          return wxTheApp->AddSocketHandler(socket->m_fd, wxSockReadMask,
-                                            wxSocket_PM_Input, (void *)socket);
+          return wxTheApp->AddSocketHandler(fd, wxSockReadMask,
+                                            wxSocket_PM_Input, handler);
     }
 
-    virtual void RemoveInput(int fd)
+    virtual void
+    RemoveInput(wxFDIOHandler * WXUNUSED(handler),
+                int fd,
+                wxFDIOManager::Direction WXUNUSED(dir))
     {
         wxTheApp->RemoveSocketHandler(fd);
     }
 };
 
-wxSocketManager *wxGUIAppTraits::GetSocketManager()
+wxFDIOManager *wxGUIAppTraits::GetFDIOManager()
 {
-    static PMSocketManager s_manager;
+    static PMFDIOManager s_manager;
     return &s_manager;
 }