RB.RemovableMediaManager

g GObject.Object GObject.Object RB.RemovableMediaManager RB.RemovableMediaManager GObject.Object->RB.RemovableMediaManager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (shell)

device_is_android (device)

get_gudev_device (volume)

scan ()

Virtual Methods

Inherited:

GObject.Object (7)

do_medium_added (source)

Properties

Name

Type

Flags

Short Description

scanned

bool

r

Whether a scan has been performed

shell

RB.Shell

r/w/co

RB.Shell object

Signals

Inherited:

GObject.Object (1)

Name

Short Description

create-source-device

Emitted when a new device is detected to allow plugins to create a corresponding RB.Source.

create-source-mount

Emitted when a new mount is added to allow plugins to create a corresponding RB.Source.

create-source-volume

Emitted when a new volume is added to allow plugins to create a corresponding RB.Source.

medium-added

Emitted when a new source is added for a removable medium.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class RB.RemovableMediaManager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

RB.RemovableMediaManagerClass

classmethod new(shell)
Parameters:

shell (RB.Shell) – the RB.Shell

Returns:

the RB.RemovableMediaManager

Return type:

RB.RemovableMediaManager

Creates the RB.RemovableMediaManager instance.

device_is_android(device)
Parameters:

device (GObject.Object) – the #GUdevDevice to query

Returns:

True if the device appears to be Android-based

Return type:

bool

Determines whether the specified device looks like an Android device.

get_gudev_device(volume)
Parameters:

volume (Gio.Volume) – the Gio.Volume

Returns:

the #GUDevDevice instance, if any

Return type:

GObject.Object

Finds the #GUdevDevice for the volume.

scan()

Initiates a new scan of all attached media. Newly activated plugins that use the create-source-volume or create-source-mount signals should call this if the ‘scanned’ property is True. Otherwise, the first scan will catch any existing volumes or mounts that the plugin is interested in.

do_medium_added(source) virtual
Parameters:

source (RB.Source) –

Signal Details

RB.RemovableMediaManager.signals.create_source_device(removable_media_manager, device)
Signal Name:

create-source-device

Flags:

RUN_LAST

Parameters:
Returns:

a source for the device, or None

Return type:

RB.Source

Emitted when a new device is detected to allow plugins to create a corresponding RB.Source. The first signal handler that returns a source wins. Plugins should only use this signal if there will be no Gio.Volume or Gio.Mount created for the device.

RB.RemovableMediaManager.signals.create_source_mount(removable_media_manager, device_info, mount)
Signal Name:

create-source-mount

Flags:

RUN_LAST

Parameters:
Returns:

a source for the mount, or None

Return type:

RB.Source

Emitted when a new mount is added to allow plugins to create a corresponding RB.Source. The first signal handler that returns a source wins. If a source was created for the Gio.Volume for a mount, then this signal will not be emitted.

RB.RemovableMediaManager.signals.create_source_volume(removable_media_manager, volume)
Signal Name:

create-source-volume

Flags:

RUN_LAST

Parameters:
Returns:

a source for the volume, or None

Return type:

RB.Source

Emitted when a new volume is added to allow plugins to create a corresponding RB.Source. The first signal handler that returns a source wins. A plugin should only use this signal if it doesn’t require the volume to be mounted. If the volume must be mounted to be useful, use the create-source-mount signal instead.

RB.RemovableMediaManager.signals.medium_added(removable_media_manager, source)
Signal Name:

medium-added

Flags:

RUN_LAST

Parameters:

Emitted when a new source is added for a removable medium.

Property Details

RB.RemovableMediaManager.props.scanned
Name:

scanned

Type:

bool

Default Value:

False

Flags:

READABLE

This is set to True when the removable media manager has scanned all existing volumes and mounts. When a plugin that handles removable media is activated, it should request a new scan if this property is already set to True.

RB.RemovableMediaManager.props.shell
Name:

shell

Type:

RB.Shell

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The RB.Shell instance.