]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/gsockos2.h
Made geometry classes link.
[wxWidgets.git] / include / wx / os2 / gsockos2.h
CommitLineData
fb9010ed
DW
1/* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
3 * Name: gsockos2.h
4 * Purpose: GSocket OS/2 header
5 * CVSID: $Id$
6 * -------------------------------------------------------------------------
7 */
8
9#ifndef __GSOCK_OS2_H
10#define __GSOCK_OS2_H
11
12#ifndef __GSOCKET_STANDALONE__
13#include "wx/setup.h"
14#endif
15
16#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
17
18#ifndef __GSOCKET_STANDALONE__
19#include "wx/gsocket.h"
20#else
21#include "gsocket.h"
22#endif
23
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
29#define SIGPIPE 13
30
31/* Definition of GSocket */
32struct _GSocket
33{
34 int m_fd;
35 GAddress *m_local;
36 GAddress *m_peer;
37 GSocketError m_error;
38
a78e08d6
SN
39 int m_non_blocking;
40 int m_server;
41 int m_stream;
42 int m_oriented;
43 int m_establishing;
fb9010ed
DW
44 unsigned long m_timeout;
45
46 /* Callbacks */
47 GSocketEventFlags m_detected;
48 GSocketCallback m_cbacks[GSOCK_MAX_EVENT];
49 char *m_data[GSOCK_MAX_EVENT];
50
51 char *m_gui_dependent;
52};
53
54/* Definition of GAddress */
55struct _GAddress
56{
57 struct sockaddr *m_addr;
58 size_t m_len;
59
60 GAddressType m_family;
61 int m_realfamily;
62
63 GSocketError m_error;
64};
65
66/* Input / Output */
67
68GSocketError _GSocket_Input_Timeout(GSocket *socket);
69GSocketError _GSocket_Output_Timeout(GSocket *socket);
70int _GSocket_Recv_Stream(GSocket *socket, char *buffer, int size);
71int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size);
72int _GSocket_Send_Stream(GSocket *socket, const char *buffer, int size);
73int _GSocket_Send_Dgram(GSocket *socket, const char *buffer, int size);
74
75/* Callbacks */
76
77void _GSocket_Enable(GSocket *socket, GSocketEvent event);
78void _GSocket_Disable(GSocket *socket, GSocketEvent event);
79void _GSocket_Detected_Read(GSocket *socket);
80void _GSocket_Detected_Write(GSocket *socket);
81
82void _GSocket_GUI_Init(GSocket *socket);
83void _GSocket_GUI_Destroy(GSocket *socket);
84void _GSocket_Enable_Events(GSocket *socket);
85void _GSocket_Disable_Events(GSocket *socket);
86void _GSocket_Install_Callback(GSocket *socket, GSocketEvent event);
87void _GSocket_Uninstall_Callback(GSocket *socket, GSocketEvent event);
88
89/* GAddress */
90
91GSocketError _GAddress_translate_from(GAddress *address,
92 struct sockaddr *addr, int len);
93GSocketError _GAddress_translate_to(GAddress *address,
94 struct sockaddr **addr, int *len);
95
96GSocketError _GAddress_Init_INET(GAddress *address);
97
98#ifdef __cplusplus
99}
100#endif /* __cplusplus */
101
102#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
103
104#endif /* __GSOCK_UNX_H */
105