#include "config.h"
#include "captive/client-directory.h" /* self */
+#include "directory.h" /* self-priv */
#include "lib.h"
#include <glib/gmessages.h>
#include "captive/unicode.h"
--- /dev/null
+/* $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 */
#include "config.h"
#include "captive/client-file.h" /* self */
+#include "file.h" /* self-priv */
+#include "directory.h"
#include "lib.h"
#include <glib/gmessages.h>
#include "captive/unicode.h"
CaptiveDirectoryObject *captive_target_directory_object;
FILE_OBJECT *target_dir_FileObject;
UNICODE_STRING *target_dir_FileObject_FileName_UnicodeString_local;
+BOOLEAN errboolean;
g_return_val_if_fail(captive_file_object_old!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
g_return_val_if_fail(captive_file_object_old->file_Handle!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
* as the directory is fully determined by its other attributes.
*/
target_dir_FileObject_FileName_UnicodeString_local=captive_utf8_to_UnicodeString_alloca(pathname_new_basename);
- target_dir_FileObject->FileName=*target_dir_FileObject_FileName_UnicodeString_local;
+ errboolean=RtlCreateUnicodeString(&target_dir_FileObject->FileName,
+ target_dir_FileObject_FileName_UnicodeString_local->Buffer);
+ g_assert(errboolean==TRUE);
ObDereferenceObject(target_dir_FileObject);
--- /dev/null
+/* $Id$
+ * Include file for captive vfs 'file' 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_FILE_H
+#define _CAPTIVE_CLIENT_PRIV_FILE_H 1
+
+
+#include <glib/gmacros.h>
+#include <glib/gtypes.h>
+#include "reactos/napi/types.h" /* for NTSTATUS */
+
+
+G_BEGIN_DECLS
+
+struct _CaptiveFileObject {
+ GObject parent_instance;
+
+ /*< private >*/
+ HANDLE file_Handle;
+ GnomeVFSFileOffset offset;
+ };
+struct _CaptiveFileObjectClass {
+ GObjectClass parent_class;
+ };
+
+G_END_DECLS
+
+
+#endif /* _CAPTIVE_CLIENT_PRIV_FILE_H */
#include <glib/gmacros.h>
#include <glib-object.h>
-#include "reactos/ntos/types.h" /* for HANDLE */
-#include "reactos/ntos/zwtypes.h" /* for FILE_ID_BOTH_DIR_INFORMATION */
#include <libgnomevfs/gnome-vfs-file-info.h> /* for GnomeVFSFileInfo */
#define CAPTIVE_DIRECTORY_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_DIRECTORY_TYPE_OBJECT,CaptiveDirectoryObjectClass))
typedef struct _CaptiveDirectoryObject CaptiveDirectoryObject;
typedef struct _CaptiveDirectoryObjectClass CaptiveDirectoryObjectClass;
-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;
- };
GType captive_directory_object_get_type(void);
#include <glib/gmacros.h>
#include <glib-object.h>
-#include "reactos/ntos/types.h" /* for HANDLE */
-#include "reactos/ntos/zwtypes.h" /* for FILE_ID_BOTH_DIR_INFORMATION */
#include <libgnomevfs/gnome-vfs-handle.h> /* for GnomeVFSOpenMode */
#define CAPTIVE_FILE_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_FILE_TYPE_OBJECT,CaptiveFileObjectClass))
typedef struct _CaptiveFileObject CaptiveFileObject;
typedef struct _CaptiveFileObjectClass CaptiveFileObjectClass;
-struct _CaptiveFileObject {
- GObject parent_instance;
- /*< private >*/
- HANDLE file_Handle;
- GnomeVFSFileOffset offset;
- };
-struct _CaptiveFileObjectClass {
- GObjectClass parent_class;
- };
GType captive_file_object_get_type(void);