StoragedLinuxBlockObject

StoragedLinuxBlockObject — Object representing a block device on Linux.

Functions

Properties

StoragedDaemon * daemon Read / Write / Construct Only
StoragedLinuxDevice * device Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusObjectSkeleton
        ╰── StoragedObjectSkeleton
            ╰── StoragedLinuxBlockObject

Implemented Interfaces

StoragedLinuxBlockObject implements GDBusObject and StoragedObject.

Description

Object corresponding to a block device on Linux.

Functions

storaged_linux_block_object_new ()

StoragedLinuxBlockObject *
storaged_linux_block_object_new (StoragedDaemon *daemon,
                                 StoragedLinuxDevice *device);

Create a new block object.

Parameters

daemon

A StoragedDaemon.

 

device

The StoragedLinuxDevice for the device.

 

Returns

A StoragedLinuxBlockObject object. Free with g_object_unref().


storaged_linux_block_object_uevent ()

void
storaged_linux_block_object_uevent (StoragedLinuxBlockObject *object,
                                    const gchar *action,
                                    StoragedLinuxDevice *device);

Updates all information on interfaces on object .

Parameters

object

A StoragedLinuxBlockObject.

 

action

Uevent action or NULL

 

device

A new StoragedLinuxDevice device object or NULL if the device hasn't changed.

 

storaged_linux_block_object_get_daemon ()

StoragedDaemon *
storaged_linux_block_object_get_daemon
                               (StoragedLinuxBlockObject *object);

Gets the daemon used by object .

Parameters

Returns

A StoragedDaemon. Do not free, the object is owned by object .


storaged_linux_block_object_get_device ()

StoragedLinuxDevice *
storaged_linux_block_object_get_device
                               (StoragedLinuxBlockObject *object);

Gets the current StoragedLinuxDevice for object . Connect to “notify” to track changes to the “device” property.

Parameters

Returns

A StoragedLinuxDevice. Free with g_object_unref().


storaged_linux_block_object_trigger_uevent ()

void
storaged_linux_block_object_trigger_uevent
                               (StoragedLinuxBlockObject *object);

Triggers a 'change' uevent in the kernel.

The triggered event will bubble up from the kernel through the udev stack and will eventually be received by the storaged daemon process itself. This method does not wait for the event to be received.

Parameters


storaged_linux_block_object_reread_partition_table ()

void
storaged_linux_block_object_reread_partition_table
                               (StoragedLinuxBlockObject *object);

Requests the kernel to re-read the partition table for object .

The events from any change this may cause will bubble up from the kernel through the udev stack and will eventually be received by the storaged daemon process itself. This method does not wait for the event to be received.

Parameters

Types and Values

StoragedLinuxBlockObject

typedef struct _StoragedLinuxBlockObject StoragedLinuxBlockObject;

The StoragedLinuxBlockObject structure contains only private data and should only be accessed using the provided API.

Property Details

The “daemon” property

  “daemon”                   StoragedDaemon *

The StoragedDaemon the object is for.

Flags: Read / Write / Construct Only


The “device” property

  “device”                   StoragedLinuxDevice *

The StoragedLinuxDevice for the object. Connect to the “notify” signal to get notified whenever this is updated.

Flags: Read / Write / Construct Only