Interface

RBDeviceSource

Description [src]

interface RB.DeviceSource : GObject.Object

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 RBSource methods by using details from a GVolume or GMount accessed via ‘volume’ and ‘mount’ properties on the source object. Devices that are not based on a GVolume or GMount can still use the interface, but they must provide implementations of the can_eject and eject methods.

Prerequisite

In order to implement DeviceSource, your type must inherit fromGObject.

Functions

rb_device_source_uri_is_source

Returns TRUE if uri matches source. This should be used to implement the uri_is_source RBSource method.

rb_device_source_want_uri

Checks whether uri identifies a path underneath the device’s mount point. Should be used to implement the RBSource want_uri method.

Instance methods

rb_device_source_can_eject
No description available.

rb_device_source_default_eject

Default method for ejecting devices. Implementations can perform any required work before ejecting, then call this do eject the device.

rb_device_source_eject

Ejects the device that the source represents.

rb_device_source_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.

Interface structure

struct RBDeviceSourceInterface {
  GTypeInterface g_iface;
  gboolean (* can_eject) (
    RBDeviceSource* source
  );
  void (* eject) (
    RBDeviceSource* source
  );
  
}

No description available.

Interface members
g_iface
GTypeInterface
 

No description available.

can_eject
gboolean (* can_eject) (
    RBDeviceSource* source
  )
 

No description available.

eject
void (* eject) (
    RBDeviceSource* source
  )
 

No description available.

Virtual methods

RB.DeviceSource.can_eject
No description available.

RB.DeviceSource.eject

Ejects the device that the source represents.