]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gsocket.h
wxOverlay compile fix
[wxWidgets.git] / include / wx / gsocket.h
index aa85493415e47c175832c516c90a7d5744f4e9a2..2d5b0288bb300c8984efa44b146a25a21951abbc 100644 (file)
@@ -1,10 +1,12 @@
 /* -------------------------------------------------------------------------
- * Project: GSocket (Generic Socket)
- * Name:    gsocket.h
- * Author:  Guilhem Lavaux
- *          Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
- * Purpose: GSocket include file (system independent)
- * CVSID:   $Id$
+ * Project:     GSocket (Generic Socket)
+ * Name:        gsocket.h
+ * Author:      Guilhem Lavaux
+ *              Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
+ * Copyright:   (c) Guilhem Lavaux
+ * Licence:     wxWindows Licence
+ * Purpose:     GSocket include file (system independent)
+ * CVSID:       $Id$
  * -------------------------------------------------------------------------
  */
 
@@ -12,8 +14,7 @@
 #define __GSOCKET_H
 
 #ifndef __GSOCKET_STANDALONE__
-#include "wx/setup.h"
-#include "wx/platform.h"
+#include "wx/defs.h"
 
 #include "wx/dlimpexp.h" /* for WXDLLIMPEXP_NET */
 
@@ -67,7 +68,7 @@ typedef enum {
   GSOCK_WOULDBLOCK,
   GSOCK_TIMEDOUT,
   GSOCK_MEMERR,
-  GSOCK_OPTERR,
+  GSOCK_OPTERR
 } GSocketError;
 
 /* See below for an explanation on how events work.
@@ -100,6 +101,8 @@ typedef void (*GSocketCallback)(GSocket *socket, GSocketEvent event,
 class GSocketGUIFunctionsTable
 {
 public:
+    // needed since this class declares virtual members
+    virtual ~GSocketGUIFunctionsTable() { }
     virtual bool OnInit() = 0;
     virtual void OnExit() = 0;
     virtual bool CanUseEventLoop() = 0;
@@ -147,6 +150,7 @@ GAddressType GAddress_GetFamily(GAddress *address);
  */
 
 GSocketError GAddress_INET_SetHostName(GAddress *address, const char *hostname);
+GSocketError GAddress_INET_SetBroadcastAddress(GAddress *address);
 GSocketError GAddress_INET_SetAnyAddress(GAddress *address);
 GSocketError GAddress_INET_SetHostAddress(GAddress *address,
                                           unsigned long hostaddr);
@@ -159,7 +163,24 @@ GSocketError GAddress_INET_GetHostName(GAddress *address, char *hostname,
 unsigned long GAddress_INET_GetHostAddress(GAddress *address);
 unsigned short GAddress_INET_GetPort(GAddress *address);
 
-/* TODO: Define specific parts (INET6, UNIX) */
+#if wxUSE_IPV6
+
+GSocketError GAddress_INET6_SetHostName(GAddress *address, const char *hostname);
+GSocketError GAddress_INET6_SetAnyAddress(GAddress *address);
+GSocketError GAddress_INET6_SetHostAddress(GAddress *address,
+                                          struct in6_addr hostaddr);
+GSocketError GAddress_INET6_SetPortName(GAddress *address, const char *port,
+                                       const char *protocol);
+GSocketError GAddress_INET6_SetPort(GAddress *address, unsigned short port);
+
+GSocketError GAddress_INET6_GetHostName(GAddress *address, char *hostname,
+                                       size_t sbuf);
+GSocketError GAddress_INET6_GetHostAddress(GAddress *address,struct in6_addr *hostaddr);
+unsigned short GAddress_INET6_GetPort(GAddress *address);
+
+#endif // wxUSE_IPV6
+
+/* TODO: Define specific parts (UNIX) */
 
 GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path);
 GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
@@ -170,8 +191,6 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
 
 # if defined(__WINDOWS__)
 #  include "wx/msw/gsockmsw.h"
-# elif defined(__WXMAC__) && !defined(__DARWIN__)
-#  include "wx/mac/gsockmac.h"
 # else
 #  include "wx/unix/gsockunx.h"
 # endif