1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2006-2007 Red Hat, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Alexander Larsson <alexl@redhat.com>
23 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24 #error "Only <gio/gio.h> can be included directly."
30 #include <gio/giotypes.h>
34 #define G_TYPE_VFS (g_vfs_get_type ())
35 #define G_VFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs))
36 #define G_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass))
37 #define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass))
38 #define G_IS_VFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS))
39 #define G_IS_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS))
42 * G_VFS_EXTENSION_POINT_NAME:
44 * Extension point for #GVfs functionality.
45 * See <link linkend="extending-gio">Extending GIO</link>.
47 #define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
52 * Virtual File System object.
54 typedef struct _GVfsClass GVfsClass;
58 GObject parent_instance;
63 GObjectClass parent_class;
67 gboolean (* is_active) (GVfs *vfs);
68 GFile * (* get_file_for_path) (GVfs *vfs,
70 GFile * (* get_file_for_uri) (GVfs *vfs,
72 const gchar * const * (* get_supported_uri_schemes) (GVfs *vfs);
73 GFile * (* parse_name) (GVfs *vfs,
74 const char *parse_name);
77 void (* local_file_add_info) (GVfs *vfs,
80 GFileAttributeMatcher *attribute_matcher,
82 GCancellable *cancellable,
84 GDestroyNotify *free_extra_data);
85 void (* add_writable_namespaces) (GVfs *vfs,
86 GFileAttributeInfoList *list);
87 gboolean (* local_file_set_attributes) (GVfs *vfs,
90 GFileQueryInfoFlags flags,
91 GCancellable *cancellable,
93 void (* local_file_removed) (GVfs *vfs,
94 const char *filename);
95 void (* local_file_moved) (GVfs *vfs,
98 /* Padding for future expansion */
99 void (*_g_reserved1) (void);
100 void (*_g_reserved2) (void);
101 void (*_g_reserved3) (void);
102 void (*_g_reserved4) (void);
103 void (*_g_reserved5) (void);
104 void (*_g_reserved6) (void);
105 void (*_g_reserved7) (void);
108 GType g_vfs_get_type (void) G_GNUC_CONST;
110 gboolean g_vfs_is_active (GVfs *vfs);
111 GFile * g_vfs_get_file_for_path (GVfs *vfs,
113 GFile * g_vfs_get_file_for_uri (GVfs *vfs,
115 const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs);
117 GFile * g_vfs_parse_name (GVfs *vfs,
118 const char *parse_name);
120 GVfs * g_vfs_get_default (void);
121 GVfs * g_vfs_get_local (void);
125 #endif /* __G_VFS_H__ */