Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gunixmounts.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright (C) 2006-2007 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: Alexander Larsson <alexl@redhat.com>
21 */
22
23#ifndef __G_UNIX_MOUNTS_H__
24#define __G_UNIX_MOUNTS_H__
25
26#include <gio/gio.h>
27#include <stdint.h>
28
30
31/**
32 * GUnixMountEntry:
33 *
34 * Defines a Unix mount entry (e.g. `/media/cdrom`).
35 * This corresponds roughly to a mtab entry.
36 **/
37typedef struct _GUnixMountEntry GUnixMountEntry;
38
39#define G_TYPE_UNIX_MOUNT_ENTRY (g_unix_mount_entry_get_type ())
42
43/**
44 * GUnixMountPoint:
45 *
46 * Defines a Unix mount point (e.g. `/dev`).
47 * This corresponds roughly to a fstab entry.
48 **/
49typedef struct _GUnixMountPoint GUnixMountPoint;
50
51#define G_TYPE_UNIX_MOUNT_POINT (g_unix_mount_point_get_type ())
54
55/**
56 * GUnixMountMonitor:
57 *
58 * Watches #GUnixMounts for changes.
59 **/
60typedef struct _GUnixMountMonitor GUnixMountMonitor;
61typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass;
62
63#define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ())
64#define G_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitor))
65#define G_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitorClass))
66#define G_IS_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_MOUNT_MONITOR))
67#define G_IS_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_MOUNT_MONITOR))
69
80 GUnixMountEntry *mount2);
82const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry);
86const char * g_unix_mount_get_root_path (GUnixMountEntry *mount_entry);
88const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry);
90const char * g_unix_mount_get_options (GUnixMountEntry *mount_entry);
105
108
111 GUnixMountPoint *mount2);
134
135
140 uint64_t *time_read_out,
141 size_t *n_points_out);
143GUnixMountPoint *g_unix_mount_point_at (const char *mount_path,
144 guint64 *time_read);
149 uint64_t *time_read_out,
150 size_t *n_entries_out);
152GUnixMountEntry *g_unix_mount_at (const char *mount_path,
153 guint64 *time_read);
155GUnixMountEntry *g_unix_mount_for (const char *file_path,
156 guint64 *time_read);
161
170 int limit_msec);
171
175gboolean g_unix_is_system_fs_type (const char *fs_type);
177gboolean g_unix_is_system_device_path (const char *device_path);
178
180
181#endif /* __G_UNIX_MOUNTS_H__ */
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_32
#define GIO_AVAILABLE_IN_2_60
#define GIO_AVAILABLE_IN_2_44
#define GIO_AVAILABLE_IN_2_58
#define GIO_DEPRECATED_IN_2_44
#define GIO_AVAILABLE_IN_2_82
#define GIO_AVAILABLE_IN_2_66
#define GIO_AVAILABLE_IN_2_54
#define GIO_DEPRECATED_IN_2_44_FOR(f)
#define GIO_AVAILABLE_IN_2_56
#define GIO_AVAILABLE_IN_2_52
struct _GIcon GIcon
Definition giotypes.h:92
unsigned long guint64
Definition glibconfig.h:67
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
int gint
Definition gtypes.h:55
struct _GUnixMountMonitor GUnixMountMonitor
Definition gunixmounts.h:60
GIO_AVAILABLE_IN_2_66 GUnixMountPoint * g_unix_mount_point_at(const char *mount_path, guint64 *time_read)
typedefG_BEGIN_DECLS struct _GUnixMountEntry GUnixMountEntry
Definition gunixmounts.h:37
GIO_AVAILABLE_IN_ALL gboolean g_unix_mounts_changed_since(guint64 time)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_point_is_user_mountable(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL GUnixMountEntry * g_unix_mount_at(const char *mount_path, guint64 *time_read)
GIO_AVAILABLE_IN_ALL GIcon * g_unix_mount_guess_icon(GUnixMountEntry *mount_entry)
struct _GUnixMountMonitorClass GUnixMountMonitorClass
Definition gunixmounts.h:61
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_point_get_fs_type(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_2_82 GUnixMountPoint ** g_unix_mount_points_get_from_file(const char *table_path, uint64_t *time_read_out, size_t *n_points_out)
GIO_AVAILABLE_IN_2_60 const char * g_unix_mount_get_root_path(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_2_58 const char * g_unix_mount_get_options(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_2_56 gboolean g_unix_is_system_device_path(const char *device_path)
GIO_AVAILABLE_IN_2_56 gboolean g_unix_is_system_fs_type(const char *fs_type)
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_point_get_mount_path(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL GList * g_unix_mount_points_get(guint64 *time_read)
GIO_AVAILABLE_IN_ALL void g_unix_mount_point_free(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL gint g_unix_mount_compare(GUnixMountEntry *mount1, GUnixMountEntry *mount2)
GIO_DEPRECATED_IN_2_44 void g_unix_mount_monitor_set_rate_limit(GUnixMountMonitor *mount_monitor, int limit_msec)
GIO_AVAILABLE_IN_ALL void g_unix_mount_free(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_2_82 GUnixMountEntry ** g_unix_mounts_get_from_file(const char *table_path, uint64_t *time_read_out, size_t *n_entries_out)
GIO_AVAILABLE_IN_ALL gint g_unix_mount_point_compare(GUnixMountPoint *mount1, GUnixMountPoint *mount2)
GIO_AVAILABLE_IN_2_32 const char * g_unix_mount_point_get_options(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_point_is_readonly(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL GList * g_unix_mounts_get(guint64 *time_read)
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_point_get_device_path(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL GIcon * g_unix_mount_point_guess_icon(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_2_52 GUnixMountEntry * g_unix_mount_for(const char *file_path, guint64 *time_read)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_is_readonly(GUnixMountEntry *mount_entry)
GUnixMountMonitor * g_unix_mount_monitor_new(void)
GIO_AVAILABLE_IN_2_54 GUnixMountEntry * g_unix_mount_copy(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL GIcon * g_unix_mount_guess_symbolic_icon(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_get_device_path(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL char * g_unix_mount_guess_name(GUnixMountEntry *mount_entry)
struct _GUnixMountPoint GUnixMountPoint
Definition gunixmounts.h:49
GIO_AVAILABLE_IN_2_44 GUnixMountMonitor * g_unix_mount_monitor_get(void)
GIO_AVAILABLE_IN_ALL GType g_unix_mount_monitor_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_2_54 GType g_unix_mount_entry_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_2_54 GUnixMountPoint * g_unix_mount_point_copy(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_is_system_internal(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL char * g_unix_mount_point_guess_name(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL GIcon * g_unix_mount_point_guess_symbolic_icon(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_get_mount_path(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_guess_can_eject(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_points_changed_since(guint64 time)
GIO_AVAILABLE_IN_ALL gboolean g_unix_is_mount_path_system_internal(const char *mount_path)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_guess_should_display(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_point_is_loopback(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_ALL const char * g_unix_mount_get_fs_type(GUnixMountEntry *mount_entry)
GIO_AVAILABLE_IN_ALL gboolean g_unix_mount_point_guess_can_eject(GUnixMountPoint *mount_point)
GIO_AVAILABLE_IN_2_54 GType g_unix_mount_point_get_type(void) G_GNUC_CONST