ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / libgnomevfs / gnome-vfs-handle.h
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.
3
4    Copyright (C) 1999 Free Software Foundation
5
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.
10
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.
15
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.
20
21    Author: Ettore Perazzoli <ettore@comm2000.it>
22 */
23
24 #ifndef GNOME_VFS_HANDLE_H
25 #define GNOME_VFS_HANDLE_H
26
27 #include <libgnomevfs/gnome-vfs-context.h>
28 #include <libgnomevfs/gnome-vfs-file-size.h>
29 #include <libgnomevfs/gnome-vfs-file-info.h>
30
31 G_BEGIN_DECLS
32
33 typedef gpointer GnomeVFSMethodHandle;
34 /**
35  * GnomeVFSHandle:
36  *
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.
41  **/
42 typedef struct GnomeVFSHandle GnomeVFSHandle;
43
44 /**
45  * GnomeVFSOpenMode:
46  * @GNOME_VFS_OPEN_NONE:
47  * @GNOME_VFS_OPEN_READ:
48  * @GNOME_VFS_OPEN_WRITE:
49  * @GNOME_VFS_OPEN_RANDOM:
50  *
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.
53  **/
54 typedef enum {
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
59 } GnomeVFSOpenMode;
60
61 /**
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.
66  *
67  * This is used to specify the start position for seek operations.
68  **/
69 typedef enum {
70         GNOME_VFS_SEEK_START,
71         GNOME_VFS_SEEK_CURRENT,
72         GNOME_VFS_SEEK_END
73 } GnomeVFSSeekPosition;
74
75
76 G_END_DECLS
77
78 #endif /* GNOME_VFS_HANDLE_H */