![]() |
![]() |
![]() |
UDisks Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
UDisksLinuxDriveObject; UDisksLinuxDriveObject * udisks_linux_drive_object_new (UDisksDaemon *daemon
,UDisksLinuxDevice *device
); void udisks_linux_drive_object_uevent (UDisksLinuxDriveObject *object
,const gchar *action
,UDisksLinuxDevice *device
); UDisksDaemon * udisks_linux_drive_object_get_daemon (UDisksLinuxDriveObject *object
); UDisksLinuxBlockObject * udisks_linux_drive_object_get_block (UDisksLinuxDriveObject *object
,gboolean get_hw
); UDisksLinuxDevice * udisks_linux_drive_object_get_device (UDisksLinuxDriveObject *object
,gboolean get_hw
); GList * udisks_linux_drive_object_get_devices (UDisksLinuxDriveObject *object
); GList * udisks_linux_drive_object_get_siblings (UDisksLinuxDriveObject *object
); gboolean udisks_linux_drive_object_housekeeping (UDisksLinuxDriveObject *object
,guint secs_since_last
,GCancellable *cancellable
,GError **error
); gboolean udisks_linux_drive_object_is_not_in_use (UDisksLinuxDriveObject *object
,GCancellable *cancellable
,GError **error
);
GObject +----GDBusObjectSkeleton +----UDisksObjectSkeleton +----UDisksLinuxDriveObject
"daemon" UDisksDaemon* : Read / Write / Construct Only "device" UDisksLinuxDevice* : Write / Construct Only
typedef struct _UDisksLinuxDriveObject UDisksLinuxDriveObject;
The UDisksLinuxDriveObject structure contains only private data and should only be accessed using the provided API.
UDisksLinuxDriveObject * udisks_linux_drive_object_new (UDisksDaemon *daemon
,UDisksLinuxDevice *device
);
Create a new drive object.
|
A UDisksDaemon. |
|
The UDisksLinuxDevice for the sysfs block device. |
Returns : |
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
.
|
A UDisksLinuxDriveObject. |
|
Uevent action or NULL
|
|
A UDisksLinuxDevice device object or NULL if the device hasn't changed. |
UDisksDaemon * udisks_linux_drive_object_get_daemon
(UDisksLinuxDriveObject *object
);
Gets the daemon used by object
.
|
A UDisksLinuxDriveObject. |
Returns : |
A UDisksDaemon. Do not free, the object is owned by object . |
UDisksLinuxBlockObject * udisks_linux_drive_object_get_block (UDisksLinuxDriveObject *object
,gboolean get_hw
);
Gets a UDisksLinuxBlockObject representing a block device associated with object
.
|
A UDisksLinuxDriveObject. |
|
If the drive is multipath, set to TRUE to get a path device instead of the multipath device. |
Returns : |
A UDisksLinuxBlockObject or NULL . The returned object
must be freed with g_object_unref() . |
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.
|
A UDisksLinuxDriveObject. |
|
If the drive is multipath, set to TRUE to get a path device instead of the multipath device. |
Returns : |
A UDisksLinuxDevice or NULL . The returned object must be freed
with g_object_unref() . |
GList * udisks_linux_drive_object_get_devices
(UDisksLinuxDriveObject *object
);
Gets the current UDisksLinuxDevice objects associated with object
.
|
A UDisksLinuxDriveObject. |
Returns : |
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 UDisksLinuxDriveObject. |
Returns : |
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.
|
A UDisksLinuxDriveObject. |
|
Number of seconds sincex the last housekeeping or 0 if the first housekeeping ever. |
|
A GCancellable or NULL . |
|
Return location for error or NULL . |
Returns : |
TRUE if the operation succeeded, FALSE if error is set. |
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.
|
A UDisksLinuxDriveObject. |
|
A GCancellable or NULL . [allow-none]
|
|
A GError or NULL . |
Returns : |
TRUE if object is not is use, FALSE if error is set. |
"daemon"
property"daemon" UDisksDaemon* : Read / Write / Construct Only
The UDisksDaemon the object is for.
"device"
property"device" UDisksLinuxDevice* : Write / Construct Only
The UDisksLinuxDevice for the object. Connect to the "notify" signal to get notified whenever this is updated.