File indexing completed on 2025-01-18 10:00:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef __G_VOLUME_MONITOR_H__
0027 #define __G_VOLUME_MONITOR_H__
0028
0029 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0030 #error "Only <gio/gio.h> can be included directly."
0031 #endif
0032
0033 #include <gio/giotypes.h>
0034
0035 G_BEGIN_DECLS
0036
0037 #define G_TYPE_VOLUME_MONITOR (g_volume_monitor_get_type ())
0038 #define G_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitor))
0039 #define G_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass))
0040 #define G_VOLUME_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass))
0041 #define G_IS_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VOLUME_MONITOR))
0042 #define G_IS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VOLUME_MONITOR))
0043
0044
0045
0046
0047
0048
0049
0050 #define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor"
0051
0052 typedef struct _GVolumeMonitorClass GVolumeMonitorClass;
0053
0054 struct _GVolumeMonitor
0055 {
0056 GObject parent_instance;
0057
0058
0059 gpointer priv;
0060 };
0061
0062 struct _GVolumeMonitorClass
0063 {
0064 GObjectClass parent_class;
0065
0066
0067
0068 void (* volume_added) (GVolumeMonitor *volume_monitor,
0069 GVolume *volume);
0070 void (* volume_removed) (GVolumeMonitor *volume_monitor,
0071 GVolume *volume);
0072 void (* volume_changed) (GVolumeMonitor *volume_monitor,
0073 GVolume *volume);
0074
0075 void (* mount_added) (GVolumeMonitor *volume_monitor,
0076 GMount *mount);
0077 void (* mount_removed) (GVolumeMonitor *volume_monitor,
0078 GMount *mount);
0079 void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor,
0080 GMount *mount);
0081 void (* mount_changed) (GVolumeMonitor *volume_monitor,
0082 GMount *mount);
0083
0084 void (* drive_connected) (GVolumeMonitor *volume_monitor,
0085 GDrive *drive);
0086 void (* drive_disconnected) (GVolumeMonitor *volume_monitor,
0087 GDrive *drive);
0088 void (* drive_changed) (GVolumeMonitor *volume_monitor,
0089 GDrive *drive);
0090
0091
0092
0093 gboolean (* is_supported) (void);
0094
0095 GList * (* get_connected_drives) (GVolumeMonitor *volume_monitor);
0096 GList * (* get_volumes) (GVolumeMonitor *volume_monitor);
0097 GList * (* get_mounts) (GVolumeMonitor *volume_monitor);
0098
0099 GVolume * (* get_volume_for_uuid) (GVolumeMonitor *volume_monitor,
0100 const char *uuid);
0101
0102 GMount * (* get_mount_for_uuid) (GVolumeMonitor *volume_monitor,
0103 const char *uuid);
0104
0105
0106
0107 GVolume * (* adopt_orphan_mount) (GMount *mount,
0108 GVolumeMonitor *volume_monitor);
0109
0110
0111 void (* drive_eject_button) (GVolumeMonitor *volume_monitor,
0112 GDrive *drive);
0113
0114
0115 void (* drive_stop_button) (GVolumeMonitor *volume_monitor,
0116 GDrive *drive);
0117
0118
0119
0120 void (*_g_reserved1) (void);
0121 void (*_g_reserved2) (void);
0122 void (*_g_reserved3) (void);
0123 void (*_g_reserved4) (void);
0124 void (*_g_reserved5) (void);
0125 void (*_g_reserved6) (void);
0126 };
0127
0128 GIO_AVAILABLE_IN_ALL
0129 GType g_volume_monitor_get_type (void) G_GNUC_CONST;
0130
0131 GIO_AVAILABLE_IN_ALL
0132 GVolumeMonitor *g_volume_monitor_get (void);
0133 GIO_AVAILABLE_IN_ALL
0134 GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
0135 GIO_AVAILABLE_IN_ALL
0136 GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor);
0137 GIO_AVAILABLE_IN_ALL
0138 GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor);
0139 GIO_AVAILABLE_IN_ALL
0140 GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
0141 const char *uuid);
0142 GIO_AVAILABLE_IN_ALL
0143 GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
0144 const char *uuid);
0145
0146 GIO_DEPRECATED
0147 GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount);
0148
0149 G_END_DECLS
0150
0151 #endif