StoragedLinuxBlockObject

StoragedLinuxBlockObject — Object representing a block device on Linux.

Synopsis

                    StoragedLinuxBlockObject;
StoragedLinuxBlockObject * storaged_linux_block_object_new
                                                        (StoragedDaemon *daemon,
                                                         StoragedLinuxDevice *device);
void                storaged_linux_block_object_uevent  (StoragedLinuxBlockObject *object,
                                                         const gchar *action,
                                                         StoragedLinuxDevice *device);
StoragedDaemon *    storaged_linux_block_object_get_daemon
                                                        (StoragedLinuxBlockObject *object);
StoragedLinuxDevice * storaged_linux_block_object_get_device
                                                        (StoragedLinuxBlockObject *object);
void                storaged_linux_block_object_trigger_uevent
                                                        (StoragedLinuxBlockObject *object);
void                storaged_linux_block_object_reread_partition_table
                                                        (StoragedLinuxBlockObject *object);

Object Hierarchy

  GObject
   +----GDBusObjectSkeleton
         +----StoragedObjectSkeleton
               +----StoragedLinuxBlockObject

Implemented Interfaces

StoragedLinuxBlockObject implements GDBusObject and StoragedObject.

Properties

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

Description

Object corresponding to a block device on Linux.

Details

StoragedLinuxBlockObject

typedef struct _StoragedLinuxBlockObject StoragedLinuxBlockObject;

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


storaged_linux_block_object_new ()

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

Create a new block object.

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.

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.

object :

A StoragedLinuxBlockObject.

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.

object :

A StoragedLinuxBlockObject.

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.


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.

Property Details

The "daemon" property

  "daemon"                   StoragedDaemon*       : Read / Write / Construct Only

The StoragedDaemon the object is for.


The "device" property

  "device"                   StoragedLinuxDevice*  : Read / Write / Construct Only

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