]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/socket.h
removed style parameter from MSWCreate(), it is unneeded
[wxWidgets.git] / include / wx / socket.h
index aa1452743fd92d9add753b49db3e44390420d655..d52e1334737af4b65bbb6177176d23ec5934b34c 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _WX_NETWORK_SOCKET_H
 #define _WX_NETWORK_SOCKET_H
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
   #pragma interface "socket.h"
 #endif
 
@@ -33,6 +33,7 @@
 
 #include "wx/sckaddr.h"
 #include "wx/gsocket.h"
+#include "wx/list.h"
 
 // ------------------------------------------------------------------------
 // Types and constants
@@ -185,6 +186,11 @@ public:
   void SetNotify(wxSocketEventFlags flags);
   void Notify(bool notify);
 
+  // initialize/shutdown the sockets (usually called automatically)
+  static bool IsInitialized();
+  static bool Initialize();
+  static void Shutdown();
+
   // callbacks are deprecated, use events instead
 #if WXWIN_COMPATIBILITY
   wxSockCbk Callback(wxSockCbk cbk_);
@@ -247,11 +253,16 @@ private:
   bool          m_notify;           // notify events to users?
   wxSocketEventFlags  m_eventmask;  // which events to notify?
 
+  // the initialization count, GSocket is initialized if > 0
+  static size_t m_countInit;
+
   // callbacks are deprecated, use events instead
 #if WXWIN_COMPATIBILITY
   wxSockCbk     m_cbk;              // callback
   char         *m_cdata;            // callback data
 #endif // WXWIN_COMPATIBILITY
+
+    DECLARE_NO_COPY_CLASS(wxSocketBase)
 };
 
 
@@ -297,7 +308,7 @@ public:
 
 // WARNING: still in alpha stage
 
-class wxDatagramSocket : public wxSocketBase
+class WXDLLEXPORT wxDatagramSocket : public wxSocketBase
 {
   DECLARE_CLASS(wxDatagramSocket)