gio/ docs/reference/gio Merged gio-standalone into glib.
[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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author: Alexander Larsson <alexl@redhat.com>
21  */
22
23 #ifndef __G_VFS_IMPLEMENTATION_H__
24 #define __G_VFS_IMPLEMENTATION_H__
25
26 #include <glib-object.h>
27 #include <gio/gfile.h>
28
29 G_BEGIN_DECLS
30
31 #define G_TYPE_VFS         (g_vfs_get_type ())
32 #define G_VFS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs))
33 #define G_VFS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass))
34 #define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass))
35 #define G_IS_VFS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS))
36 #define G_IS_VFS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS))
37
38 typedef struct _GVfs         GVfs; /* Dummy typedef */
39 typedef struct _GVfsClass    GVfsClass;
40
41 struct _GVfs {
42   GObject parent;
43 };
44
45 struct _GVfsClass
46 {
47   GObjectClass parent_class;
48
49   const char *name;
50   int priority;
51   
52   /* Virtual Table */
53
54   gboolean             (*is_active)                 (GVfs *vfs);
55   GFile               *(*get_file_for_path)         (GVfs *vfs,
56                                                      const char *path);
57   GFile               *(*get_file_for_uri)          (GVfs *vfs,
58                                                      const char *uri);
59   const gchar * const *(*get_supported_uri_schemes) (GVfs *vfs);
60   GFile               *(*parse_name)                (GVfs *vfs,
61                                                      const char *parse_name);
62
63
64
65   /* Padding for future expansion */
66   void (*_g_reserved1) (void);
67   void (*_g_reserved2) (void);
68   void (*_g_reserved3) (void);
69   void (*_g_reserved4) (void);
70   void (*_g_reserved5) (void);
71   void (*_g_reserved6) (void);
72   void (*_g_reserved7) (void);
73   void (*_g_reserved8) (void);
74   void (*_g_reserved9) (void);
75   void (*_g_reserved10) (void);
76   void (*_g_reserved11) (void);
77   void (*_g_reserved12) (void);
78   
79 };
80
81 GType g_vfs_get_type (void) G_GNUC_CONST;
82
83 gboolean              g_vfs_is_active                 (GVfs       *vfs);
84 GFile *               g_vfs_get_file_for_path         (GVfs       *vfs,
85                                                        const char *path);
86 GFile *               g_vfs_get_file_for_uri          (GVfs       *vfs,
87                                                        const char *uri);
88 const gchar * const * g_vfs_get_supported_uri_schemes (GVfs *vfs);
89
90 GFile *               g_vfs_parse_name                (GVfs       *vfs,
91                                                        const char *parse_name);
92
93 GVfs *                g_vfs_get_default               (void);
94 GVfs *                g_vfs_get_local                 (void);
95
96 G_END_DECLS
97
98 #endif /* __G_VFS_H__ */