| Top |
| UDisksDaemon * | daemon | Read / Write / Construct Only |
| UDisksLinuxDevice * | device | Write / Construct Only |
GObject ╰── GDBusObjectSkeleton ╰── UDisksObjectSkeleton ╰── UDisksLinuxDriveObject
gboolean
(*UDisksObjectHasInterfaceFunc) (UDisksObject *object);
Function prototype that is used to determine whether the object
is applicable
for carrying a particular D-Bus interface (determined by the callback function itself).
Used typically over UDisksLinuxBlockObject and UDisksLinuxDriveObject objects for checking specific feature that leads to exporting extra D-Bus interface on the object.
void
(*UDisksObjectConnectInterfaceFunc) (UDisksObject *object);
Function prototype that is used once a new D-Bus interface is created (meaning
the UDisksObjectHasInterfaceFunc call was successful) to perform optional
additional tasks before the interface is exported on the object
.
Used typically over UDisksLinuxBlockObject and UDisksLinuxDriveObject objects.
gboolean (*UDisksObjectUpdateInterfaceFunc) (UDisksObject *object,const gchar *uevent_action,GDBusInterface *interface);
Function prototype that is used on existing interface
on the object
to process
incoming uevents.
Used typically over UDisksLinuxBlockObject and UDisksLinuxDriveObject objects.
object |
A UDisksObject. |
|
uevent_action |
An uevent action string. |
|
interface |
Existing GDBusInterface exported on the |
UDisksLinuxDriveObject * udisks_linux_drive_object_new (UDisksDaemon *daemon,UDisksLinuxDevice *device);
Create a new drive object.
A UDisksLinuxDriveObject object or NULL if device
does not represent a drive. Free with g_object_unref().
void udisks_linux_drive_object_uevent (UDisksLinuxDriveObject *object,const gchar *action,UDisksLinuxDevice *device);
Updates all information on interfaces on drive
.
object |
||
action |
Uevent action or |
|
device |
A UDisksLinuxDevice device object or |
UDisksDaemon *
udisks_linux_drive_object_get_daemon (UDisksLinuxDriveObject *object);
Gets the daemon used by object
.
UDisksLinuxBlockObject * udisks_linux_drive_object_get_block (UDisksLinuxDriveObject *object,gboolean get_hw);
Gets a UDisksLinuxBlockObject representing a block device associated with object
.
object |
||
get_hw |
If the drive is multipath, set to |
UDisksLinuxDevice * udisks_linux_drive_object_get_device (UDisksLinuxDriveObject *object,gboolean get_hw);
Gets one of the UDisksLinuxDevice object associated with object
.
If get_hw
is TRUE and object
represents a multipath device then
one of the paths is returned rather than the multipath device. This
is useful if you e.g. need to configure the physical hardware.
object |
||
get_hw |
If the drive is multipath, set to |
GList *
udisks_linux_drive_object_get_devices (UDisksLinuxDriveObject *object);
Gets the current UDisksLinuxDevice objects associated with object
.
A list of UDisksLinuxDevice objects. Free each element with
g_object_unref(), then free the list with g_list_free().
GList *
udisks_linux_drive_object_get_siblings
(UDisksLinuxDriveObject *object);
Gets the siblings for object
, if any.
A list of UDisksLinuxDriveObject
instances. The returned list should be freed with g_list_free() after each element has been
freed with g_object_unref().
[transfer full][element-type UDisksLinuxDriveObject]
gboolean udisks_linux_drive_object_housekeeping (UDisksLinuxDriveObject *object,guint secs_since_last,GCancellable *cancellable,GError **error);
Called periodically (every ten minutes or so) to perform housekeeping tasks such as refreshing ATA SMART data.
The function runs in a dedicated thread and is allowed to perform blocking I/O.
Long-running tasks should periodically check cancellable
to see if
they have been cancelled.
object |
||
secs_since_last |
Number of seconds sincex the last housekeeping or 0 if the first housekeeping ever. |
|
cancellable |
A |
|
error |
Return location for error or |
gboolean udisks_linux_drive_object_is_not_in_use (UDisksLinuxDriveObject *object,GCancellable *cancellable,GError **error);
Checks if the drive represented by object
is in use and sets
error
if so.
typedef struct _UDisksLinuxDriveObject UDisksLinuxDriveObject;
The UDisksLinuxDriveObject structure contains only private data and should only be accessed using the provided API.
“daemon” property“daemon” UDisksDaemon *
The UDisksDaemon the object is for.
Owner: UDisksLinuxDriveObject
Flags: Read / Write / Construct Only
“device” property“device” UDisksLinuxDevice *
The UDisksLinuxDevice for the object. Connect to the “notify” signal to get notified whenever this is updated.
Owner: UDisksLinuxDriveObject
Flags: Write / Construct Only