docs: fix typos
[platform/upstream/glib.git] / gio / gvfs.h
1 /* GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright (C) 2006-2007 Red Hat, Inc.
4  *
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.
9  *
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.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17  *
18  * Author: Alexander Larsson <alexl@redhat.com>
19  */
20
21 #ifndef __G_VFS_H__
22 #define __G_VFS_H__
23
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
26 #endif
27
28 #include <gio/giotypes.h>
29
30 G_BEGIN_DECLS
31
32 #define G_TYPE_VFS         (g_vfs_get_type ())
33 #define G_VFS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs))
34 #define G_VFS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass))
35 #define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass))
36 #define G_IS_VFS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS))
37 #define G_IS_VFS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS))
38
39 /**
40  * G_VFS_EXTENSION_POINT_NAME:
41  *
42  * Extension point for #GVfs functionality.
43  * See [Extending GIO][extending-gio].
44  */
45 #define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
46
47 /**
48  * GVfs:
49  *
50  * Virtual File System object.
51  **/
52 typedef struct _GVfsClass    GVfsClass;
53
54 struct _GVfs
55 {
56   GObject parent_instance;
57 };
58
59 struct _GVfsClass
60 {
61   GObjectClass parent_class;
62
63   /* Virtual Table */
64
65   gboolean              (* is_active)                 (GVfs       *vfs);
66   GFile               * (* get_file_for_path)         (GVfs       *vfs,
67                                                        const char *path);
68   GFile               * (* get_file_for_uri)          (GVfs       *vfs,
69                                                        const char *uri);
70   const gchar * const * (* get_supported_uri_schemes) (GVfs       *vfs);
71   GFile               * (* parse_name)                (GVfs       *vfs,
72                                                        const char *parse_name);
73
74   /*< private >*/
75   void                  (* local_file_add_info)       (GVfs       *vfs,
76                                                        const char *filename,
77                                                        guint64     device,
78                                                        GFileAttributeMatcher *attribute_matcher,
79                                                        GFileInfo  *info,
80                                                        GCancellable *cancellable,
81                                                        gpointer   *extra_data,
82                                                        GDestroyNotify *free_extra_data);
83   void                  (* add_writable_namespaces)   (GVfs       *vfs,
84                                                        GFileAttributeInfoList *list);
85   gboolean              (* local_file_set_attributes) (GVfs       *vfs,
86                                                        const char *filename,
87                                                        GFileInfo  *info,
88                                                        GFileQueryInfoFlags flags,
89                                                        GCancellable *cancellable,
90                                                        GError    **error);
91   void                  (* local_file_removed)        (GVfs       *vfs,
92                                                        const char *filename);
93   void                  (* local_file_moved)          (GVfs       *vfs,
94                                                        const char *source,
95                                                        const char *dest);
96   GIcon *               (* deserialize_icon)          (GVfs       *vfs,
97                                                        GVariant   *value);
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 };
106
107 GLIB_AVAILABLE_IN_ALL
108 GType                 g_vfs_get_type                  (void) G_GNUC_CONST;
109
110 GLIB_AVAILABLE_IN_ALL
111 gboolean              g_vfs_is_active                 (GVfs       *vfs);
112 GLIB_AVAILABLE_IN_ALL
113 GFile *               g_vfs_get_file_for_path         (GVfs       *vfs,
114                                                        const char *path);
115 GLIB_AVAILABLE_IN_ALL
116 GFile *               g_vfs_get_file_for_uri          (GVfs       *vfs,
117                                                        const char *uri);
118 GLIB_AVAILABLE_IN_ALL
119 const gchar* const * g_vfs_get_supported_uri_schemes  (GVfs       *vfs);
120
121 GLIB_AVAILABLE_IN_ALL
122 GFile *               g_vfs_parse_name                (GVfs       *vfs,
123                                                        const char *parse_name);
124
125 GLIB_AVAILABLE_IN_ALL
126 GVfs *                g_vfs_get_default               (void);
127 GLIB_AVAILABLE_IN_ALL
128 GVfs *                g_vfs_get_local                 (void);
129
130 G_END_DECLS
131
132 #endif /* __G_VFS_H__ */