First set of licensing changes
[mono.git] / mono / io-layer / io-private.h
index 18ba8c7496913a0d648929be8a75066311f616d8..9af4b1f0a11f0c4d65152b1b5ab7eccdc75b3168 100644 (file)
@@ -1,37 +1,58 @@
+/*
+ * io-private.h:  Private definitions for file, console and find handles
+ *
+ * Author:
+ *     Dick Porter (dick@ximian.com)
+ *
+ * (C) 2002 Ximian, Inc.
+ * Copyright 2011 Xamarin Inc
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
 #ifndef _WAPI_IO_PRIVATE_H_
 #define _WAPI_IO_PRIVATE_H_
 
 #include <config.h>
 #include <glib.h>
-#include <glob.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#include <mono/io-layer/io.h>
+#include <mono/io-layer/wapi-private.h>
+
+extern struct _WapiHandleOps _wapi_file_ops;
+extern struct _WapiHandleOps _wapi_console_ops;
+extern struct _WapiHandleOps _wapi_find_ops;
+extern struct _WapiHandleOps _wapi_pipe_ops;
 
-/* Currently used for both FILE and CONSOLE handle types.  This may
+extern gboolean _wapi_lock_file_region (int fd, off_t offset, off_t length);
+extern gboolean _wapi_unlock_file_region (int fd, off_t offset, off_t length);
+extern void _wapi_file_details (gpointer handle_info);
+extern void _wapi_console_details (gpointer handle_info);
+extern void _wapi_pipe_details (gpointer handle_info);
+extern gpointer _wapi_stdhandle_create (int fd, const gchar *name);
+
+/* Currently used for both FILE, CONSOLE and PIPE handle types.  This may
  * have to change in future.
  */
 struct _WapiHandle_file
 {
-       guint32 filename;
+       gchar *filename;
+       struct _WapiFileShare *share_info;      /* Pointer into shared mem */
+       int fd;
        guint32 security_attributes;
        guint32 fileaccess;
        guint32 sharemode;
        guint32 attrs;
 };
 
-struct _WapiHandlePrivate_file
-{
-       int fd;
-};
-
 struct _WapiHandle_find
 {
-       glob_t glob;
+       gchar **namelist;
+       gchar *dir_part;
+       int num;
        size_t count;
 };
 
-struct _WapiHandlePrivate_find
-{
-       int dummy;
-};
-
-
 #endif /* _WAPI_IO_PRIVATE_H_ */