StoragedLinuxMDRaidObject

StoragedLinuxMDRaidObject — Object representing a Linux Software RAID array

Synopsis

                    StoragedLinuxMDRaidObject;
StoragedLinuxMDRaidObject * storaged_linux_mdraid_object_new
                                                        (StoragedDaemon *daemon,
                                                         const gchar *uuid);
void                storaged_linux_mdraid_object_uevent (StoragedLinuxMDRaidObject *object,
                                                         const gchar *action,
                                                         StoragedLinuxDevice *device,
                                                         gboolean is_member);
gboolean            storaged_linux_mdraid_object_have_devices
                                                        (StoragedLinuxMDRaidObject *object);
StoragedDaemon *    storaged_linux_mdraid_object_get_daemon
                                                        (StoragedLinuxMDRaidObject *object);
StoragedLinuxDevice * storaged_linux_mdraid_object_get_device
                                                        (StoragedLinuxMDRaidObject *object);
GList *             storaged_linux_mdraid_object_get_members
                                                        (StoragedLinuxMDRaidObject *object);
const gchar *       storaged_linux_mdraid_object_get_uuid
                                                        (StoragedLinuxMDRaidObject *object);

Object Hierarchy

  GObject
   +----GDBusObjectSkeleton
         +----StoragedObjectSkeleton
               +----StoragedLinuxMDRaidObject

Implemented Interfaces

StoragedLinuxMDRaidObject implements GDBusObject and StoragedObject.

Properties

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

Description

Object corresponding to a Linux Software RAID array.

Details

StoragedLinuxMDRaidObject

typedef struct _StoragedLinuxMDRaidObject StoragedLinuxMDRaidObject;

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


storaged_linux_mdraid_object_new ()

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

Create a new MDRaid object.

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.

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.

object :

A StoragedLinuxMDRaidObject.

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.

object :

A StoragedLinuxMDRaidObject.

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.

object :

A StoragedLinuxMDRaidObject.

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.

object :

A StoragedLinuxMDRaidObject.

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.

object :

A StoragedLinuxMDRaidObject.

Returns :

The UUID for object. Do not free, the string belongs to object. [transfer none]

Property Details

The "daemon" property

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

The StoragedDaemon the object is for.


The "uuid" property

  "uuid"                     gchar*                : Write / Construct Only

The UUID for the array.

Default value: NULL