source: trunk/third/gnome-vfs/libgnomevfs/gnome-vfs-directory-filter.h @ 17128

Revision 17128, 3.3 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17127, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2/* gnome-vfs-directory-filter.h - Directory filter for the GNOME
3   Virtual 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_FILTER_H
25#define GNOME_VFS_DIRECTORY_FILTER_H
26
27#include <libgnomevfs/gnome-vfs-file-info.h>
28
29typedef enum {
30        GNOME_VFS_DIRECTORY_FILTER_NONE,
31        GNOME_VFS_DIRECTORY_FILTER_SHELLPATTERN,
32        GNOME_VFS_DIRECTORY_FILTER_REGEXP
33} GnomeVFSDirectoryFilterType;
34typedef enum {
35        GNOME_VFS_DIRECTORY_FILTER_DEFAULT = 0,
36        GNOME_VFS_DIRECTORY_FILTER_NODIRS = 1 << 0,
37        GNOME_VFS_DIRECTORY_FILTER_DIRSONLY = 1 << 1,
38        GNOME_VFS_DIRECTORY_FILTER_NODOTFILES = 1 << 2,
39        GNOME_VFS_DIRECTORY_FILTER_IGNORECASE = 1 << 3,
40        GNOME_VFS_DIRECTORY_FILTER_EXTENDEDREGEXP =  1 << 4,
41        GNOME_VFS_DIRECTORY_FILTER_NOSELFDIR = 1 << 5,
42        GNOME_VFS_DIRECTORY_FILTER_NOPARENTDIR = 1 << 6,
43        GNOME_VFS_DIRECTORY_FILTER_NOBACKUPFILES = 1 << 7
44} GnomeVFSDirectoryFilterOptions;
45
46typedef enum {
47        GNOME_VFS_DIRECTORY_FILTER_NEEDS_NOTHING = 0,
48        GNOME_VFS_DIRECTORY_FILTER_NEEDS_NAME = 1 << 0,
49        GNOME_VFS_DIRECTORY_FILTER_NEEDS_TYPE = 1 << 1,
50        GNOME_VFS_DIRECTORY_FILTER_NEEDS_STAT = 1 << 2,
51        GNOME_VFS_DIRECTORY_FILTER_NEEDS_MIMETYPE = 1 << 3,
52} GnomeVFSDirectoryFilterNeeds;
53
54typedef enum {
55        GNOME_VFS_DIRECTORY_VISIT_DEFAULT = 0,
56        GNOME_VFS_DIRECTORY_VISIT_SAMEFS = 1 << 0,
57        GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK = 1 << 1
58} GnomeVFSDirectoryVisitOptions;
59
60typedef struct GnomeVFSDirectoryFilter GnomeVFSDirectoryFilter;
61
62typedef gboolean (* GnomeVFSDirectoryFilterFunc) (const GnomeVFSFileInfo *info,
63                                                  gpointer data);
64typedef gboolean (* GnomeVFSDirectoryVisitFunc)  (const gchar *rel_path,
65                                                  GnomeVFSFileInfo *info,
66                                                  gboolean recursing_will_loop,
67                                                  gpointer data,
68                                                  gboolean *recurse);
69
70GnomeVFSDirectoryFilter *
71        gnome_vfs_directory_filter_new  (GnomeVFSDirectoryFilterType type,
72                                         GnomeVFSDirectoryFilterOptions
73                                                 options,
74                                         const gchar *filter_pattern);
75GnomeVFSDirectoryFilter *
76        gnome_vfs_directory_filter_new_custom
77                                        (GnomeVFSDirectoryFilterFunc func,
78                                         GnomeVFSDirectoryFilterNeeds needs,
79                                         gpointer func_data);
80void    gnome_vfs_directory_filter_destroy
81                                        (GnomeVFSDirectoryFilter *filter);
82gboolean
83        gnome_vfs_directory_filter_apply
84                                        (const GnomeVFSDirectoryFilter *filter,
85                                         GnomeVFSFileInfo *info);
86
87GnomeVFSDirectoryFilterNeeds
88        gnome_vfs_directory_filter_get_needs
89                                        (const GnomeVFSDirectoryFilter *filter);
90
91#endif /* GNOME_VFS_DIRECTORY_FILTER_H */
Note: See TracBrowser for help on using the repository browser.