2 * Include file with client general VFS access to libcaptive
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef _CAPTIVE_CLIENT_VFS_H
21 #define _CAPTIVE_CLIENT_VFS_H 1
24 #include <glib/gtypes.h>
25 #include <glib-object.h>
26 #include <libgnomevfs/gnome-vfs-result.h>
27 #include "captive/options.h" /* for captive_options */
32 #define CAPTIVE_VFS_TYPE_OBJECT (captive_vfs_object_get_type())
33 #define CAPTIVE_VFS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST((object),CAPTIVE_VFS_TYPE_OBJECT,CaptiveVfsObject))
34 #define CAPTIVE_VFS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),CAPTIVE_VFS_TYPE_OBJECT,CaptiveVfsObjectClass))
35 #define CAPTIVE_VFS_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object),CAPTIVE_VFS_TYPE_OBJECT))
36 #define CAPTIVE_VFS_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),CAPTIVE_VFS_TYPE_OBJECT))
37 #define CAPTIVE_VFS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_VFS_TYPE_OBJECT,CaptiveVfsObjectClass))
38 typedef struct _CaptiveVfsObject CaptiveVfsObject;
39 typedef struct _CaptiveVfsObjectClass CaptiveVfsObjectClass;
42 GType captive_vfs_object_get_type(void);
44 struct captive_options;
46 typedef struct _CaptiveVfsVolumeInfo CaptiveVfsVolumeInfo;
47 struct _CaptiveVfsVolumeInfo {
50 guint64 bytes_free; /* total free */
51 guint64 bytes_available; /* free without reserved */
55 GnomeVFSResult captive_vfs_new
56 (CaptiveVfsObject **captive_vfs_object_return,const struct captive_options *options);
57 GnomeVFSResult captive_vfs_commit(CaptiveVfsObject *captive_vfs_object);
58 GnomeVFSResult captive_vfs_volume_info_get(CaptiveVfsObject *captive_vfs_object,CaptiveVfsVolumeInfo *volume_info);
63 #endif /* _CAPTIVE_CLIENT_VFS_H */