[io-layer] Extract socket (#4241)
[mono.git] / mono / io-layer / wapi.h
index 85da19911035a1d7677ab91b47591a5fb6ea2609..fb0bf4fbce951609667fcddafd9692ca8e024ad7 100644 (file)
 #ifndef _WAPI_WAPI_H_
 #define _WAPI_WAPI_H_
 
+#include <glib.h>
+
+#include <sys/types.h>
+
 #include <mono/io-layer/wapi-remap.h>
-#include <mono/io-layer/types.h>
-#include <mono/io-layer/macros.h>
 #include <mono/io-layer/io.h>
-#include <mono/io-layer/access.h>
-#include <mono/io-layer/context.h>
+#include <mono/io-layer/io-portability.h>
 #include <mono/io-layer/error.h>
-#include <mono/io-layer/events.h>
-#include <mono/io-layer/messages.h>
-#include <mono/io-layer/mutexes.h>
-#include <mono/io-layer/processes.h>
-#include <mono/io-layer/security.h>
-#include <mono/io-layer/semaphores.h>
-#include <mono/io-layer/sockets.h>
-#include <mono/io-layer/status.h>
-#include <mono/io-layer/threads.h>
-#include <mono/io-layer/timefuncs.h>
-#include <mono/io-layer/versioninfo.h>
-#include <mono/io-layer/wait.h>
+
+G_BEGIN_DECLS
+
+#define WAIT_FAILED        ((int) 0xFFFFFFFF)
+#define WAIT_OBJECT_0      ((int) 0x00000000)
+#define WAIT_ABANDONED_0   ((int) 0x00000080)
+#define WAIT_TIMEOUT       ((int) 0x00000102)
+#define WAIT_IO_COMPLETION ((int) 0x000000C0)
 
 void
 wapi_init (void);
@@ -39,8 +36,9 @@ wapi_cleanup (void);
 gboolean
 CloseHandle (gpointer handle);
 
-gboolean
-DuplicateHandle (gpointer srcprocess, gpointer src, gpointer targetprocess, gpointer *target,
-       guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, guint32 options G_GNUC_UNUSED);
+pid_t
+wapi_getpid (void);
+
+G_END_DECLS
 
 #endif /* _WAPI_WAPI_H_ */