RB.DeviceSource¶
- Implementations:
None
Methods¶
class |
|
class |
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class RB.DeviceSource¶
- Bases:
- Structure:
Sources that represent physical devices should implement this interface. It exposes the ability to eject the device, and also can be used to implement some
RB.Sourcemethods by using details from aGio.VolumeorGio.Mountaccessed via ‘volume’ and ‘mount’ properties on the source object. Devices that are not based on aGio.VolumeorGio.Mountcan still use the interface, but they must provide implementations of the can_eject and eject methods.- classmethod uri_is_source(source, uri)¶
- Parameters:
source (
RB.Source) – aRB.DeviceSourceuri (
str) – a URI to check
- Returns:
Trueif uri matches source- Return type:
Returns
Trueif uri matches source. This should be used to implement the uri_is_sourceRB.Sourcemethod.
- classmethod want_uri(source, uri)¶
- Parameters:
source (
RB.Source) – aRB.DeviceSourceuri (
str) – a URI to consider
- Returns:
URI match strength
- Return type:
Checks whether uri identifies a path underneath the device’s mount point. Should be used to implement the
RB.Sourcewant_uri method.
- default_eject()¶
Default method for ejecting devices. Implementations can perform any required work before ejecting, then call this do eject the device.
- eject()¶
Ejects the device that the source represents.
- set_display_details()¶
Sets the icon and display name for a device-based source. The details come from the mount and/or volume. This should be called in the source’s constructed method.
- do_eject() virtual¶
Ejects the device that the source represents.