UDisks.Drive¶
- Implementations:
 
Methods¶
class  | 
|
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
  | 
|
  | 
|
  | 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
CanPowerOff  | 
||
r/w  | 
Configuration  | 
||
r/w  | 
ConnectionBus  | 
||
r/w  | 
Ejectable  | 
||
r/w  | 
Id  | 
||
r/w  | 
Media  | 
||
r/w  | 
MediaAvailable  | 
||
r/w  | 
MediaChangeDetected  | 
||
[  | 
r/w  | 
MediaCompatibility  | 
|
r/w  | 
MediaRemovable  | 
||
r/w  | 
Model  | 
||
r/w  | 
Optical  | 
||
r/w  | 
OpticalBlank  | 
||
r/w  | 
OpticalNumAudioTracks  | 
||
r/w  | 
OpticalNumDataTracks  | 
||
r/w  | 
OpticalNumSessions  | 
||
r/w  | 
OpticalNumTracks  | 
||
r/w  | 
Removable  | 
||
r/w  | 
Revision  | 
||
r/w  | 
RotationRate  | 
||
r/w  | 
Seat  | 
||
r/w  | 
Serial  | 
||
r/w  | 
SiblingId  | 
||
r/w  | 
Size  | 
||
r/w  | 
SortKey  | 
||
r/w  | 
TimeDetected  | 
||
r/w  | 
TimeMediaDetected  | 
||
r/w  | 
Vendor  | 
||
r/w  | 
WWN  | 
Signals¶
Name  | 
Short Description  | 
|---|---|
Signal emitted when a remote caller is invoking the Eject() D-Bus method.  | 
|
Signal emitted when a remote caller is invoking the PowerOff() D-Bus method.  | 
|
Signal emitted when a remote caller is invoking the SetConfiguration() D-Bus method.  | 
Fields¶
None
Class Details¶
- class UDisks.Drive¶
 - Bases:
 - Structure:
 
Abstract interface type for the D-Bus interface org.freedesktop.UDisks2.Drive.
- classmethod interface_info()¶
 - Returns:
 A
Gio.DBusInterfaceInfo. Do not free.- Return type:
 
Gets a machine-readable description of the org.freedesktop.UDisks2.Drive D-Bus interface.
- classmethod override_properties(klass, property_id_begin)¶
 - Parameters:
 klass (
GObject.ObjectClass) – The class structure for aGObject.Objectderived class.property_id_begin (
int) – The property id to assign to the first overridden property.
- Returns:
 The last property id.
- Return type:
 
Overrides all
GObject.Objectproperties in theUDisks.Driveinterface for a concrete class. The properties are overridden in the order they are defined.
- call_eject(arg_options, cancellable, callback, *user_data)¶
 - Parameters:
 arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously invokes the Eject() D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see
GLib.MainContext.push_thread_default()). You can then callUDisks.Drive.call_eject_finish() to get the result of the operation.See
UDisks.Drive.call_eject_sync() for the synchronous, blocking version of this method.
- call_eject_finish(res)¶
 - Parameters:
 res (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toUDisks.Drive.call_eject().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
UDisks.Drive.call_eject().
- call_eject_sync(arg_options, cancellable)¶
 - Parameters:
 arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
Synchronously invokes the Eject() D-Bus method on self. The calling thread is blocked until a reply is received.
See
UDisks.Drive.call_eject() for the asynchronous version of this method.
- call_power_off(arg_options, cancellable, callback, *user_data)¶
 - Parameters:
 arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously invokes the PowerOff() D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see
GLib.MainContext.push_thread_default()). You can then callUDisks.Drive.call_power_off_finish() to get the result of the operation.See
UDisks.Drive.call_power_off_sync() for the synchronous, blocking version of this method.New in version 2.0.0.
- call_power_off_finish(res)¶
 - Parameters:
 res (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toUDisks.Drive.call_power_off().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
UDisks.Drive.call_power_off().New in version 2.0.0.
- call_power_off_sync(arg_options, cancellable)¶
 - Parameters:
 arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
Synchronously invokes the PowerOff() D-Bus method on self. The calling thread is blocked until a reply is received.
See
UDisks.Drive.call_power_off() for the asynchronous version of this method.New in version 2.0.0.
- call_set_configuration(arg_value, arg_options, cancellable, callback, *user_data)¶
 - Parameters:
 arg_value (
GLib.Variant) – Argument to pass with the method invocation.arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously invokes the SetConfiguration() D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see
GLib.MainContext.push_thread_default()). You can then callUDisks.Drive.call_set_configuration_finish() to get the result of the operation.See
UDisks.Drive.call_set_configuration_sync() for the synchronous, blocking version of this method.
- call_set_configuration_finish(res)¶
 - Parameters:
 res (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toUDisks.Drive.call_set_configuration().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
UDisks.Drive.call_set_configuration().
- call_set_configuration_sync(arg_value, arg_options, cancellable)¶
 - Parameters:
 arg_value (
GLib.Variant) – Argument to pass with the method invocation.arg_options (
GLib.Variant) – Argument to pass with the method invocation.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
Synchronously invokes the SetConfiguration() D-Bus method on self. The calling thread is blocked until a reply is received.
See
UDisks.Drive.call_set_configuration() for the asynchronous version of this method.
- complete_eject(invocation)¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
Helper function used in service implementations to finish handling invocations of the Eject() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free invocation, you cannot use it afterwards.
- complete_power_off(invocation)¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
Helper function used in service implementations to finish handling invocations of the PowerOff() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free invocation, you cannot use it afterwards.
New in version 2.0.0.
- complete_set_configuration(invocation)¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
Helper function used in service implementations to finish handling invocations of the SetConfiguration() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free invocation, you cannot use it afterwards.
- do_handle_eject(invocation, arg_options) virtual¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) –arg_options (
GLib.Variant) –
- Return type:
 
