1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-handle.h - Handle object for GNOME VFS files.
4 Copyright (C) 1999 Free Software Foundation
6 The Gnome Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 The Gnome Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the Gnome Library; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
21 Author: Ettore Perazzoli <ettore@comm2000.it>
24 #ifndef GNOME_VFS_HANDLE_H
25 #define GNOME_VFS_HANDLE_H
27 #include <libgnomevfs/gnome-vfs-context.h>
28 #include <libgnomevfs/gnome-vfs-file-size.h>
29 #include <libgnomevfs/gnome-vfs-file-info.h>
33 typedef gpointer GnomeVFSMethodHandle;
37 * Handle to a file, a handle is obtained using gnome_vfs_open and gnome_vfs_create
38 * family of functions on the file. A handle represents a file stream, gnome_vfs_close,
39 * gnome_vfs_write, gnome_vfs_read and all the other operations take a GnomeVFSHandle
40 * that identifies the file where the operation is going to be performed.
42 typedef struct GnomeVFSHandle GnomeVFSHandle;
46 * @GNOME_VFS_OPEN_NONE:
47 * @GNOME_VFS_OPEN_READ:
48 * @GNOME_VFS_OPEN_WRITE:
49 * @GNOME_VFS_OPEN_RANDOM:
51 * Mode in which files are opened. If GNOME_VFS_OPEN_RANDOM is not used, the
52 * file will be have to be accessed sequentially.
55 GNOME_VFS_OPEN_NONE = 0,
56 GNOME_VFS_OPEN_READ = 1 << 0,
57 GNOME_VFS_OPEN_WRITE = 1 << 1,
58 GNOME_VFS_OPEN_RANDOM = 1 << 2
62 * GnomeVFSSeekPosition:
63 * @GNOME_VFS_SEEK_START: Start of the file.
64 * @GNOME_VFS_SEEK_CURRENT: Current position.
65 * @GNOME_VFS_SEEK_END: End of the file.
67 * This is used to specify the start position for seek operations.
71 GNOME_VFS_SEEK_CURRENT,
73 } GnomeVFSSeekPosition;
78 #endif /* GNOME_VFS_HANDLE_H */