[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / OS_NS_stropts.h
blob7be61a75423f291aea403cb17f069d53f23893bc
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file OS_NS_stropts.h
7 * $Id: OS_NS_stropts.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
10 * @author Jesper S. M|ller<stophph@diku.dk>
11 * @author and a cast of thousands...
13 * Originally in OS.h.
15 //=============================================================================
17 #ifndef ACE_OS_NS_STROPTS_H
18 #define ACE_OS_NS_STROPTS_H
20 # include /**/ "ace/pre.h"
22 # include "ace/config-all.h"
24 # if !defined (ACE_LACKS_PRAGMA_ONCE)
25 # pragma once
26 # endif /* ACE_LACKS_PRAGMA_ONCE */
28 # ifndef ACE_IOCTL_TYPE_ARG2
29 # define ACE_IOCTL_TYPE_ARG2 int
30 # endif
32 #include "ace/os_include/os_stropts.h"
33 #include "ace/os_include/os_stdio.h"
34 #include /**/ "ace/ACE_export.h"
36 #if defined (ACE_EXPORT_MACRO)
37 # undef ACE_EXPORT_MACRO
38 #endif
39 #define ACE_EXPORT_MACRO ACE_Export
41 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
43 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
44 typedef WSAPROTOCOL_INFO ACE_Protocol_Info;
46 // Callback function that's used by the QoS-enabled <ACE_OS::ioctl>
47 // method.
48 typedef LPWSAOVERLAPPED_COMPLETION_ROUTINE ACE_OVERLAPPED_COMPLETION_FUNC;
49 typedef GROUP ACE_SOCK_GROUP;
50 #else /* (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
51 struct ACE_Protocol_Info
53 unsigned long dwServiceFlags1;
54 int iAddressFamily;
55 int iProtocol;
56 char szProtocol[255+1];
59 // Callback function that's used by the QoS-enabled <ACE_OS::ioctl>
60 // method.
61 typedef void (*ACE_OVERLAPPED_COMPLETION_FUNC) (unsigned long error,
62 unsigned long bytes_transferred,
63 ACE_OVERLAPPED *overlapped,
64 unsigned long flags);
65 typedef unsigned long ACE_SOCK_GROUP;
67 #endif /* (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
69 // @todo: move this to it's own file... dhinton
70 /**
71 * @class ACE_Str_Buf
73 * @brief Simple wrapper for STREAM pipes strbuf.
75 class ACE_Export ACE_Str_Buf : public strbuf
77 public:
78 // = Initialization method
79 /// Constructor.
80 ACE_Str_Buf (void *b = 0, int l = 0, int max = 0);
82 /// Constructor.
83 ACE_Str_Buf (strbuf &);
86 class ACE_QoS;
88 namespace ACE_OS {
90 ACE_NAMESPACE_INLINE_FUNCTION
91 int getmsg (ACE_HANDLE handle,
92 struct strbuf *ctl,
93 struct strbuf
94 *data, int *flags);
96 ACE_NAMESPACE_INLINE_FUNCTION
97 int getpmsg (ACE_HANDLE handle,
98 struct strbuf *ctl,
99 struct strbuf
100 *data,
101 int *band,
102 int *flags);
104 ACE_NAMESPACE_INLINE_FUNCTION
105 int fattach (int handle,
106 const char *path);
108 ACE_NAMESPACE_INLINE_FUNCTION
109 int fdetach (const char *file);
111 /// UNIX-style <ioctl>.
112 ACE_NAMESPACE_INLINE_FUNCTION
113 int ioctl (ACE_HANDLE handle,
114 ACE_IOCTL_TYPE_ARG2 cmd,
115 void * = 0);
117 /// QoS-enabled <ioctl>.
118 extern ACE_Export
119 int ioctl (ACE_HANDLE socket,
120 unsigned long io_control_code,
121 void *in_buffer_p,
122 unsigned long in_buffer,
123 void *out_buffer_p,
124 unsigned long out_buffer,
125 unsigned long *bytes_returned,
126 ACE_OVERLAPPED *overlapped,
127 ACE_OVERLAPPED_COMPLETION_FUNC func);
129 #if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500))
130 /// QoS-enabled <ioctl> when the I/O control code is either
131 /// SIO_SET_QOS or SIO_GET_QOS.
132 extern ACE_Export
133 int ioctl (ACE_HANDLE socket,
134 unsigned long io_control_code,
135 ACE_QoS &ace_qos,
136 unsigned long *bytes_returned,
137 void *buffer_p = 0,
138 unsigned long buffer = 0,
139 ACE_OVERLAPPED *overlapped = 0,
140 ACE_OVERLAPPED_COMPLETION_FUNC func = 0);
141 #endif /* !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) */
143 ACE_NAMESPACE_INLINE_FUNCTION
144 int isastream (ACE_HANDLE handle);
146 ACE_NAMESPACE_INLINE_FUNCTION
147 int putmsg (ACE_HANDLE handle,
148 const struct strbuf *ctl,
149 const struct strbuf *data,
150 int flags);
152 ACE_NAMESPACE_INLINE_FUNCTION
153 int putpmsg (ACE_HANDLE handle,
154 const struct strbuf *ctl,
155 const struct strbuf *data,
156 int band,
157 int flags);
159 } /* namespace ACE_OS */
161 ACE_END_VERSIONED_NAMESPACE_DECL
163 # if defined (ACE_HAS_INLINED_OSCALLS)
164 # if defined (ACE_INLINE)
165 # undef ACE_INLINE
166 # endif /* ACE_INLINE */
167 # define ACE_INLINE inline
168 # include "ace/OS_NS_stropts.inl"
169 # endif /* ACE_HAS_INLINED_OSCALLS */
171 # include /**/ "ace/post.h"
172 #endif /* ACE_OS_NS_STROPTS_H */