Trait gio::prelude::VolumeMonitorExt[][src]

pub trait VolumeMonitorExt: 'static {
Show methods fn connected_drives(&self) -> Vec<Drive>;
fn mount_for_uuid(&self, uuid: &str) -> Option<Mount>;
fn mounts(&self) -> Vec<Mount>;
fn volume_for_uuid(&self, uuid: &str) -> Option<Volume>;
fn volumes(&self) -> Vec<Volume>;
fn connect_drive_changed<F: Fn(&Self, &Drive) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_drive_connected<F: Fn(&Self, &Drive) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_drive_disconnected<F: Fn(&Self, &Drive) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_drive_eject_button<F: Fn(&Self, &Drive) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_drive_stop_button<F: Fn(&Self, &Drive) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mount_added<F: Fn(&Self, &Mount) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mount_changed<F: Fn(&Self, &Mount) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mount_pre_unmount<F: Fn(&Self, &Mount) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mount_removed<F: Fn(&Self, &Mount) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_volume_added<F: Fn(&Self, &Volume) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_volume_changed<F: Fn(&Self, &Volume) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_volume_removed<F: Fn(&Self, &Volume) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all VolumeMonitor methods.

Implementors

VolumeMonitor

Required methods

Gets a list of drives connected to the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

Returns

a GList of connected Drive objects.

Finds a Mount object by its UUID (see MountExt::uuid())

uuid

the UUID to look for

Returns

a Mount or None if no such mount is available. Free the returned object with g_object_unref().

Gets a list of the mounts on the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

Returns

a GList of Mount objects.

Finds a Volume object by its UUID (see VolumeExt::uuid())

uuid

the UUID to look for

Returns

a Volume or None if no such volume is available. Free the returned object with g_object_unref().

Gets a list of the volumes on the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

Returns

a GList of Volume objects.

Emitted when a drive changes.

drive

the drive that changed

Emitted when a drive is connected to the system.

drive

a Drive that was connected.

Emitted when a drive is disconnected from the system.

drive

a Drive that was disconnected.

Emitted when the eject button is pressed on drive.

drive

the drive where the eject button was pressed

Emitted when the stop button is pressed on drive.

drive

the drive where the stop button was pressed

Emitted when a mount is added.

mount

a Mount that was added.

Emitted when a mount changes.

mount

a Mount that changed.

May be emitted when a mount is about to be removed.

This signal depends on the backend and is only emitted if GIO was used to unmount.

mount

a Mount that is being unmounted.

Emitted when a mount is removed.

mount

a Mount that was removed.

Emitted when a mountable volume is added to the system.

volume

a Volume that was added.

Emitted when mountable volume is changed.

volume

a Volume that changed.

Emitted when a mountable volume is removed from the system.

volume

a Volume that was removed.

Implementors