Handler for the
UDisks.Drive::handle-ejectsignal.
- do_handle_power_off(invocation, arg_options) virtual¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) –arg_options (
GLib.Variant) –
- Return type:
 
Handler for the
UDisks.Drive::handle-power-offsignal.
- do_handle_set_configuration(invocation, arg_value, arg_options) virtual¶
 - Parameters:
 invocation (
Gio.DBusMethodInvocation) –arg_value (
GLib.Variant) –arg_options (
GLib.Variant) –
- Return type:
 
Handler for the
UDisks.Drive::handle-set-configurationsignal.
Signal Details¶
- UDisks.Drive.signals.handle_eject(drive, invocation, arg_options)¶
 - Signal Name:
 handle-eject- Flags:
 - Parameters:
 drive (
UDisks.Drive) – The object which received the signalinvocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.arg_options (
GLib.Variant) – Argument passed by remote caller.
- Returns:
 Gio.DBUS_METHOD_INVOCATION_HANDLEDorTrueif the invocation was handled,Gio.DBUS_METHOD_INVOCATION_UNHANDLEDorFalseto let other signal handlers run.- Return type:
 
Signal emitted when a remote caller is invoking the Eject() D-Bus method.
If a signal handler returns
True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually callUDisks.Drive.complete_eject() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, theGio.DBusError.UNKNOWN_METHODerror is returned.
- UDisks.Drive.signals.handle_power_off(drive, invocation, arg_options)¶
 - Signal Name:
 handle-power-off- Flags:
 - Parameters:
 drive (
UDisks.Drive) – The object which received the signalinvocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.arg_options (
GLib.Variant) – Argument passed by remote caller.
- Returns:
 Gio.DBUS_METHOD_INVOCATION_HANDLEDorTrueif the invocation was handled,Gio.DBUS_METHOD_INVOCATION_UNHANDLEDorFalseto let other signal handlers run.- Return type:
 
Signal emitted when a remote caller is invoking the PowerOff() D-Bus method.
If a signal handler returns
True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually callUDisks.Drive.complete_power_off() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, theGio.DBusError.UNKNOWN_METHODerror is returned.New in version 2.0.0.
- UDisks.Drive.signals.handle_set_configuration(drive, invocation, arg_value, arg_options)¶
 - Signal Name:
 handle-set-configuration- Flags:
 - Parameters:
 drive (
UDisks.Drive) – The object which received the signalinvocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.arg_value (
GLib.Variant) – Argument passed by remote caller.arg_options (
GLib.Variant) – Argument passed by remote caller.
- Returns:
 Gio.DBUS_METHOD_INVOCATION_HANDLEDorTrueif the invocation was handled,Gio.DBUS_METHOD_INVOCATION_UNHANDLEDorFalseto let other signal handlers run.- Return type:
 
Signal emitted when a remote caller is invoking the SetConfiguration() D-Bus method.
If a signal handler returns
True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually callUDisks.Drive.complete_set_configuration() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, theGio.DBusError.UNKNOWN_METHODerror is returned.
Property Details¶
- UDisks.Drive.props.can_power_off¶
 - 
Represents the D-Bus property “CanPowerOff”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.configuration¶
 - Name:
 configuration- Type:
 - Default Value:
 - Flags:
 
Represents the D-Bus property “Configuration”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
- UDisks.Drive.props.connection_bus¶
 - 
Represents the D-Bus property “ConnectionBus”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.ejectable¶
 - 
Represents the D-Bus property “Ejectable”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.id¶
 - 
Represents the D-Bus property “Id”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.media¶
 - 
Represents the D-Bus property “Media”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.media_available¶
 - 
Represents the D-Bus property “MediaAvailable”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.media_change_detected¶
 - 
Represents the D-Bus property “MediaChangeDetected”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.media_compatibility¶
 - 
Represents the D-Bus property “MediaCompatibility”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.media_removable¶
 - 
Represents the D-Bus property “MediaRemovable”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.model¶
 - 
Represents the D-Bus property “Model”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical¶
 - 
Represents the D-Bus property “Optical”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical_blank¶
 - 
Represents the D-Bus property “OpticalBlank”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical_num_audio_tracks¶
 - 
Represents the D-Bus property “OpticalNumAudioTracks”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical_num_data_tracks¶
 - 
Represents the D-Bus property “OpticalNumDataTracks”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical_num_sessions¶
 - 
Represents the D-Bus property “OpticalNumSessions”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.optical_num_tracks¶
 - 
Represents the D-Bus property “OpticalNumTracks”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.removable¶
 - 
Represents the D-Bus property “Removable”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.revision¶
 - 
Represents the D-Bus property “Revision”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.rotation_rate¶
 - 
Represents the D-Bus property “RotationRate”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.seat¶
 - 
Represents the D-Bus property “Seat”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.serial¶
 - 
Represents the D-Bus property “Serial”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.sibling_id¶
 - 
Represents the D-Bus property “SiblingId”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.size¶
 - 
Represents the D-Bus property “Size”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.sort_key¶
 - 
Represents the D-Bus property “SortKey”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.time_detected¶
 - 
Represents the D-Bus property “TimeDetected”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.time_media_detected¶
 - 
Represents the D-Bus property “TimeMediaDetected”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.vendor¶
 - 
Represents the D-Bus property “Vendor”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. 
- UDisks.Drive.props.wwn¶
 - 
Represents the D-Bus property “WWN”.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.