StoragedLinuxMDRaidObject

StoragedLinuxMDRaidObject — Object representing a Linux Software RAID array

Functions

Properties

StoragedDaemon * daemon Read / Write / Construct Only
gchar * uuid Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusObjectSkeleton
        ╰── StoragedObjectSkeleton
            ╰── StoragedLinuxMDRaidObject

Implemented Interfaces

StoragedLinuxMDRaidObject implements GDBusObject and StoragedObject.

Description

Object corresponding to a Linux Software RAID array.

Functions

storaged_linux_mdraid_object_new ()

StoragedLinuxMDRaidObject *
storaged_linux_mdraid_object_new (StoragedDaemon *daemon,
                                  const gchar *uuid);

Create a new MDRaid object.

Parameters

daemon

A StoragedDaemon.

 

uuid

The UUID for the array.

 

Returns

A StoragedLinuxMDRaidObject object. Free with g_object_unref().


storaged_linux_mdraid_object_uevent ()

void
storaged_linux_mdraid_object_uevent (StoragedLinuxMDRaidObject *object,
                                     const gchar *action,
                                     StoragedLinuxDevice *device,
                                     gboolean is_member);

Updates all information on interfaces on mdraid .

Parameters

object

A StoragedLinuxMDRaidObject.

 

action

Uevent action or NULL

 

device

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

 

is_member

TRUE if device is a member, FALSE if it's the raid device.

 

storaged_linux_mdraid_object_have_devices ()

gboolean
storaged_linux_mdraid_object_have_devices
                               (StoragedLinuxMDRaidObject *object);

Checks if there are any devices associated with object at all. This includes both member devices and the raid device.

Parameters

Returns

TRUE if at least one device is associated with object , FALSE otherwise.


storaged_linux_mdraid_object_get_daemon ()

StoragedDaemon *
storaged_linux_mdraid_object_get_daemon
                               (StoragedLinuxMDRaidObject *object);

Gets the daemon used by object .

Parameters

Returns

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


storaged_linux_mdraid_object_get_device ()

StoragedLinuxDevice *
storaged_linux_mdraid_object_get_device
                               (StoragedLinuxMDRaidObject *object);

Gets the current StoragedLinuxDevice object for the RAID device (e.g. /dev/md0) associated with object , if any.

Parameters

Returns

A StoragedLinuxDevice or NULL. Free with g_object_unref().

[transfer full]


storaged_linux_mdraid_object_get_members ()

GList *
storaged_linux_mdraid_object_get_members
                               (StoragedLinuxMDRaidObject *object);

Gets the current StoragedLinuxDevice objects for the RAID members associated with object .

Parameters

Returns

A list of StoragedLinuxDevice objects. Free each element with g_object_unref(), then free the list with g_list_free().


storaged_linux_mdraid_object_get_uuid ()

const gchar *
storaged_linux_mdraid_object_get_uuid (StoragedLinuxMDRaidObject *object);

Gets the UUID for object .

Parameters

Returns

The UUID for object. Do not free, the string belongs to object .

[transfer none]

Types and Values

StoragedLinuxMDRaidObject

typedef struct _StoragedLinuxMDRaidObject StoragedLinuxMDRaidObject;

The StoragedLinuxMDRaidObject 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 “uuid” property

  “uuid”                     gchar *

The UUID for the array.

Flags: Write / Construct Only

Default value: NULL