X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e00f35bb067e723874c27e66350e19eab7834ac4..0b8558681e8c69b749f64b891111f5ea72c04550:/src/unix/gsockunx.h diff --git a/src/unix/gsockunx.h b/src/unix/gsockunx.h index 753df2a198..79321a2374 100644 --- a/src/unix/gsockunx.h +++ b/src/unix/gsockunx.h @@ -8,7 +8,16 @@ #ifndef __GSOCK_UNX_H #define __GSOCK_UNX_H -#include +#include "wx/setup.h" + +#if wxUSE_SOCKETS + +#include "wx/gsocket.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* Definition of GSocket */ struct _GSocket { @@ -16,11 +25,11 @@ struct _GSocket { GAddress *m_local, *m_peer; GSocketError m_error; - bool m_blocking, m_server, m_stream, m_oriented; + bool m_non_blocking, m_server, m_stream, m_oriented; unsigned long m_timeout; /* Callbacks */ - GSocketCallback m_fbacks[GSOCK_MAX_EVENT]; + GSocketCallback m_cbacks[GSOCK_MAX_EVENT]; char *m_data[GSOCK_MAX_EVENT]; /* IO calls associated */ @@ -54,16 +63,24 @@ void _GSocket_GUI_Init(GSocket *socket); void _GSocket_GUI_Destroy(GSocket *socket); /* Translaters returns false when memory is exhausted */ -bool _GAddress_translate_from(GAddress *address, - struct sockaddr *addr, int len); -bool _GAddress_translate_to(GAddress *address, - struct sockaddr **addr, int *len); +GSocketError _GAddress_translate_from(GAddress *address, + struct sockaddr *addr, int len); +GSocketError _GAddress_translate_to(GAddress *address, + struct sockaddr **addr, int *len); /* Initialisers returns FALSE when an error happened in the initialisation */ /* Internet address family */ -bool _GAddress_Init_INET(GAddress *address); +GSocketError _GAddress_Init_INET(GAddress *address); /* Local address family */ -bool _GAddress_Init_UNIX(GAddress *address); +GSocketError _GAddress_Init_UNIX(GAddress *address); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + /* wxUSE_SOCKETS */ #endif + /* __GSOCK_UNX_H */