gio-querymodules: Call setlocale in main function
[glib.git] / gio / gunixmounts.h
blobfaf811999ca117325ab579698e5f50c27b9f871e
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, see <http://www.gnu.org/licenses/>.
18 * Author: Alexander Larsson <alexl@redhat.com>
21 #ifndef __G_UNIX_MOUNTS_H__
22 #define __G_UNIX_MOUNTS_H__
24 #include <gio/gio.h>
26 G_BEGIN_DECLS
28 /**
29 * GUnixMountEntry:
31 * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
32 * This corresponds roughly to a mtab entry.
33 **/
34 typedef struct _GUnixMountEntry GUnixMountEntry;
36 /**
37 * GUnixMountPoint:
39 * Defines a Unix mount point (e.g. <filename>/dev</filename>).
40 * This corresponds roughly to a fstab entry.
41 **/
42 typedef struct _GUnixMountPoint GUnixMountPoint;
44 /**
45 * GUnixMountMonitor:
47 * Watches #GUnixMounts for changes.
48 **/
49 typedef struct _GUnixMountMonitor GUnixMountMonitor;
50 typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass;
52 #define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ())
53 #define G_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitor))
54 #define G_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitorClass))
55 #define G_IS_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_MOUNT_MONITOR))
56 #define G_IS_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_MOUNT_MONITOR))
57 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountMonitor, g_object_unref)
59 GLIB_AVAILABLE_IN_ALL
60 void g_unix_mount_free (GUnixMountEntry *mount_entry);
61 GLIB_AVAILABLE_IN_ALL
62 void g_unix_mount_point_free (GUnixMountPoint *mount_point);
63 GLIB_AVAILABLE_IN_ALL
64 gint g_unix_mount_compare (GUnixMountEntry *mount1,
65 GUnixMountEntry *mount2);
66 GLIB_AVAILABLE_IN_ALL
67 const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry);
68 GLIB_AVAILABLE_IN_ALL
69 const char * g_unix_mount_get_device_path (GUnixMountEntry *mount_entry);
70 GLIB_AVAILABLE_IN_ALL
71 const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry);
72 GLIB_AVAILABLE_IN_ALL
73 gboolean g_unix_mount_is_readonly (GUnixMountEntry *mount_entry);
74 GLIB_AVAILABLE_IN_ALL
75 gboolean g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry);
76 GLIB_AVAILABLE_IN_ALL
77 gboolean g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry);
78 GLIB_AVAILABLE_IN_ALL
79 gboolean g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry);
80 GLIB_AVAILABLE_IN_ALL
81 char * g_unix_mount_guess_name (GUnixMountEntry *mount_entry);
82 GLIB_AVAILABLE_IN_ALL
83 GIcon * g_unix_mount_guess_icon (GUnixMountEntry *mount_entry);
84 GLIB_AVAILABLE_IN_ALL
85 GIcon * g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry);
88 GLIB_AVAILABLE_IN_ALL
89 gint g_unix_mount_point_compare (GUnixMountPoint *mount1,
90 GUnixMountPoint *mount2);
91 GLIB_AVAILABLE_IN_ALL
92 const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
93 GLIB_AVAILABLE_IN_ALL
94 const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
95 GLIB_AVAILABLE_IN_ALL
96 const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
97 GLIB_AVAILABLE_IN_2_32
98 const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point);
99 GLIB_AVAILABLE_IN_ALL
100 gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
101 GLIB_AVAILABLE_IN_ALL
102 gboolean g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point);
103 GLIB_AVAILABLE_IN_ALL
104 gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
105 GLIB_AVAILABLE_IN_ALL
106 gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
107 GLIB_AVAILABLE_IN_ALL
108 char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
109 GLIB_AVAILABLE_IN_ALL
110 GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
111 GLIB_AVAILABLE_IN_ALL
112 GIcon * g_unix_mount_point_guess_symbolic_icon (GUnixMountPoint *mount_point);
115 GLIB_AVAILABLE_IN_ALL
116 GList * g_unix_mount_points_get (guint64 *time_read);
117 GLIB_AVAILABLE_IN_ALL
118 GList * g_unix_mounts_get (guint64 *time_read);
119 GLIB_AVAILABLE_IN_ALL
120 GUnixMountEntry *g_unix_mount_at (const char *mount_path,
121 guint64 *time_read);
122 GLIB_AVAILABLE_IN_ALL
123 gboolean g_unix_mounts_changed_since (guint64 time);
124 GLIB_AVAILABLE_IN_ALL
125 gboolean g_unix_mount_points_changed_since (guint64 time);
127 GLIB_AVAILABLE_IN_ALL
128 GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST;
129 GLIB_AVAILABLE_IN_2_44
130 GUnixMountMonitor *g_unix_mount_monitor_get (void);
131 GLIB_DEPRECATED_IN_2_44_FOR(g_unix_mount_monitor_get)
132 GUnixMountMonitor *g_unix_mount_monitor_new (void);
133 GLIB_DEPRECATED_IN_2_44
134 void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor,
135 int limit_msec);
137 GLIB_AVAILABLE_IN_ALL
138 gboolean g_unix_is_mount_path_system_internal (const char *mount_path);
140 G_END_DECLS
142 #endif /* __G_UNIX_MOUNTS_H__ */