]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/gsockmac.h
corrected virtual function prototype
[wxWidgets.git] / include / wx / mac / gsockmac.h
CommitLineData
ee6b1d97
SC
1/* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
3 * Name: gsockunx.h
4 * Purpose: GSocket Macintosh header
5 * CVSID: $Id$
6 * -------------------------------------------------------------------------
7 */
8
9#ifndef __GSOCK_UNX_H
10#define __GSOCK_UNX_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
29typedef GSocket* GSocketPtr ;
30
31/* Definition of GSocket */
32struct _GSocket
33{
34 wxMacNotifierTableRef m_mac_events ;
35 EndpointRef m_endpoint;
36 GAddress *m_local;
37 GAddress *m_peer;
38 GSocketError m_error;
39
40 int m_non_blocking;
41 int m_server;
42 int m_stream;
43 int m_oriented;
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 int m_takesEvents ;
51};
52
53/* Definition of GAddress */
54
55struct _GAddress
56{
57 UInt32 m_host ;
58 UInt16 m_port ;
59 GAddressType m_family;
60 GSocketError m_error;
61};
62
63/* Input / Output */
64
65GSocketError _GSocket_Input_Timeout(GSocket *socket);
66GSocketError _GSocket_Output_Timeout(GSocket *socket);
67int _GSocket_Recv_Stream(GSocket *socket, char *buffer, int size);
68int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size);
69int _GSocket_Send_Stream(GSocket *socket, const char *buffer, int size);
70int _GSocket_Send_Dgram(GSocket *socket, const char *buffer, int size);
71
72/* Callbacks */
73
74void _GSocket_Enable_Events(GSocket *socket);
75void _GSocket_Disable_Events(GSocket *socket);
76void _GSocket_Internal_Proc(unsigned long e , void* data ) ;
77
78/* GAddress */
79
80GSocketError _GAddress_translate_from(GAddress *address,
81 InetAddress *addr );
82GSocketError _GAddress_translate_to(GAddress *address,
83 InetAddress *addr);
84
85GSocketError _GAddress_Init_INET(GAddress *address);
86
87#ifdef __cplusplus
88}
89#endif /* __cplusplus */
90
91#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
92
93#endif /* __GSOCK_UNX_H */