00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ACE_OS_NS_STROPTS_H
00018 #define ACE_OS_NS_STROPTS_H
00019
00020 # include "ace/pre.h"
00021
00022 # include "ace/config-all.h"
00023
00024 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 # endif
00027
00028 # ifndef ACE_IOCTL_TYPE_ARG2
00029 # define ACE_IOCTL_TYPE_ARG2 int
00030 # endif
00031
00032 #include "ace/os_include/os_stropts.h"
00033 #include "ace/os_include/os_stdio.h"
00034 #include "ace/ACE_export.h"
00035
00036 #if defined (ACE_EXPORT_MACRO)
00037 # undef ACE_EXPORT_MACRO
00038 #endif
00039 #define ACE_EXPORT_MACRO ACE_Export
00040
00041 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00042
00043 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00044 typedef WSAPROTOCOL_INFO ACE_Protocol_Info;
00045
00046
00047
00048 typedef LPWSAOVERLAPPED_COMPLETION_ROUTINE ACE_OVERLAPPED_COMPLETION_FUNC;
00049 typedef GROUP ACE_SOCK_GROUP;
00050 #else
00051 struct ACE_Protocol_Info
00052 {
00053 unsigned long dwServiceFlags1;
00054 int iAddressFamily;
00055 int iProtocol;
00056 char szProtocol[255+1];
00057 };
00058
00059
00060
00061 typedef void (*ACE_OVERLAPPED_COMPLETION_FUNC) (unsigned long error,
00062 unsigned long bytes_transferred,
00063 ACE_OVERLAPPED *overlapped,
00064 unsigned long flags);
00065 typedef unsigned long ACE_SOCK_GROUP;
00066
00067 #endif
00068
00069
00070
00071
00072
00073
00074
00075 class ACE_Export ACE_Str_Buf : public strbuf
00076 {
00077 public:
00078
00079
00080 ACE_Str_Buf (void *b = 0, int l = 0, int max = 0);
00081
00082
00083 ACE_Str_Buf (strbuf &);
00084 };
00085
00086 class ACE_QoS;
00087
00088 namespace ACE_OS {
00089
00090 ACE_NAMESPACE_INLINE_FUNCTION
00091 int getmsg (ACE_HANDLE handle,
00092 struct strbuf *ctl,
00093 struct strbuf
00094 *data, int *flags);
00095
00096 ACE_NAMESPACE_INLINE_FUNCTION
00097 int getpmsg (ACE_HANDLE handle,
00098 struct strbuf *ctl,
00099 struct strbuf
00100 *data,
00101 int *band,
00102 int *flags);
00103
00104 ACE_NAMESPACE_INLINE_FUNCTION
00105 int fattach (int handle,
00106 const char *path);
00107
00108 ACE_NAMESPACE_INLINE_FUNCTION
00109 int fdetach (const char *file);
00110
00111
00112 ACE_NAMESPACE_INLINE_FUNCTION
00113 int ioctl (ACE_HANDLE handle,
00114 ACE_IOCTL_TYPE_ARG2 cmd,
00115 void * = 0);
00116
00117
00118 extern ACE_Export
00119 int ioctl (ACE_HANDLE socket,
00120 unsigned long io_control_code,
00121 void *in_buffer_p,
00122 unsigned long in_buffer,
00123 void *out_buffer_p,
00124 unsigned long out_buffer,
00125 unsigned long *bytes_returned,
00126 ACE_OVERLAPPED *overlapped,
00127 ACE_OVERLAPPED_COMPLETION_FUNC func);
00128
00129 #if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500))
00130
00131
00132 extern ACE_Export
00133 int ioctl (ACE_HANDLE socket,
00134 unsigned long io_control_code,
00135 ACE_QoS &ace_qos,
00136 unsigned long *bytes_returned,
00137 void *buffer_p = 0,
00138 unsigned long buffer = 0,
00139 ACE_OVERLAPPED *overlapped = 0,
00140 ACE_OVERLAPPED_COMPLETION_FUNC func = 0);
00141 #endif
00142
00143 ACE_NAMESPACE_INLINE_FUNCTION
00144 int isastream (ACE_HANDLE handle);
00145
00146 ACE_NAMESPACE_INLINE_FUNCTION
00147 int putmsg (ACE_HANDLE handle,
00148 const struct strbuf *ctl,
00149 const struct strbuf *data,
00150 int flags);
00151
00152 ACE_NAMESPACE_INLINE_FUNCTION
00153 int putpmsg (ACE_HANDLE handle,
00154 const struct strbuf *ctl,
00155 const struct strbuf *data,
00156 int band,
00157 int flags);
00158
00159 }
00160
00161 ACE_END_VERSIONED_NAMESPACE_DECL
00162
00163 # if defined (ACE_HAS_INLINED_OSCALLS)
00164 # if defined (ACE_INLINE)
00165 # undef ACE_INLINE
00166 # endif
00167 # define ACE_INLINE inline
00168 # include "ace/OS_NS_stropts.inl"
00169 # endif
00170
00171 # include "ace/post.h"
00172 #endif