Class
GioVolumeMonitor
Description
class Gio.VolumeMonitor : GObject.Object {
parent_instance: GObject
}
GVolumeMonitor
is for listing the user interesting devices and volumes
on the computer. In other words, what a file selector or file manager
would show in a sidebar.
GVolumeMonitor
is not
[thread-default-context aware][g-main-context-push-thread-default],
and so should not be used other than from the main thread, with no
thread-default-context active.
In order to receive updates about volumes and mounts monitored through GVFS, a main loop must be running.
Functions
g_volume_monitor_adopt_orphan_mount
This function should be called by any GVolumeMonitor
implementation when a new GMount
object is created that is not
associated with a GVolume
object. It must be called just before
emitting the mount_added
signal.
Deprecated since: 2.20
g_volume_monitor_get
Gets the volume monitor used by gio.
Instance methods
g_volume_monitor_get_connected_drives
Gets a list of drives connected to the system.
g_volume_monitor_get_mount_for_uuid
Finds a GMount
object by its UUID (see g_mount_get_uuid())
g_volume_monitor_get_mounts
Gets a list of the mounts on the system.
g_volume_monitor_get_volume_for_uuid
Finds a GVolume
object by its UUID (see g_volume_get_uuid())
g_volume_monitor_get_volumes
Gets a list of the volumes on the system.
Signals
Gio.VolumeMonitor::drive-changed
Emitted when a drive changes.
Gio.VolumeMonitor::drive-connected
Emitted when a drive is connected to the system.
Gio.VolumeMonitor::drive-disconnected
Emitted when a drive is disconnected from the system.
Gio.VolumeMonitor::drive-eject-button
Emitted when the eject button is pressed on drive
.
Available since: 2.18
Gio.VolumeMonitor::drive-stop-button
Emitted when the stop button is pressed on drive
.
Available since: 2.22
Gio.VolumeMonitor::mount-added
Emitted when a mount is added.
Gio.VolumeMonitor::mount-changed
Emitted when a mount changes.
Gio.VolumeMonitor::mount-pre-unmount
May be emitted when a mount is about to be removed.
Gio.VolumeMonitor::mount-removed
Emitted when a mount is removed.
Gio.VolumeMonitor::volume-added
Emitted when a mountable volume is added to the system.
Gio.VolumeMonitor::volume-changed
Emitted when mountable volume is changed.
Gio.VolumeMonitor::volume-removed
Emitted when a mountable volume is removed from the system.
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct GioVolumeMonitorClass {
GObjectClass parent_class;
void (* volume_added) (
GVolumeMonitor* volume_monitor,
GVolume* volume
);
void (* volume_removed) (
GVolumeMonitor* volume_monitor,
GVolume* volume
);
void (* volume_changed) (
GVolumeMonitor* volume_monitor,
GVolume* volume
);
void (* mount_added) (
GVolumeMonitor* volume_monitor,
GMount* mount
);
void (* mount_removed) (
GVolumeMonitor* volume_monitor,
GMount* mount
);
void (* mount_pre_unmount) (
GVolumeMonitor* volume_monitor,
GMount* mount
);
void (* mount_changed) (
GVolumeMonitor* volume_monitor,
GMount* mount
);
void (* drive_connected) (
GVolumeMonitor* volume_monitor,
GDrive* drive
);
void (* drive_disconnected) (
GVolumeMonitor* volume_monitor,
GDrive* drive
);
void (* drive_changed) (
GVolumeMonitor* volume_monitor,
GDrive* drive
);
gboolean (* is_supported) (
void
);
GList* (* get_connected_drives) (
GVolumeMonitor* volume_monitor
);
GList* (* get_volumes) (
GVolumeMonitor* volume_monitor
);
GList* (* get_mounts) (
GVolumeMonitor* volume_monitor
);
GVolume* (* get_volume_for_uuid) (
GVolumeMonitor* volume_monitor,
const char* uuid
);
GMount* (* get_mount_for_uuid) (
GVolumeMonitor* volume_monitor,
const char* uuid
);
GVolume* (* adopt_orphan_mount) (
GMount* mount,
GVolumeMonitor* volume_monitor
);
void (* drive_eject_button) (
GVolumeMonitor* volume_monitor,
GDrive* drive
);
void (* drive_stop_button) (
GVolumeMonitor* volume_monitor,
GDrive* drive
);
void (* _g_reserved1) (
void
);
void (* _g_reserved2) (
void
);
void (* _g_reserved3) (
void
);
void (* _g_reserved4) (
void
);
void (* _g_reserved5) (
void
);
void (* _g_reserved6) (
void
);
}
Class members
parent_class |
|
No description available. | |
volume_added |
|
No description available. | |
volume_removed |
|
No description available. | |
volume_changed |
|
No description available. | |
mount_added |
|
No description available. | |
mount_removed |
|
No description available. | |
mount_pre_unmount |
|
No description available. | |
mount_changed |
|
No description available. | |
drive_connected |
|
No description available. | |
drive_disconnected |
|
No description available. | |
drive_changed |
|
No description available. | |
is_supported |
|
No description available. | |
get_connected_drives |
|
No description available. | |
get_volumes |
|
No description available. | |
get_mounts |
|
No description available. | |
get_volume_for_uuid |
|
No description available. | |
get_mount_for_uuid |
|
No description available. | |
adopt_orphan_mount |
|
No description available. | |
drive_eject_button |
|
No description available. | |
drive_stop_button |
|
No description available. | |
_g_reserved1 |
|
No description available. | |
_g_reserved2 |
|
No description available. | |
_g_reserved3 |
|
No description available. | |
_g_reserved4 |
|
No description available. | |
_g_reserved5 |
|
No description available. | |
_g_reserved6 |
|
No description available. |
Virtual methods
Gio.VolumeMonitorClass.drive_changed
Gio.VolumeMonitorClass.drive_connected
Gio.VolumeMonitorClass.drive_disconnected
Gio.VolumeMonitorClass.drive_eject_button
Gio.VolumeMonitorClass.drive_stop_button
Gio.VolumeMonitorClass.get_connected_drives
Gets a list of drives connected to the system.
Gio.VolumeMonitorClass.get_mount_for_uuid
Finds a GMount
object by its UUID (see g_mount_get_uuid())
Gio.VolumeMonitorClass.get_mounts
Gets a list of the mounts on the system.
Gio.VolumeMonitorClass.get_volume_for_uuid
Finds a GVolume
object by its UUID (see g_volume_get_uuid())
Gio.VolumeMonitorClass.get_volumes
Gets a list of the volumes on the system.