Top |
gboolean | can-power-off | Read / Write |
GVariant * | configuration | Read / Write |
gchar * | connection-bus | Read / Write |
gboolean | ejectable | Read / Write |
gchar * | id | Read / Write |
gchar * | media | Read / Write |
gboolean | media-available | Read / Write |
gboolean | media-change-detected | Read / Write |
GStrv | media-compatibility | Read / Write |
gboolean | media-removable | Read / Write |
gchar * | model | Read / Write |
gboolean | optical | Read / Write |
gboolean | optical-blank | Read / Write |
guint | optical-num-audio-tracks | Read / Write |
guint | optical-num-data-tracks | Read / Write |
guint | optical-num-sessions | Read / Write |
guint | optical-num-tracks | Read / Write |
gboolean | removable | Read / Write |
gchar * | revision | Read / Write |
gint | rotation-rate | Read / Write |
gchar * | seat | Read / Write |
gchar * | serial | Read / Write |
gchar * | sibling-id | Read / Write |
guint64 | size | Read / Write |
gchar * | sort-key | Read / Write |
guint64 | time-detected | Read / Write |
guint64 | time-media-detected | Read / Write |
gchar * | vendor | Read / Write |
gchar * | wwn | Read / Write |
gboolean | handle-eject | Run Last |
gboolean | handle-power-off | Run Last |
gboolean | handle-set-configuration | Run Last |
UDisksDrive | |
struct | UDisksDriveIface |
struct | UDisksDriveProxy |
struct | UDisksDriveProxyClass |
struct | UDisksDriveSkeleton |
struct | UDisksDriveSkeletonClass |
GInterface ╰── UDisksDrive GObject ├── GDBusInterfaceSkeleton │ ╰── UDisksDriveSkeleton │ ╰── UDisksLinuxDrive ╰── GDBusProxy ╰── UDisksDriveProxy
UDisksDriveProxy implements GDBusInterface, GInitable, GAsyncInitable and UDisksDrive.
UDisksDriveSkeleton implements GDBusInterface and UDisksDrive.
UDisksDrive is implemented by UDisksDriveProxy, UDisksDriveSkeleton and UDisksLinuxDrive.
This section contains code for working with the org.freedesktop.UDisks2.Drive D-Bus interface in C.
GDBusInterfaceInfo *
udisks_drive_interface_info (void
);
Gets a machine-readable description of the org.freedesktop.UDisks2.Drive D-Bus interface.
guint udisks_drive_override_properties (GObjectClass *klass
,guint property_id_begin
);
Overrides all GObject properties in the UDisksDrive interface for a concrete class. The properties are overridden in the order they are defined.
void udisks_drive_call_eject (UDisksDrive *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Eject()
D-Bus method on proxy
.
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 g_main_context_push_thread_default()
).
You can then call udisks_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.
gboolean udisks_drive_call_eject_finish (UDisksDrive *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with udisks_drive_call_eject()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean udisks_drive_call_eject_sync (UDisksDrive *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Eject()
D-Bus method on proxy
. The calling thread is blocked until a reply is received.
See udisks_drive_call_eject()
for the asynchronous version of this method.
void udisks_drive_complete_eject (UDisksDrive *object
,GDBusMethodInvocation *invocation
);
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.
void udisks_drive_call_set_configuration (UDisksDrive *proxy
,GVariant *arg_value
,GVariant *arg_options
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the SetConfiguration()
D-Bus method on proxy
.
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 g_main_context_push_thread_default()
).
You can then call udisks_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.
gboolean udisks_drive_call_set_configuration_finish (UDisksDrive *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with udisks_drive_call_set_configuration()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean udisks_drive_call_set_configuration_sync (UDisksDrive *proxy
,GVariant *arg_value
,GVariant *arg_options
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the SetConfiguration()
D-Bus method on proxy
. The calling thread is blocked until a reply is received.
See udisks_drive_call_set_configuration()
for the asynchronous version of this method.
void udisks_drive_complete_set_configuration (UDisksDrive *object
,GDBusMethodInvocation *invocation
);
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.
void udisks_drive_call_power_off (UDisksDrive *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the PowerOff()
D-Bus method on proxy
.
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 g_main_context_push_thread_default()
).
You can then call udisks_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.
proxy |
||
arg_options |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
Since: 2.0.0
gboolean udisks_drive_call_power_off_finish (UDisksDrive *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with udisks_drive_call_power_off()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
Since: 2.0.0
gboolean udisks_drive_call_power_off_sync (UDisksDrive *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the PowerOff()
D-Bus method on proxy
. The calling thread is blocked until a reply is received.
See udisks_drive_call_power_off()
for the asynchronous version of this method.
proxy |
||
arg_options |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
Since: 2.0.0
void udisks_drive_complete_power_off (UDisksDrive *object
,GDBusMethodInvocation *invocation
);
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.
Since: 2.0.0
const gchar *
udisks_drive_get_connection_bus (UDisksDrive *object
);
Gets the value of the "ConnectionBus" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_connection_bus()
if on another thread.
[skip]
gboolean
udisks_drive_get_removable (UDisksDrive *object
);
Gets the value of the "Removable" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gboolean
udisks_drive_get_ejectable (UDisksDrive *object
);
Gets the value of the "Ejectable" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
const gchar *
udisks_drive_get_seat (UDisksDrive *object
);
Gets the value of the "Seat" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_seat()
if on another thread.
[skip]
const gchar *
udisks_drive_get_media (UDisksDrive *object
);
Gets the value of the "Media" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_media()
if on another thread.
[skip]
const gchar *const *
udisks_drive_get_media_compatibility (UDisksDrive *object
);
Gets the value of the "MediaCompatibility" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_media_compatibility()
if on another thread.
[skip]
gboolean
udisks_drive_get_media_removable (UDisksDrive *object
);
Gets the value of the "MediaRemovable" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gboolean
udisks_drive_get_media_available (UDisksDrive *object
);
Gets the value of the "MediaAvailable" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gboolean
udisks_drive_get_media_change_detected
(UDisksDrive *object
);
Gets the value of the "MediaChangeDetected" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint64
udisks_drive_get_time_detected (UDisksDrive *object
);
Gets the value of the "TimeDetected" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint64
udisks_drive_get_time_media_detected (UDisksDrive *object
);
Gets the value of the "TimeMediaDetected" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint64
udisks_drive_get_size (UDisksDrive *object
);
Gets the value of the "Size" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gboolean
udisks_drive_get_optical (UDisksDrive *object
);
Gets the value of the "Optical" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gboolean
udisks_drive_get_optical_blank (UDisksDrive *object
);
Gets the value of the "OpticalBlank" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint
udisks_drive_get_optical_num_tracks (UDisksDrive *object
);
Gets the value of the "OpticalNumTracks" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint
udisks_drive_get_optical_num_audio_tracks
(UDisksDrive *object
);
Gets the value of the "OpticalNumAudioTracks" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint
udisks_drive_get_optical_num_data_tracks
(UDisksDrive *object
);
Gets the value of the "OpticalNumDataTracks" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint
udisks_drive_get_optical_num_sessions (UDisksDrive *object
);
Gets the value of the "OpticalNumSessions" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
const gchar *
udisks_drive_get_model (UDisksDrive *object
);
Gets the value of the "Model" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_model()
if on another thread.
[skip]
const gchar *
udisks_drive_get_revision (UDisksDrive *object
);
Gets the value of the "Revision" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_revision()
if on another thread.
[skip]
gint
udisks_drive_get_rotation_rate (UDisksDrive *object
);
Gets the value of the "RotationRate" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
const gchar *
udisks_drive_get_serial (UDisksDrive *object
);
Gets the value of the "Serial" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_serial()
if on another thread.
[skip]
const gchar *
udisks_drive_get_vendor (UDisksDrive *object
);
Gets the value of the "Vendor" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_vendor()
if on another thread.
[skip]
const gchar *
udisks_drive_get_wwn (UDisksDrive *object
);
Gets the value of the "WWN" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_wwn()
if on another thread.
[skip]
const gchar *
udisks_drive_get_sort_key (UDisksDrive *object
);
Gets the value of the "SortKey" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_sort_key()
if on another thread.
[skip]
GVariant *
udisks_drive_get_configuration (UDisksDrive *object
);
Gets the value of the "Configuration" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_configuration()
if on another thread.
[skip]
const gchar *
udisks_drive_get_id (UDisksDrive *object
);
Gets the value of the "Id" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_id()
if on another thread.
[skip]
gboolean
udisks_drive_get_can_power_off (UDisksDrive *object
);
Gets the value of the "CanPowerOff" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
Since: 2.0.0
const gchar *
udisks_drive_get_sibling_id (UDisksDrive *object
);
Gets the value of the "SiblingId" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object
was constructed. Use udisks_drive_dup_sibling_id()
if on another thread.
[skip]
The property value or NULL
if the property is not set. Do not free the returned value, it belongs to object
.
[transfer none][nullable]
Since: 2.0.0
gchar *
udisks_drive_dup_connection_bus (UDisksDrive *object
);
Gets a copy of the "ConnectionBus" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_seat (UDisksDrive *object
);
Gets a copy of the "Seat" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_media (UDisksDrive *object
);
Gets a copy of the "Media" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar **
udisks_drive_dup_media_compatibility (UDisksDrive *object
);
Gets a copy of the "MediaCompatibility" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_model (UDisksDrive *object
);
Gets a copy of the "Model" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_revision (UDisksDrive *object
);
Gets a copy of the "Revision" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_serial (UDisksDrive *object
);
Gets a copy of the "Serial" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_vendor (UDisksDrive *object
);
Gets a copy of the "Vendor" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_wwn (UDisksDrive *object
);
Gets a copy of the "WWN" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_sort_key (UDisksDrive *object
);
Gets a copy of the "SortKey" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
GVariant *
udisks_drive_dup_configuration (UDisksDrive *object
);
Gets a copy of the "Configuration" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_id (UDisksDrive *object
);
Gets a copy of the "Id" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
udisks_drive_dup_sibling_id (UDisksDrive *object
);
Gets a copy of the "SiblingId" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
The property value or NULL
if the property is not set. The returned value should be freed with g_free()
.
[transfer full][nullable]
Since: 2.0.0
void udisks_drive_set_connection_bus (UDisksDrive *object
,const gchar *value
);
Sets the "ConnectionBus" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_removable (UDisksDrive *object
,gboolean value
);
Sets the "Removable" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_ejectable (UDisksDrive *object
,gboolean value
);
Sets the "Ejectable" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_seat (UDisksDrive *object
,const gchar *value
);
Sets the "Seat" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_media (UDisksDrive *object
,const gchar *value
);
Sets the "Media" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_media_compatibility (UDisksDrive *object
,const gchar *const *value
);
Sets the "MediaCompatibility" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_media_removable (UDisksDrive *object
,gboolean value
);
Sets the "MediaRemovable" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_media_available (UDisksDrive *object
,gboolean value
);
Sets the "MediaAvailable" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_media_change_detected (UDisksDrive *object
,gboolean value
);
Sets the "MediaChangeDetected" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_time_detected (UDisksDrive *object
,guint64 value
);
Sets the "TimeDetected" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_time_media_detected (UDisksDrive *object
,guint64 value
);
Sets the "TimeMediaDetected" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_size (UDisksDrive *object
,guint64 value
);
Sets the "Size" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical (UDisksDrive *object
,gboolean value
);
Sets the "Optical" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical_blank (UDisksDrive *object
,gboolean value
);
Sets the "OpticalBlank" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical_num_tracks (UDisksDrive *object
,guint value
);
Sets the "OpticalNumTracks" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical_num_audio_tracks (UDisksDrive *object
,guint value
);
Sets the "OpticalNumAudioTracks" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical_num_data_tracks (UDisksDrive *object
,guint value
);
Sets the "OpticalNumDataTracks" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_optical_num_sessions (UDisksDrive *object
,guint value
);
Sets the "OpticalNumSessions" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_model (UDisksDrive *object
,const gchar *value
);
Sets the "Model" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_revision (UDisksDrive *object
,const gchar *value
);
Sets the "Revision" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_rotation_rate (UDisksDrive *object
,gint value
);
Sets the "RotationRate" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_serial (UDisksDrive *object
,const gchar *value
);
Sets the "Serial" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_vendor (UDisksDrive *object
,const gchar *value
);
Sets the "Vendor" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_wwn (UDisksDrive *object
,const gchar *value
);
Sets the "WWN" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_sort_key (UDisksDrive *object
,const gchar *value
);
Sets the "SortKey" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_configuration (UDisksDrive *object
,GVariant *value
);
Sets the "Configuration" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_id (UDisksDrive *object
,const gchar *value
);
Sets the "Id" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void udisks_drive_set_can_power_off (UDisksDrive *object
,gboolean value
);
Sets the "CanPowerOff" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
Since: 2.0.0
void udisks_drive_set_sibling_id (UDisksDrive *object
,const gchar *value
);
Sets the "SiblingId" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
Since: 2.0.0
void udisks_drive_proxy_new (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a proxy for the D-Bus interface org.freedesktop.UDisks2.Drive. See g_dbus_proxy_new()
for more details.
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 g_main_context_push_thread_default()
).
You can then call udisks_drive_proxy_new_finish()
to get the result of the operation.
See udisks_drive_proxy_new_sync()
for the synchronous, blocking version of this constructor.
connection |
A GDBusConnection. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[nullable] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
UDisksDrive * udisks_drive_proxy_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with udisks_drive_proxy_new()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
UDisksDrive * udisks_drive_proxy_new_sync (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Synchronously creates a proxy for the D-Bus interface org.freedesktop.UDisks2.Drive. See g_dbus_proxy_new_sync()
for more details.
The calling thread is blocked until a reply is received.
See udisks_drive_proxy_new()
for the asynchronous version of this constructor.
connection |
A GDBusConnection. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[nullable] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
void udisks_drive_proxy_new_for_bus (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Like udisks_drive_proxy_new()
but takes a GBusType instead of a GDBusConnection.
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 g_main_context_push_thread_default()
).
You can then call udisks_drive_proxy_new_for_bus_finish()
to get the result of the operation.
See udisks_drive_proxy_new_for_bus_sync()
for the synchronous, blocking version of this constructor.
bus_type |
A GBusType. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique). |
|
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
UDisksDrive * udisks_drive_proxy_new_for_bus_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with udisks_drive_proxy_new_for_bus()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
UDisksDrive * udisks_drive_proxy_new_for_bus_sync (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Like udisks_drive_proxy_new_sync()
but takes a GBusType instead of a GDBusConnection.
The calling thread is blocked until a reply is received.
See udisks_drive_proxy_new_for_bus()
for the asynchronous version of this constructor.
UDisksDrive *
udisks_drive_skeleton_new (void
);
Creates a skeleton object for the D-Bus interface org.freedesktop.UDisks2.Drive.
typedef struct _UDisksDrive UDisksDrive;
Abstract interface type for the D-Bus interface org.freedesktop.UDisks2.Drive.
struct UDisksDriveIface { GTypeInterface parent_iface; gboolean (*handle_eject) ( UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_options); gboolean (*handle_set_configuration) ( UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_value, GVariant *arg_options); GVariant * (*get_configuration) (UDisksDrive *object); const gchar * (*get_connection_bus) (UDisksDrive *object); gboolean (*get_ejectable) (UDisksDrive *object); const gchar * (*get_id) (UDisksDrive *object); const gchar * (*get_media) (UDisksDrive *object); gboolean (*get_media_available) (UDisksDrive *object); gboolean (*get_media_change_detected) (UDisksDrive *object); const gchar *const * (*get_media_compatibility) (UDisksDrive *object); gboolean (*get_media_removable) (UDisksDrive *object); const gchar * (*get_model) (UDisksDrive *object); gboolean (*get_optical) (UDisksDrive *object); gboolean (*get_optical_blank) (UDisksDrive *object); guint (*get_optical_num_audio_tracks) (UDisksDrive *object); guint (*get_optical_num_data_tracks) (UDisksDrive *object); guint (*get_optical_num_sessions) (UDisksDrive *object); guint (*get_optical_num_tracks) (UDisksDrive *object); gboolean (*get_removable) (UDisksDrive *object); const gchar * (*get_revision) (UDisksDrive *object); gint (*get_rotation_rate) (UDisksDrive *object); const gchar * (*get_seat) (UDisksDrive *object); const gchar * (*get_serial) (UDisksDrive *object); guint64 (*get_size) (UDisksDrive *object); const gchar * (*get_sort_key) (UDisksDrive *object); guint64 (*get_time_detected) (UDisksDrive *object); guint64 (*get_time_media_detected) (UDisksDrive *object); const gchar * (*get_vendor) (UDisksDrive *object); const gchar * (*get_wwn) (UDisksDrive *object); gboolean (*handle_power_off) ( UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_options); gboolean (*get_can_power_off) (UDisksDrive *object); const gchar * (*get_sibling_id) (UDisksDrive *object); };
Virtual table for the D-Bus interface org.freedesktop.UDisks2.Drive.
The parent interface. |
||
Handler for the “handle-eject” signal. |
||
Handler for the “handle-set-configuration” signal. |
||
Getter for the “configuration” property. |
||
Getter for the “connection-bus” property. |
||
Getter for the “ejectable” property. |
||
Getter for the “id” property. |
||
Getter for the “media” property. |
||
Getter for the “media-available” property. |
||
Getter for the “media-change-detected” property. |
||
Getter for the “media-compatibility” property. |
||
Getter for the “media-removable” property. |
||
Getter for the “model” property. |
||
Getter for the “optical” property. |
||
Getter for the “optical-blank” property. |
||
Getter for the “optical-num-audio-tracks” property. |
||
Getter for the “optical-num-data-tracks” property. |
||
Getter for the “optical-num-sessions” property. |
||
Getter for the “optical-num-tracks” property. |
||
Getter for the “removable” property. |
||
Getter for the “revision” property. |
||
Getter for the “rotation-rate” property. |
||
Getter for the “seat” property. |
||
Getter for the “serial” property. |
||
Getter for the “size” property. |
||
Getter for the “sort-key” property. |
||
Getter for the “time-detected” property. |
||
Getter for the “time-media-detected” property. |
||
Getter for the “vendor” property. |
||
Getter for the “wwn” property. |
||
Handler for the “handle-power-off” signal. |
||
Getter for the “can-power-off” property. |
||
Getter for the “sibling-id” property. |
struct UDisksDriveProxy;
The UDisksDriveProxy structure contains only private data and should only be accessed using the provided API.
struct UDisksDriveProxyClass { GDBusProxyClass parent_class; };
Class structure for UDisksDriveProxy.
struct UDisksDriveSkeleton;
The UDisksDriveSkeleton structure contains only private data and should only be accessed using the provided API.
struct UDisksDriveSkeletonClass { GDBusInterfaceSkeletonClass parent_class; };
Class structure for UDisksDriveSkeleton.
“can-power-off”
property “can-power-off” gboolean
Represents the D-Bus property "CanPowerOff".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
Since: 2.0.0
“configuration”
property “configuration” GVariant *
Represents the D-Bus property "Configuration".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Allowed values: GVariant<a{sv}>
Default value: NULL
“connection-bus”
property “connection-bus” gchar *
Represents the D-Bus property "ConnectionBus".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“ejectable”
property “ejectable” gboolean
Represents the D-Bus property "Ejectable".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“id”
property “id” gchar *
Represents the D-Bus property "Id".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“media”
property “media” gchar *
Represents the D-Bus property "Media".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“media-available”
property “media-available” gboolean
Represents the D-Bus property "MediaAvailable".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“media-change-detected”
property “media-change-detected” gboolean
Represents the D-Bus property "MediaChangeDetected".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“media-compatibility”
property “media-compatibility” GStrv
Represents the D-Bus property "MediaCompatibility".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
“media-removable”
property “media-removable” gboolean
Represents the D-Bus property "MediaRemovable".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“model”
property “model” gchar *
Represents the D-Bus property "Model".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“optical”
property “optical” gboolean
Represents the D-Bus property "Optical".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“optical-blank”
property “optical-blank” gboolean
Represents the D-Bus property "OpticalBlank".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“optical-num-audio-tracks”
property “optical-num-audio-tracks” guint
Represents the D-Bus property "OpticalNumAudioTracks".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“optical-num-data-tracks”
property “optical-num-data-tracks” guint
Represents the D-Bus property "OpticalNumDataTracks".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“optical-num-sessions”
property “optical-num-sessions” guint
Represents the D-Bus property "OpticalNumSessions".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“optical-num-tracks”
property “optical-num-tracks” guint
Represents the D-Bus property "OpticalNumTracks".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“removable”
property “removable” gboolean
Represents the D-Bus property "Removable".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: FALSE
“revision”
property “revision” gchar *
Represents the D-Bus property "Revision".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“rotation-rate”
property “rotation-rate” gint
Represents the D-Bus property "RotationRate".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“seat”
property “seat” gchar *
Represents the D-Bus property "Seat".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“serial”
property “serial” gchar *
Represents the D-Bus property "Serial".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“sibling-id”
property “sibling-id” gchar *
Represents the D-Bus property "SiblingId".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
Since: 2.0.0
“size”
property “size” guint64
Represents the D-Bus property "Size".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“sort-key”
property “sort-key” gchar *
Represents the D-Bus property "SortKey".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“time-detected”
property “time-detected” guint64
Represents the D-Bus property "TimeDetected".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“time-media-detected”
property “time-media-detected” guint64
Represents the D-Bus property "TimeMediaDetected".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: 0
“vendor”
property “vendor” gchar *
Represents the D-Bus property "Vendor".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“wwn”
property “wwn” gchar *
Represents the D-Bus property "WWN".
Since the D-Bus property for this GObject property 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.
Owner: UDisksDrive
Flags: Read / Write
Default value: NULL
“handle-eject”
signalgboolean user_function (UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_options, gpointer user_data)
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 call udisks_drive_complete_eject()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
object |
A UDisksDrive. |
|
invocation |
A GDBusMethodInvocation. |
|
arg_options |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“handle-power-off”
signalgboolean user_function (UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_options, gpointer user_data)
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 call udisks_drive_complete_power_off()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
object |
A UDisksDrive. |
|
invocation |
A GDBusMethodInvocation. |
|
arg_options |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.0.0
“handle-set-configuration”
signalgboolean user_function (UDisksDrive *object, GDBusMethodInvocation *invocation, GVariant *arg_value, GVariant *arg_options, gpointer user_data)
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 call udisks_drive_complete_set_configuration()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
object |
A UDisksDrive. |
|
invocation |
A GDBusMethodInvocation. |
|
arg_value |
Argument passed by remote caller. |
|
arg_options |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last