1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /* gnome-vfs-file-info.h - Handling of file information 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_FILE_INFO_H |
---|
25 | #define GNOME_VFS_FILE_INFO_H |
---|
26 | |
---|
27 | #include "gnome-vfs.h" |
---|
28 | |
---|
29 | #define GNOME_VFS_FILE_INFO_SYMLINK(info) \ |
---|
30 | ((info)->flags & GNOME_VFS_FILE_FLAGS_SYMLINK) |
---|
31 | |
---|
32 | #define GNOME_VFS_FILE_INFO_SET_SYMLINK(info, value) \ |
---|
33 | (value ? ((info)->flags |= GNOME_VFS_FILE_FLAGS_SYMLINK) \ |
---|
34 | : ((info)->flags &= ~GNOME_VFS_FILE_FLAGS_SYMLINK)) |
---|
35 | |
---|
36 | #define GNOME_VFS_FILE_INFO_LOCAL(info) \ |
---|
37 | ((info)->flags & GNOME_VFS_FILE_FLAGS_LOCAL) |
---|
38 | |
---|
39 | #define GNOME_VFS_FILE_INFO_SET_LOCAL(info, value) \ |
---|
40 | (value ? ((info)->flags |= GNOME_VFS_FILE_FLAGS_LOCAL) \ |
---|
41 | : ((info)->flags &= ~GNOME_VFS_FILE_FLAGS_LOCAL)) |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | #define GNOME_VFS_FILE_INFO_SUID(info) \ |
---|
46 | ((info)->permissions & GNOME_VFS_PERM_SUID) |
---|
47 | |
---|
48 | #define GNOME_VFS_FILE_INFO_SGID(info) \ |
---|
49 | ((info)->permissions & GNOME_VFS_PERM_SGID) |
---|
50 | |
---|
51 | #define GNOME_VFS_FILE_INFO_STICKY(info) \ |
---|
52 | ((info)->permissions & GNOME_VFS_PERM_STICKY) |
---|
53 | |
---|
54 | |
---|
55 | #define GNOME_VFS_FILE_INFO_SET_SUID(info, value) \ |
---|
56 | (value ? ((info)->permissions |= GNOME_VFS_PERM_SUID) \ |
---|
57 | : ((info)->permissions &= ~GNOME_VFS_PERM_SUID)) |
---|
58 | |
---|
59 | #define GNOME_VFS_FILE_INFO_SET_SGID(info, value) \ |
---|
60 | (value ? ((info)->permissions |= GNOME_VFS_PERM_SGID) \ |
---|
61 | : ((info)->permissions &= ~GNOME_VFS_PERM_SGID)) |
---|
62 | |
---|
63 | #define GNOME_VFS_FILE_INFO_SET_STICKY(info, value) \ |
---|
64 | (value ? ((info)->permissions |= GNOME_VFS_PERM_STICKY) \ |
---|
65 | : ((info)->permissions &= ~GNOME_VFS_PERM_STICKY)) |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | GnomeVFSFileInfo * |
---|
70 | gnome_vfs_file_info_new (void); |
---|
71 | void gnome_vfs_file_info_init (GnomeVFSFileInfo *info); |
---|
72 | void gnome_vfs_file_info_clear (GnomeVFSFileInfo *info); |
---|
73 | void gnome_vfs_file_info_unref (GnomeVFSFileInfo *info); |
---|
74 | void gnome_vfs_file_info_ref (GnomeVFSFileInfo *info); |
---|
75 | const gchar *gnome_vfs_file_info_get_mime_type |
---|
76 | (GnomeVFSFileInfo *info); |
---|
77 | |
---|
78 | void gnome_vfs_file_info_copy (GnomeVFSFileInfo *dest, |
---|
79 | const GnomeVFSFileInfo *src); |
---|
80 | |
---|
81 | GnomeVFSFileInfo * |
---|
82 | gnome_vfs_file_info_dup (const GnomeVFSFileInfo *orig); |
---|
83 | |
---|
84 | |
---|
85 | gboolean gnome_vfs_file_info_matches (const GnomeVFSFileInfo *a, |
---|
86 | const GnomeVFSFileInfo *b); |
---|
87 | |
---|
88 | gint gnome_vfs_file_info_compare_for_sort |
---|
89 | (const GnomeVFSFileInfo *a, |
---|
90 | const GnomeVFSFileInfo *b, |
---|
91 | const GnomeVFSDirectoryFilterType *sort_rules); |
---|
92 | |
---|
93 | gint gnome_vfs_file_info_compare_for_sort_reversed |
---|
94 | (const GnomeVFSFileInfo *a, |
---|
95 | const GnomeVFSFileInfo *b, |
---|
96 | const GnomeVFSDirectoryFilterType *sort_rules); |
---|
97 | |
---|
98 | GList *gnome_vfs_file_info_list_ref (GList *list); |
---|
99 | GList *gnome_vfs_file_info_list_unref (GList *list); |
---|
100 | GList *gnome_vfs_file_info_list_copy (GList *list); |
---|
101 | void gnome_vfs_file_info_list_free (GList *list); |
---|
102 | |
---|
103 | #endif /* GNOME_VFS_FILE_INFO_H */ |
---|