File indexing completed on 2025-01-18 10:00:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_VFS_H__
0024 #define __G_VFS_H__
0025
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029
0030 #include <gio/giotypes.h>
0031
0032 G_BEGIN_DECLS
0033
0034 #define G_TYPE_VFS (g_vfs_get_type ())
0035 #define G_VFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs))
0036 #define G_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass))
0037 #define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass))
0038 #define G_IS_VFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS))
0039 #define G_IS_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS))
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 typedef GFile * (* GVfsFileLookupFunc) (GVfs *vfs,
0060 const char *identifier,
0061 gpointer user_data);
0062
0063
0064
0065
0066
0067
0068
0069 #define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
0070
0071 typedef struct _GVfsClass GVfsClass;
0072
0073 struct _GVfs
0074 {
0075 GObject parent_instance;
0076 };
0077
0078 struct _GVfsClass
0079 {
0080 GObjectClass parent_class;
0081
0082
0083
0084 gboolean (* is_active) (GVfs *vfs);
0085 GFile * (* get_file_for_path) (GVfs *vfs,
0086 const char *path);
0087 GFile * (* get_file_for_uri) (GVfs *vfs,
0088 const char *uri);
0089 const gchar * const * (* get_supported_uri_schemes) (GVfs *vfs);
0090 GFile * (* parse_name) (GVfs *vfs,
0091 const char *parse_name);
0092
0093
0094 void (* local_file_add_info) (GVfs *vfs,
0095 const char *filename,
0096 guint64 device,
0097 GFileAttributeMatcher *attribute_matcher,
0098 GFileInfo *info,
0099 GCancellable *cancellable,
0100 gpointer *extra_data,
0101 GDestroyNotify *free_extra_data);
0102 void (* add_writable_namespaces) (GVfs *vfs,
0103 GFileAttributeInfoList *list);
0104 gboolean (* local_file_set_attributes) (GVfs *vfs,
0105 const char *filename,
0106 GFileInfo *info,
0107 GFileQueryInfoFlags flags,
0108 GCancellable *cancellable,
0109 GError **error);
0110 void (* local_file_removed) (GVfs *vfs,
0111 const char *filename);
0112 void (* local_file_moved) (GVfs *vfs,
0113 const char *source,
0114 const char *dest);
0115 GIcon * (* deserialize_icon) (GVfs *vfs,
0116 GVariant *value);
0117
0118 void (*_g_reserved1) (void);
0119 void (*_g_reserved2) (void);
0120 void (*_g_reserved3) (void);
0121 void (*_g_reserved4) (void);
0122 void (*_g_reserved5) (void);
0123 void (*_g_reserved6) (void);
0124 };
0125
0126 GIO_AVAILABLE_IN_ALL
0127 GType g_vfs_get_type (void) G_GNUC_CONST;
0128
0129 GIO_AVAILABLE_IN_ALL
0130 gboolean g_vfs_is_active (GVfs *vfs);
0131 GIO_AVAILABLE_IN_ALL
0132 GFile * g_vfs_get_file_for_path (GVfs *vfs,
0133 const char *path);
0134 GIO_AVAILABLE_IN_ALL
0135 GFile * g_vfs_get_file_for_uri (GVfs *vfs,
0136 const char *uri);
0137 GIO_AVAILABLE_IN_ALL
0138 const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs);
0139
0140 GIO_AVAILABLE_IN_ALL
0141 GFile * g_vfs_parse_name (GVfs *vfs,
0142 const char *parse_name);
0143
0144 GIO_AVAILABLE_IN_ALL
0145 GVfs * g_vfs_get_default (void);
0146 GIO_AVAILABLE_IN_ALL
0147 GVfs * g_vfs_get_local (void);
0148
0149 GIO_AVAILABLE_IN_2_50
0150 gboolean g_vfs_register_uri_scheme (GVfs *vfs,
0151 const char *scheme,
0152 GVfsFileLookupFunc uri_func,
0153 gpointer uri_data,
0154 GDestroyNotify uri_destroy,
0155 GVfsFileLookupFunc parse_name_func,
0156 gpointer parse_name_data,
0157 GDestroyNotify parse_name_destroy);
0158 GIO_AVAILABLE_IN_2_50
0159 gboolean g_vfs_unregister_uri_scheme (GVfs *vfs,
0160 const char *scheme);
0161
0162
0163 G_END_DECLS
0164
0165 #endif