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-directory.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-directory.h - Directory handling for the GNOME Virtual
3    File System.
4
5    Copyright (C) 1999 Free Software Foundation
6
7    The Gnome Library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Library General Public License as
9    published by the Free Software Foundation; either version 2 of the
10    License, or (at your option) any later version.
11
12    The Gnome Library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Library General Public License for more details.
16
17    You should have received a copy of the GNU Library General Public
18    License along with the Gnome Library; see the file COPYING.LIB.  If not,
19    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.
21
22    Author: Ettore Perazzoli <ettore@comm2000.it> */
23
24 #ifndef GNOME_VFS_DIRECTORY_H
25 #define GNOME_VFS_DIRECTORY_H
26
27 #include <glib/gmacros.h>
28 #include <libgnomevfs/gnome-vfs-file-info.h>
29
30 G_BEGIN_DECLS
31
32 typedef struct GnomeVFSDirectoryHandle GnomeVFSDirectoryHandle;
33
34 /**
35  * GnomeVFSDirectoryVisitOptions:
36  * @GNOME_VFS_DIRECTORY_VISIT_DEFAULT: 
37  * @GNOME_VFS_DIRECTORY_VISIT_SAMEFS: Visit only directories on the same 
38  * file system as the parent
39  * @GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK: Loop prevention
40  *
41  * This options control the way in which directories are visited.
42  **/
43
44 typedef enum {
45         GNOME_VFS_DIRECTORY_VISIT_DEFAULT = 0,
46         GNOME_VFS_DIRECTORY_VISIT_SAMEFS = 1 << 0,
47         GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK = 1 << 1
48 } GnomeVFSDirectoryVisitOptions;
49
50 typedef gboolean (* GnomeVFSDirectoryVisitFunc)  (const gchar *rel_path,
51                                                   GnomeVFSFileInfo *info,
52                                                   gboolean recursing_will_loop,
53                                                   gpointer data,
54                                                   gboolean *recurse);
55
56 GnomeVFSResult  gnome_vfs_directory_open
57                                         (GnomeVFSDirectoryHandle **handle,
58                                          const gchar              *text_uri,
59                                          GnomeVFSFileInfoOptions   options);
60 GnomeVFSResult  gnome_vfs_directory_open_from_uri
61                                         (GnomeVFSDirectoryHandle **handle,
62                                          GnomeVFSURI              *uri,
63                                          GnomeVFSFileInfoOptions   options);
64 GnomeVFSResult  gnome_vfs_directory_read_next
65                                         (GnomeVFSDirectoryHandle  *handle,
66                                          GnomeVFSFileInfo         *file_info);
67 GnomeVFSResult  gnome_vfs_directory_close
68                                         (GnomeVFSDirectoryHandle  *handle);
69
70
71 GnomeVFSResult  gnome_vfs_directory_visit
72                                         (const gchar *uri,
73                                          GnomeVFSFileInfoOptions info_options,
74                                          GnomeVFSDirectoryVisitOptions visit_options,
75                                          GnomeVFSDirectoryVisitFunc callback,
76                                          gpointer data);
77
78 GnomeVFSResult  gnome_vfs_directory_visit_uri
79                                         (GnomeVFSURI *uri,
80                                          GnomeVFSFileInfoOptions info_options,
81                                          GnomeVFSDirectoryVisitOptions visit_options,
82                                          GnomeVFSDirectoryVisitFunc callback,
83                                          gpointer data);
84
85 GnomeVFSResult  gnome_vfs_directory_visit_files
86                                         (const gchar *text_uri,
87                                          GList *file_list,
88                                          GnomeVFSFileInfoOptions info_options,
89                                          GnomeVFSDirectoryVisitOptions visit_options,
90                                          GnomeVFSDirectoryVisitFunc callback,
91                                          gpointer data);
92
93 GnomeVFSResult  gnome_vfs_directory_visit_files_at_uri
94                                         (GnomeVFSURI *uri,
95                                          GList *file_list,
96                                          GnomeVFSFileInfoOptions info_options,
97                                          GnomeVFSDirectoryVisitOptions visit_options,
98                                          GnomeVFSDirectoryVisitFunc callback,
99                                          gpointer data);
100
101 GnomeVFSResult gnome_vfs_directory_list_load
102                                         (GList **list,
103                                          const gchar *text_uri,
104                                          GnomeVFSFileInfoOptions options);
105
106 G_END_DECLS
107
108 #endif