-/* This will disable all IO calls to this socket but errors are still available */
-void GSocket_Shutdown(GSocket *socket);
-
-/* Address handling */
-
-GSocketError GSocket_SetLocal(GSocket *socket, GAddress *address);
-GSocketError GSocket_SetPeer(GSocket *socket, GAddress *address);
-GAddress *GSocket_GetLocal(GSocket *socket);
-GAddress *GSocket_GetPeer(GSocket *socket);
-
-/* Non-oriented connections handlers */
-
-GSocketError GSocket_SetNonOriented(GSocket *socket);
-
-/* Server specific parts */
-
-/*
- GSocket_SetServer() setups the socket as a server. It uses the "Local" field
- of GSocket. "Local" must be set by GSocket_SetLocal() before
- GSocket_SetServer() is called. In the other case, it returns GSOCK_INVADDR.
-*/
-GSocketError GSocket_SetServer(GSocket *socket);
-
-/*
- GSocket_WaitConnection() waits for an incoming client connection.
-*/
-GSocket *GSocket_WaitConnection(GSocket *socket);
-
-/* Client specific parts */
-
-/*
- GSocket_Connect() establishes a client connection to a server using the "Peer"
- field of GSocket. "Peer" must be set by GSocket_SetPeer() before
- GSocket_Connect() is called. In the other case, it returns GSOCK_INVADDR.
-*/
-GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
-
-/* Generic IO */
+/* Functions tables for internal use by GSocket code: */
+
+/* Actually this is a misnomer now, but reusing this name means I don't
+ have to ifdef app traits or common socket code */
+class GSocketGUIFunctionsTable
+{
+public:
+ virtual bool OnInit() = 0;
+ virtual void OnExit() = 0;
+ virtual bool CanUseEventLoop() = 0;
+ virtual bool Init_Socket(GSocket *socket) = 0;
+ virtual void Destroy_Socket(GSocket *socket) = 0;
+#ifndef __WINDOWS__
+ virtual void Install_Callback(GSocket *socket, GSocketEvent event) = 0;
+ virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event) = 0;
+#endif
+ virtual void Enable_Events(GSocket *socket) = 0;
+ virtual void Disable_Events(GSocket *socket) = 0;
+};