client/{directory.h,file.h}: reactos parts are no longer public
[captive.git] / src / libcaptive / client / directory.h
diff --git a/src/libcaptive/client/directory.h b/src/libcaptive/client/directory.h
new file mode 100644 (file)
index 0000000..d675a7c
--- /dev/null
@@ -0,0 +1,61 @@
+/* $Id$
+ * Include file for captive vfs 'directory' private interface to reactos
+ * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#ifndef _CAPTIVE_CLIENT_PRIV_DIRECTORY_H
+#define _CAPTIVE_CLIENT_PRIV_DIRECTORY_H 1
+
+
+#include <glib/gmacros.h>
+#include <glib/gtypes.h>
+#include "reactos/napi/types.h"        /* for NTSTATUS */
+#include "reactos/ntos/zwtypes.h"      /* for FILE_ID_BOTH_DIR_INFORMATION */
+
+
+G_BEGIN_DECLS
+
+struct _CaptiveDirectoryObject {
+       GObject parent_instance;
+
+       /*< private >*/
+       HANDLE dir_Handle;
+       gboolean read_first;
+       /* 'QueryDirectory_buf' for NtQueryDirectoryFile() must be persistent
+        * to keep the state if !read_first.
+        * Both types of 'QueryDirectory_buf' MUST NOT be 'union' as we convert
+        * them by copying one to other.
+        */
+       struct {
+               char FileIdBothDirInformation[sizeof(FILE_ID_BOTH_DIR_INFORMATION)
+                               +0x1000 /* max 'FileName' length, 255 should be enough */ * sizeof(WCHAR /* *FILE_ID_BOTH_DIR_INFORMATION.FileName */ )];
+               char FileBothDirInformation[sizeof(FILE_BOTH_DIR_INFORMATION)
+                               +0x1000 /* max 'FileName' length, 255 should be enough */ * sizeof(WCHAR /* *FILE_ID_BOTH_DIR_INFORMATION.FileName */ )];
+               } QueryDirectory_buf;
+       enum {
+               CaptiveDirectoryObject_QueryDirectory_type_FileIdBothDirInformation,
+               CaptiveDirectoryObject_QueryDirectory_type_FileBothDirInformation,
+               } CaptiveDirectoryObject_QueryDirectory_type;
+       };
+struct _CaptiveDirectoryObjectClass {
+       GObjectClass parent_class;
+       };
+
+G_END_DECLS
+
+
+#endif /* _CAPTIVE_CLIENT_PRIV_DIRECTORY_H */