[gnome-disk-utility/udisks2-port] Catch up with latest gdbus-codegen(1) changes
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Catch up with latest gdbus-codegen(1) changes
- Date: Mon, 23 May 2011 22:00:17 +0000 (UTC)
commit 20dcbd70eff7ee6d9580220a3ce0af3aec410c5b
Author: David Zeuthen <davidz redhat com>
Date: Mon May 23 18:00:17 2011 -0400
Catch up with latest gdbus-codegen(1) changes
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gdudevicetreemodel.c | 88 +++++++++---------
src/palimpsest/gduiscsipathmodel.c | 18 ++--
src/palimpsest/gduiscsipathmodel.h | 4 +-
src/palimpsest/gduvolumegrid.c | 92 +++++++++---------
src/palimpsest/gduvolumegrid.h | 8 +-
src/palimpsest/gduwindow.c | 174 +++++++++++++++++-----------------
6 files changed, 192 insertions(+), 192 deletions(-)
---
diff --git a/src/palimpsest/gdudevicetreemodel.c b/src/palimpsest/gdudevicetreemodel.c
index f7147d9..006430c 100644
--- a/src/palimpsest/gdudevicetreemodel.c
+++ b/src/palimpsest/gdudevicetreemodel.c
@@ -164,7 +164,7 @@ gdu_device_tree_model_set_property (GObject *object,
typedef struct
{
- GDBusObject *object;
+ UDisksObject *object;
const gchar *object_path;
GtkTreeIter iter;
gboolean found;
@@ -177,7 +177,7 @@ find_iter_for_object_cb (GtkTreeModel *model,
gpointer user_data)
{
FindIterData *data = user_data;
- GDBusObject *iter_object;
+ UDisksObject *iter_object;
iter_object = NULL;
@@ -195,7 +195,7 @@ find_iter_for_object_cb (GtkTreeModel *model,
goto out;
}
- if (g_strcmp0 (g_dbus_object_get_object_path (iter_object), data->object_path) == 0)
+ if (g_strcmp0 (g_dbus_object_get_object_path (G_DBUS_OBJECT (iter_object)), data->object_path) == 0)
{
data->iter = *iter;
data->found = TRUE;
@@ -211,7 +211,7 @@ find_iter_for_object_cb (GtkTreeModel *model,
static gboolean
find_iter_for_object (GduDeviceTreeModel *model,
- GDBusObject *object,
+ UDisksObject *object,
GtkTreeIter *out_iter)
{
FindIterData data;
@@ -459,7 +459,7 @@ nuke_lun_header (GduDeviceTreeModel *model)
static void
add_lun (GduDeviceTreeModel *model,
- GDBusObject *object,
+ UDisksObject *object,
GtkTreeIter *parent)
{
UDisksLun *lun;
@@ -472,7 +472,7 @@ add_lun (GduDeviceTreeModel *model,
gchar *sort_key;
GtkTreeIter iter;
- lun = UDISKS_PEEK_LUN (object);
+ lun = udisks_object_peek_lun (object);
udisks_util_get_lun_info (lun, &name, &description, &drive_icon, &media_description, &media_icon);
s = g_strdup_printf ("%s\n"
"<small><span foreground=\"#555555\">%s</span></small>",
@@ -487,7 +487,7 @@ add_lun (GduDeviceTreeModel *model,
// g_icon_to_string (drive_icon),
// g_icon_to_string (media_icon));
- sort_key = g_strdup (g_dbus_object_get_object_path (object)); /* for now */
+ sort_key = g_strdup (g_dbus_object_get_object_path (G_DBUS_OBJECT (object))); /* for now */
gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
&iter,
parent,
@@ -509,7 +509,7 @@ add_lun (GduDeviceTreeModel *model,
static void
remove_lun (GduDeviceTreeModel *model,
- GDBusObject *object)
+ UDisksObject *object)
{
GtkTreeIter iter;
@@ -518,7 +518,7 @@ remove_lun (GduDeviceTreeModel *model,
&iter))
{
g_warning ("Error finding iter for object at %s",
- g_dbus_object_get_object_path (object));
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
goto out;
}
@@ -529,15 +529,15 @@ remove_lun (GduDeviceTreeModel *model,
}
static gboolean
-should_include_lun (GDBusObject *object,
- gboolean allow_iscsi)
+should_include_lun (UDisksObject *object,
+ gboolean allow_iscsi)
{
UDisksLun *lun;
gboolean ret;
ret = FALSE;
- lun = UDISKS_PEEK_LUN (object);
+ lun = udisks_object_peek_lun (object);
/* unless specificlly allowed, don't show LUNs paired with an iSCSI target */
if (!allow_iscsi && g_strcmp0 (udisks_lun_get_iscsi_target (lun), "/") != 0)
@@ -565,10 +565,10 @@ update_luns (GduDeviceTreeModel *model)
luns = NULL;
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksLun *lun;
- lun = UDISKS_PEEK_LUN (object);
+ lun = udisks_object_peek_lun (object);
if (lun == NULL)
continue;
@@ -586,7 +586,7 @@ update_luns (GduDeviceTreeModel *model)
for (l = removed_luns; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
g_assert (g_list_find (model->current_luns, object) != NULL);
model->current_luns = g_list_remove (model->current_luns, object);
remove_lun (model, object);
@@ -594,7 +594,7 @@ update_luns (GduDeviceTreeModel *model)
}
for (l = added_luns; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
model->current_luns = g_list_prepend (model->current_luns, g_object_ref (object));
add_lun (model, object, get_lun_header_iter (model));
}
@@ -651,7 +651,7 @@ nuke_block_header (GduDeviceTreeModel *model)
static void
add_block (GduDeviceTreeModel *model,
- GDBusObject *object,
+ UDisksObject *object,
GtkTreeIter *parent)
{
UDisksBlockDevice *block;
@@ -664,7 +664,7 @@ add_block (GduDeviceTreeModel *model,
guint64 size;
gchar *size_str;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
size = udisks_block_device_get_size (block);
size_str = udisks_util_get_size_for_display (size, FALSE, FALSE);
@@ -704,7 +704,7 @@ add_block (GduDeviceTreeModel *model,
preferred_device);
}
- sort_key = g_strdup (g_dbus_object_get_object_path (object)); /* for now */
+ sort_key = g_strdup (g_dbus_object_get_object_path (G_DBUS_OBJECT (object))); /* for now */
gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
&iter,
parent,
@@ -722,7 +722,7 @@ add_block (GduDeviceTreeModel *model,
static void
remove_block (GduDeviceTreeModel *model,
- GDBusObject *object)
+ UDisksObject *object)
{
GtkTreeIter iter;
@@ -731,7 +731,7 @@ remove_block (GduDeviceTreeModel *model,
&iter))
{
g_warning ("Error finding iter for object at %s",
- g_dbus_object_get_object_path (object));
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
goto out;
}
@@ -742,7 +742,7 @@ remove_block (GduDeviceTreeModel *model,
}
static gboolean
-should_include_block (GDBusObject *object)
+should_include_block (UDisksObject *object)
{
UDisksBlockDevice *block;
gboolean ret;
@@ -753,7 +753,7 @@ should_include_block (GDBusObject *object)
ret = FALSE;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
/* RAM devices are useless */
device = udisks_block_device_get_device (block);
@@ -801,10 +801,10 @@ update_blocks (GduDeviceTreeModel *model)
blocks = NULL;
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block == NULL)
continue;
@@ -822,7 +822,7 @@ update_blocks (GduDeviceTreeModel *model)
for (l = removed_blocks; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
g_assert (g_list_find (model->current_blocks, object) != NULL);
@@ -832,7 +832,7 @@ update_blocks (GduDeviceTreeModel *model)
}
for (l = added_blocks; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
model->current_blocks = g_list_prepend (model->current_blocks, g_object_ref (object));
add_block (model, object, get_block_header_iter (model));
}
@@ -889,7 +889,7 @@ nuke_iscsi_targets_header (GduDeviceTreeModel *model)
static void
add_iscsi_target (GduDeviceTreeModel *model,
- GDBusObject *object,
+ UDisksObject *object,
GtkTreeIter *parent)
{
UDisksIScsiTarget *target;
@@ -898,7 +898,7 @@ add_iscsi_target (GduDeviceTreeModel *model,
gchar *sort_key;
GtkTreeIter iter;
- target = UDISKS_PEEK_ISCSI_TARGET (object);
+ target = udisks_object_peek_iscsi_target (object);
#if 0
GIcon *base_icon;
@@ -919,7 +919,7 @@ add_iscsi_target (GduDeviceTreeModel *model,
"Remote iSCSI Target", /* TODO: alias */
udisks_iscsi_target_get_name (target));
- sort_key = g_strdup (g_dbus_object_get_object_path (object)); /* for now */
+ sort_key = g_strdup (g_dbus_object_get_object_path (G_DBUS_OBJECT (object))); /* for now */
gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
&iter,
parent,
@@ -936,7 +936,7 @@ add_iscsi_target (GduDeviceTreeModel *model,
static void
remove_iscsi_target (GduDeviceTreeModel *model,
- GDBusObject *object)
+ UDisksObject *object)
{
GtkTreeIter iter;
@@ -945,7 +945,7 @@ remove_iscsi_target (GduDeviceTreeModel *model,
&iter))
{
g_warning ("Error finding iter for object at %s",
- g_dbus_object_get_object_path (object));
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
goto out;
}
@@ -956,7 +956,7 @@ remove_iscsi_target (GduDeviceTreeModel *model,
}
static gboolean
-should_include_iscsi_target (GDBusObject *object)
+should_include_iscsi_target (UDisksObject *object)
{
/* for now, just include all of them */
return TRUE;
@@ -978,10 +978,10 @@ update_iscsi_targets (GduDeviceTreeModel *model)
iscsi_targets_and_luns = NULL;
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksIScsiTarget *target;
- target = UDISKS_PEEK_ISCSI_TARGET (object);
+ target = udisks_object_peek_iscsi_target (object);
if (target == NULL)
continue;
@@ -993,12 +993,12 @@ update_iscsi_targets (GduDeviceTreeModel *model)
iscsi_targets_and_luns = g_list_prepend (iscsi_targets_and_luns, g_object_ref (object));
/* also include the LUNs that are associated with this target */
- target_object_path = g_dbus_object_get_object_path (object);
+ target_object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (object));
for (ll = objects; ll != NULL; ll = ll->next)
{
- GDBusObject *lun_object = G_DBUS_OBJECT (ll->data);
+ UDisksObject *lun_object = UDISKS_OBJECT (ll->data);
UDisksLun *lun;
- lun = UDISKS_PEEK_LUN (lun_object);
+ lun = udisks_object_peek_lun (lun_object);
if (lun != NULL)
{
if (g_strcmp0 (udisks_lun_get_iscsi_target (lun), target_object_path) == 0)
@@ -1021,7 +1021,7 @@ update_iscsi_targets (GduDeviceTreeModel *model)
for (l = removed; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
g_assert (g_list_find (model->current_iscsi_targets_and_luns, object) != NULL);
@@ -1033,8 +1033,8 @@ update_iscsi_targets (GduDeviceTreeModel *model)
/* Two passes: first add the iSCSI targets ... */
for (l = added; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
- if (UDISKS_PEEK_ISCSI_TARGET (object) != NULL)
+ UDisksObject *object = UDISKS_OBJECT (l->data);
+ if (udisks_object_peek_iscsi_target (object) != NULL)
{
model->current_iscsi_targets_and_luns = g_list_prepend (model->current_iscsi_targets_and_luns,
g_object_ref (object));
@@ -1044,14 +1044,14 @@ update_iscsi_targets (GduDeviceTreeModel *model)
/* ... and then the LUNs */
for (l = added; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
- if (UDISKS_PEEK_LUN (object) != NULL)
+ UDisksObject *object = UDISKS_OBJECT (l->data);
+ if (udisks_object_peek_lun (object) != NULL)
{
GtkTreeIter iter;
model->current_iscsi_targets_and_luns = g_list_prepend (model->current_iscsi_targets_and_luns,
g_object_ref (object));
g_warn_if_fail (find_iter_for_object_path (model,
- udisks_lun_get_iscsi_target (UDISKS_PEEK_LUN (object)),
+ udisks_lun_get_iscsi_target (udisks_object_peek_lun (object)),
&iter));
add_lun (model, object, &iter);
}
diff --git a/src/palimpsest/gduiscsipathmodel.c b/src/palimpsest/gduiscsipathmodel.c
index 9b554e6..4f9cf16 100644
--- a/src/palimpsest/gduiscsipathmodel.c
+++ b/src/palimpsest/gduiscsipathmodel.c
@@ -33,7 +33,7 @@ struct _GduIScsiPathModel
UDisksClient *client;
UDisksIScsiTarget *iscsi_target;
- GDBusObject *object;
+ UDisksObject *object;
};
typedef struct
@@ -131,7 +131,7 @@ gdu_iscsi_path_model_constructed (GObject *object)
GType types[GDU_ISCSI_PATH_MODEL_N_COLUMNS];
/* GDBusObjectManager *object_manager; */
- model->iscsi_target = UDISKS_GET_ISCSI_TARGET (model->object);
+ model->iscsi_target = udisks_object_get_iscsi_target (model->object);
g_assert (model->iscsi_target != NULL);
types[0] = G_TYPE_BOOLEAN;
@@ -185,14 +185,14 @@ gdu_iscsi_path_model_class_init (GduIScsiPathModelClass *klass)
/**
* GduIScsiPathModel:object:
*
- * The #GDBusObject that is a iSCSI target.
+ * The #UDisksObject that is a iSCSI target.
*/
g_object_class_install_property (gobject_class,
PROP_OBJECT,
g_param_spec_object ("object",
"Object",
"The iSCSI target",
- G_TYPE_DBUS_OBJECT,
+ UDISKS_TYPE_OBJECT,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
@@ -202,7 +202,7 @@ gdu_iscsi_path_model_class_init (GduIScsiPathModelClass *klass)
/**
* gdu_iscsi_path_model_new:
* @client: A #UDisksClient.
- * @object: A #GDBusObject.
+ * @object: A #UDisksObject.
*
* Creates a new #GduIScsiPathModel for viewing the paths on the iSCSI
* target on @object.
@@ -211,7 +211,7 @@ gdu_iscsi_path_model_class_init (GduIScsiPathModelClass *klass)
*/
GduIScsiPathModel *
gdu_iscsi_path_model_new (UDisksClient *client,
- GDBusObject *object)
+ UDisksObject *object)
{
return GDU_ISCSI_PATH_MODEL (g_object_new (GDU_TYPE_ISCSI_PATH_MODEL,
"client", client,
@@ -239,12 +239,12 @@ gdu_iscsi_path_model_get_client (GduIScsiPathModel *model)
* gdu_iscsi_path_model_get_object:
* @model: A #GduIScsiPathModel.
*
- * Gets the #GDBusObject used by @model.
+ * Gets the #UDisksObject used by @model.
*
- * Returns: (transfer none): A #GDBusObject. Do not free, the object
+ * Returns: (transfer none): A #UDisksObject. Do not free, the object
* belongs to @model.
*/
-GDBusObject *
+UDisksObject *
gdu_iscsi_path_model_get_object (GduIScsiPathModel *model)
{
g_return_val_if_fail (GDU_IS_ISCSI_PATH_MODEL (model), NULL);
diff --git a/src/palimpsest/gduiscsipathmodel.h b/src/palimpsest/gduiscsipathmodel.h
index a1eca25..a8ba685 100644
--- a/src/palimpsest/gduiscsipathmodel.h
+++ b/src/palimpsest/gduiscsipathmodel.h
@@ -45,9 +45,9 @@ enum
GType gdu_iscsi_path_model_get_type (void) G_GNUC_CONST;
GduIScsiPathModel *gdu_iscsi_path_model_new (UDisksClient *client,
- GDBusObject *object);
+ UDisksObject *object);
UDisksClient *gdu_iscsi_path_model_get_client (GduIScsiPathModel *model);
-GDBusObject *gdu_iscsi_path_model_get_object (GduIScsiPathModel *model);
+UDisksObject *gdu_iscsi_path_model_get_object (GduIScsiPathModel *model);
G_END_DECLS
diff --git a/src/palimpsest/gduvolumegrid.c b/src/palimpsest/gduvolumegrid.c
index 8e7b1b5..bf4d222 100644
--- a/src/palimpsest/gduvolumegrid.c
+++ b/src/palimpsest/gduvolumegrid.c
@@ -52,7 +52,7 @@ struct GridElement
/* these values are set in recompute_grid() */
gint fixed_width;
gdouble size_ratio;
- GDBusObject *object;
+ UDisksObject *object;
guint64 offset;
guint64 size;
@@ -102,7 +102,7 @@ struct _GduVolumeGrid
GtkWidget parent;
UDisksClient *client;
- GDBusObject *block_device;
+ UDisksObject *block_device;
gboolean container_visible;
gchar *container_markup;
@@ -623,7 +623,7 @@ gdu_volume_grid_new (UDisksClient *client)
NULL));
}
-GDBusObject *
+UDisksObject *
gdu_volume_grid_get_block_device (GduVolumeGrid *grid)
{
g_return_val_if_fail (GDU_IS_VOLUME_GRID (grid), NULL);
@@ -632,7 +632,7 @@ gdu_volume_grid_get_block_device (GduVolumeGrid *grid)
void
gdu_volume_grid_set_block_device (GduVolumeGrid *grid,
- GDBusObject *block_device)
+ UDisksObject *block_device)
{
g_return_if_fail (GDU_IS_VOLUME_GRID (grid));
@@ -1400,7 +1400,7 @@ find_element_for_position (GduVolumeGrid *grid,
static GridElement *
do_find_element_for_offset_and_object (GList *elements,
guint64 offset,
- GDBusObject *object)
+ UDisksObject *object)
{
GList *l;
GridElement *ret;
@@ -1429,19 +1429,19 @@ do_find_element_for_offset_and_object (GList *elements,
static GridElement *
find_element_for_offset_and_object (GduVolumeGrid *grid,
guint64 offset,
- GDBusObject *object)
+ UDisksObject *object)
{
return do_find_element_for_offset_and_object (grid->elements, offset, object);
}
static gint
-partition_sort_by_offset_func (GDBusObject *a,
- GDBusObject *b)
+partition_sort_by_offset_func (UDisksObject *a,
+ UDisksObject *b)
{
guint64 oa;
guint64 ob;
- oa = udisks_block_device_get_part_entry_offset (UDISKS_PEEK_BLOCK_DEVICE (a));
- ob = udisks_block_device_get_part_entry_offset (UDISKS_PEEK_BLOCK_DEVICE (b));
+ oa = udisks_block_device_get_part_entry_offset (udisks_object_peek_block_device (a));
+ ob = udisks_block_device_get_part_entry_offset (udisks_object_peek_block_device (b));
if (oa > ob)
return 1;
else if (oa < ob)
@@ -1453,12 +1453,12 @@ partition_sort_by_offset_func (GDBusObject *a,
static void grid_element_set_details (GduVolumeGrid *grid,
GridElement *element);
-static GDBusObject *
+static UDisksObject *
lookup_cleartext_device_for_crypto_device (GduVolumeGrid *grid,
const gchar *object_path)
{
GDBusObjectManager *object_manager;
- GDBusObject *ret;
+ UDisksObject *ret;
GList *objects;
GList *l;
@@ -1468,10 +1468,10 @@ lookup_cleartext_device_for_crypto_device (GduVolumeGrid *grid,
objects = g_dbus_object_manager_get_objects (object_manager);
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block == NULL)
continue;
@@ -1501,17 +1501,17 @@ maybe_add_crypto (GduVolumeGrid *grid,
if (element->object == NULL)
goto out;
- block = UDISKS_PEEK_BLOCK_DEVICE (element->object);
+ block = udisks_object_peek_block_device (element->object);
if (block == NULL)
goto out;
if (g_strcmp0 (udisks_block_device_get_id_usage (block), "crypto") == 0)
{
- GDBusObject *cleartext_object;
+ UDisksObject *cleartext_object;
GridElement *embedded_cleartext_element;
cleartext_object = lookup_cleartext_device_for_crypto_device (grid,
- g_dbus_object_get_object_path (element->object));
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (element->object)));
if (cleartext_object == NULL)
{
element->show_padlock_closed = TRUE;
@@ -1525,7 +1525,7 @@ maybe_add_crypto (GduVolumeGrid *grid,
cleartext_element->size_ratio = 1.0;
cleartext_element->object = g_object_ref (cleartext_object);
cleartext_element->offset = 0;
- cleartext_element->size = udisks_block_device_get_size (UDISKS_PEEK_BLOCK_DEVICE (cleartext_object));
+ cleartext_element->size = udisks_block_device_get_size (udisks_object_peek_block_device (cleartext_object));
grid_element_set_details (grid, cleartext_element);
/* recurse to handle multiple layers of encryption... */
@@ -1549,7 +1549,7 @@ recompute_grid_add_partitions (GduVolumeGrid *grid,
guint64 top_offset,
guint64 top_size,
GList *partitions,
- GDBusObject *extended_partition,
+ UDisksObject *extended_partition,
GList *logical_partitions)
{
guint64 prev_end;
@@ -1566,11 +1566,11 @@ recompute_grid_add_partitions (GduVolumeGrid *grid,
prev_element = NULL;
for (l = partitions; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
guint64 begin, end, size;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
begin = udisks_block_device_get_part_entry_offset (block);
size = udisks_block_device_get_part_entry_size (block);
end = begin + size;
@@ -1650,7 +1650,7 @@ recompute_grid (GduVolumeGrid *grid)
{
GList *partitions;
GList *logical_partitions;
- GDBusObject *extended_partition;
+ UDisksObject *extended_partition;
GList *objects;
GDBusObjectManager *object_manager;
GList *l;
@@ -1661,8 +1661,8 @@ recompute_grid (GduVolumeGrid *grid)
GridElement *element;
guint64 cur_selected_offset;
guint64 cur_focused_offset;
- GDBusObject *cur_selected_object;
- GDBusObject *cur_focused_object;
+ UDisksObject *cur_selected_object;
+ UDisksObject *cur_focused_object;
cur_selected_offset = G_MAXUINT64;
cur_selected_object = NULL;
@@ -1718,8 +1718,8 @@ recompute_grid (GduVolumeGrid *grid)
goto out;
}
- top_object_path = g_dbus_object_get_object_path (grid->block_device);
- top_block = UDISKS_PEEK_BLOCK_DEVICE (grid->block_device);
+ top_object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (grid->block_device));
+ top_block = udisks_object_peek_block_device (grid->block_device);
top_size = udisks_block_device_get_size (top_block);
/* include "Free Space" elements if there is at least this much slack between
@@ -1734,11 +1734,11 @@ recompute_grid (GduVolumeGrid *grid)
objects = g_dbus_object_manager_get_objects (object_manager);
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
gboolean is_logical;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block != NULL &&
g_strcmp0 (udisks_block_device_get_part_entry_table (block),
top_object_path) == 0)
@@ -1855,7 +1855,7 @@ gdu_volume_grid_get_selected_type (GduVolumeGrid *grid)
return grid->selected->type;
}
-GDBusObject *
+UDisksObject *
gdu_volume_grid_get_selected_device (GduVolumeGrid *grid)
{
g_return_val_if_fail (GDU_IS_VOLUME_GRID (grid), NULL);
@@ -1915,7 +1915,7 @@ grid_element_set_details (GduVolumeGrid *grid,
gchar *type_for_display;
size_str = udisks_util_get_size_for_display (element->size, FALSE, FALSE);
- block = UDISKS_PEEK_BLOCK_DEVICE (element->object);
+ block = udisks_object_peek_block_device (element->object);
usage = udisks_block_device_get_id_usage (block);
type = udisks_block_device_get_id_type (block);
@@ -1942,7 +1942,7 @@ grid_element_set_details (GduVolumeGrid *grid,
s = g_strdup_printf ("%s\n%s %s", label, size_str, type_for_display);
g_free (type_for_display);
- filesystem = UDISKS_PEEK_FILESYSTEM (element->object);
+ filesystem = udisks_object_peek_filesystem (element->object);
if (filesystem != NULL)
{
const gchar *const *mount_points;
@@ -1963,7 +1963,7 @@ grid_element_set_details (GduVolumeGrid *grid,
s = g_strdup_printf ("%s\n%s %s", label, size_str, type_for_display);
g_free (type_for_display);
- swapspace = UDISKS_PEEK_SWAPSPACE (element->object);
+ swapspace = udisks_object_peek_swapspace (element->object);
if (swapspace != NULL)
{
if (udisks_swapspace_get_active (swapspace))
@@ -1989,20 +1989,20 @@ grid_element_set_details (GduVolumeGrid *grid,
static gboolean
is_disk_or_partition_in_grid (GduVolumeGrid *grid,
- GDBusObject *object)
+ UDisksObject *object)
{
UDisksBlockDevice *block;
gboolean ret;
ret = FALSE;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block == NULL)
goto out;
if (object == grid->block_device ||
g_strcmp0 (udisks_block_device_get_part_entry_table (block),
- g_dbus_object_get_object_path (grid->block_device)) == 0)
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (grid->block_device))) == 0)
ret = TRUE;
out:
@@ -2011,11 +2011,11 @@ is_disk_or_partition_in_grid (GduVolumeGrid *grid,
gboolean
gdu_volume_grid_includes_object (GduVolumeGrid *grid,
- GDBusObject *object)
+ UDisksObject *object)
{
UDisksBlockDevice *block;
const gchar *crypto_backing_device;
- GDBusObject *crypto_object;
+ UDisksObject *crypto_object;
gboolean ret;
g_return_val_if_fail (GDU_IS_VOLUME_GRID (grid), FALSE);
@@ -2034,12 +2034,12 @@ gdu_volume_grid_includes_object (GduVolumeGrid *grid,
}
/* handle when it's a crypt devices for our grid or a partition in it */
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block != NULL)
{
crypto_backing_device = udisks_block_device_get_crypto_backing_device (block);
- crypto_object = g_dbus_object_manager_get_object (udisks_client_get_object_manager (grid->client),
- crypto_backing_device);
+ crypto_object = (UDisksObject *) g_dbus_object_manager_get_object (udisks_client_get_object_manager (grid->client),
+ crypto_backing_device);
if (crypto_object != NULL)
{
if (is_disk_or_partition_in_grid (grid, crypto_object))
@@ -2060,7 +2060,7 @@ gdu_volume_grid_includes_object (GduVolumeGrid *grid,
static void
maybe_update (GduVolumeGrid *grid,
- GDBusObject *object)
+ UDisksObject *object)
{
if (gdu_volume_grid_includes_object (grid, object))
recompute_grid (grid);
@@ -2072,7 +2072,7 @@ on_object_added (GDBusObjectManager *manager,
gpointer user_data)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (user_data);
- maybe_update (grid, object);
+ maybe_update (grid, UDISKS_OBJECT (object));
}
static void
@@ -2081,7 +2081,7 @@ on_object_removed (GDBusObjectManager *manager,
gpointer user_data)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (user_data);
- maybe_update (grid, object);
+ maybe_update (grid, UDISKS_OBJECT (object));
}
static void
@@ -2091,7 +2091,7 @@ on_interface_added (GDBusObjectManager *manager,
gpointer user_data)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (user_data);
- maybe_update (grid, object);
+ maybe_update (grid, UDISKS_OBJECT (object));
}
static void
@@ -2101,7 +2101,7 @@ on_interface_removed (GDBusObjectManager *manager,
gpointer user_data)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (user_data);
- maybe_update (grid, object);
+ maybe_update (grid, UDISKS_OBJECT (object));
}
static void
@@ -2113,7 +2113,7 @@ on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager,
gpointer user_data)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (user_data);
- maybe_update (grid, G_DBUS_OBJECT (object_proxy));
+ maybe_update (grid, UDISKS_OBJECT (object_proxy));
}
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/palimpsest/gduvolumegrid.h b/src/palimpsest/gduvolumegrid.h
index 206809c..e51c526 100644
--- a/src/palimpsest/gduvolumegrid.h
+++ b/src/palimpsest/gduvolumegrid.h
@@ -35,8 +35,8 @@ G_BEGIN_DECLS
GType gdu_volume_grid_get_type (void) G_GNUC_CONST;
GtkWidget* gdu_volume_grid_new (UDisksClient *client);
void gdu_volume_grid_set_block_device (GduVolumeGrid *grid,
- GDBusObject *block_device);
-GDBusObject *gdu_volume_grid_get_block_device (GduVolumeGrid *grid);
+ UDisksObject *block_device);
+UDisksObject *gdu_volume_grid_get_block_device (GduVolumeGrid *grid);
void gdu_volume_grid_set_container_visible (GduVolumeGrid *grid,
gboolean visible);
void gdu_volume_grid_set_container_markup (GduVolumeGrid *grid,
@@ -45,10 +45,10 @@ void gdu_volume_grid_set_container_icon (GduVolumeGrid
GIcon *icon);
gboolean gdu_volume_grid_includes_object (GduVolumeGrid *grid,
- GDBusObject *object);
+ UDisksObject *object);
GduVolumeGridElementType gdu_volume_grid_get_selected_type (GduVolumeGrid *grid);
-GDBusObject *gdu_volume_grid_get_selected_device (GduVolumeGrid *grid);
+UDisksObject *gdu_volume_grid_get_selected_device (GduVolumeGrid *grid);
guint64 gdu_volume_grid_get_selected_offset (GduVolumeGrid *grid);
guint64 gdu_volume_grid_get_selected_size (GduVolumeGrid *grid);
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index ac73657..5b8779c 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -52,7 +52,7 @@ struct _GduWindow
GduDeviceTreeModel *model;
DetailsPage current_page;
- GDBusObject *current_object;
+ UDisksObject *current_object;
GtkWidget *volume_grid;
GtkWidget *write_cache_switch;
@@ -81,11 +81,11 @@ static gboolean on_activate_link (GtkLabel *label,
const gchar *uri,
gpointer user_data);
-static void setup_device_page (GduWindow *window, GDBusObject *object);
+static void setup_device_page (GduWindow *window, UDisksObject *object);
static void update_device_page (GduWindow *window);
static void teardown_device_page (GduWindow *window);
-static void setup_iscsi_target_page (GduWindow *window, GDBusObject *object);
+static void setup_iscsi_target_page (GduWindow *window, UDisksObject *object);
static void update_iscsi_target_page (GduWindow *window);
static void teardown_iscsi_target_page (GduWindow *window);
@@ -209,21 +209,21 @@ on_row_inserted (GtkTreeModel *tree_model,
}
static void select_details_page (GduWindow *window,
- GDBusObject *object,
+ UDisksObject *object,
DetailsPage page);
static void
-set_selected_object (GduWindow *window,
- GDBusObject *object)
+set_selected_object (GduWindow *window,
+ UDisksObject *object)
{
if (object != NULL)
{
- if (UDISKS_PEEK_LUN (object) != NULL ||
- UDISKS_PEEK_BLOCK_DEVICE (object) != NULL)
+ if (udisks_object_peek_lun (object) != NULL ||
+ udisks_object_peek_block_device (object) != NULL)
{
select_details_page (window, object, DETAILS_PAGE_DEVICE);
}
- else if (UDISKS_PEEK_ISCSI_TARGET (object) != NULL)
+ else if (udisks_object_peek_iscsi_target (object) != NULL)
{
select_details_page (window, object, DETAILS_PAGE_ISCSI_TARGET);
}
@@ -248,7 +248,7 @@ on_tree_selection_changed (GtkTreeSelection *tree_selection,
if (gtk_tree_selection_get_selected (tree_selection, &model, &iter))
{
- GDBusObject *object;
+ UDisksObject *object;
gtk_tree_model_get (model,
&iter,
GDU_DEVICE_TREE_MODEL_COLUMN_OBJECT,
@@ -657,9 +657,9 @@ gdu_window_get_widget (GduWindow *window,
}
static void
-teardown_details_page (GduWindow *window,
- GDBusObject *object,
- DetailsPage page)
+teardown_details_page (GduWindow *window,
+ UDisksObject *object,
+ DetailsPage page)
{
//g_debug ("teardown for %s, page %d",
// object != NULL ? g_dbus_object_get_object_path (object) : "<none>",
@@ -764,10 +764,10 @@ get_top_level_block_devices_for_lun (GduWindow *window,
ret = NULL;
for (l = object_proxies; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
- block = UDISKS_GET_BLOCK_DEVICE (object);
+ block = udisks_object_get_block_device (object);
if (block == NULL)
continue;
@@ -784,19 +784,19 @@ get_top_level_block_devices_for_lun (GduWindow *window,
}
static gint
-block_device_compare_on_preferred (GDBusObject *a,
- GDBusObject *b)
+block_device_compare_on_preferred (UDisksObject *a,
+ UDisksObject *b)
{
- return g_strcmp0 (udisks_block_device_get_preferred_device (UDISKS_PEEK_BLOCK_DEVICE (a)),
- udisks_block_device_get_preferred_device (UDISKS_PEEK_BLOCK_DEVICE (b)));
+ return g_strcmp0 (udisks_block_device_get_preferred_device (udisks_object_peek_block_device (a)),
+ udisks_block_device_get_preferred_device (udisks_object_peek_block_device (b)));
}
/* ---------------------------------------------------------------------------------------------------- */
static void
-setup_details_page (GduWindow *window,
- GDBusObject *object,
- DetailsPage page)
+setup_details_page (GduWindow *window,
+ UDisksObject *object,
+ DetailsPage page)
{
//g_debug ("setup for %s, page %d",
// object != NULL ? g_dbus_object_get_object_path (object) : "<none>",
@@ -841,9 +841,9 @@ update_details_page (GduWindow *window,
}
static void
-select_details_page (GduWindow *window,
- GDBusObject *object,
- DetailsPage page)
+select_details_page (GduWindow *window,
+ UDisksObject *object,
+ DetailsPage page)
{
GtkNotebook *notebook;
@@ -868,8 +868,8 @@ select_details_page (GduWindow *window,
}
static void
-update_all (GduWindow *window,
- GDBusObject *object)
+update_all (GduWindow *window,
+ UDisksObject *object)
{
switch (window->current_page)
{
@@ -901,7 +901,7 @@ on_object_added (GDBusObjectManager *manager,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- update_all (window, object);
+ update_all (window, UDISKS_OBJECT (object));
}
static void
@@ -910,7 +910,7 @@ on_object_removed (GDBusObjectManager *manager,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- update_all (window, object);
+ update_all (window, UDISKS_OBJECT (object));
}
static void
@@ -920,7 +920,7 @@ on_interface_added (GDBusObjectManager *manager,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- update_all (window, object);
+ update_all (window, UDISKS_OBJECT (object));
}
static void
@@ -930,7 +930,7 @@ on_interface_removed (GDBusObjectManager *manager,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- update_all (window, object);
+ update_all (window, UDISKS_OBJECT (object));
}
static void
@@ -942,20 +942,20 @@ on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- update_all (window, G_DBUS_OBJECT (object_proxy));
+ update_all (window, UDISKS_OBJECT (object_proxy));
}
/* ---------------------------------------------------------------------------------------------------- */
static void
-setup_device_page (GduWindow *window,
- GDBusObject *object)
+setup_device_page (GduWindow *window,
+ UDisksObject *object)
{
UDisksLun *lun;
UDisksBlockDevice *block;
- lun = UDISKS_PEEK_LUN (object);
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ lun = udisks_object_peek_lun (object);
+ block = udisks_object_peek_block_device (object);
gdu_volume_grid_set_container_visible (GDU_VOLUME_GRID (window->volume_grid), FALSE);
if (lun != NULL)
@@ -968,7 +968,7 @@ setup_device_page (GduWindow *window,
GIcon *lun_media_icon;
/* TODO: for multipath, ensure e.g. mpathk is before sda, sdb */
- block_devices = get_top_level_block_devices_for_lun (window, g_dbus_object_get_object_path (object));
+ block_devices = get_top_level_block_devices_for_lun (window, g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
block_devices = g_list_sort (block_devices, (GCompareFunc) block_device_compare_on_preferred);
udisks_util_get_lun_info (lun,
@@ -1003,9 +1003,9 @@ setup_device_page (GduWindow *window,
}
static void
-update_device_page_for_lun (GduWindow *window,
- GDBusObject *object,
- UDisksLun *lun)
+update_device_page_for_lun (GduWindow *window,
+ UDisksObject *object,
+ UDisksLun *lun)
{
gchar *s;
GList *block_devices;
@@ -1025,7 +1025,7 @@ update_device_page_for_lun (GduWindow *window,
// object != NULL ? g_dbus_object_get_object_path (object) : "<nothing>");
/* TODO: for multipath, ensure e.g. mpathk is before sda, sdb */
- block_devices = get_top_level_block_devices_for_lun (window, g_dbus_object_get_object_path (object));
+ block_devices = get_top_level_block_devices_for_lun (window, g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
block_devices = g_list_sort (block_devices, (GCompareFunc) block_device_compare_on_preferred);
udisks_util_get_lun_info (lun, &name, &description, &drive_icon, &media_description, &media_icon);
@@ -1036,10 +1036,10 @@ update_device_page_for_lun (GduWindow *window,
str = g_string_new (NULL);
for (l = block_devices; l != NULL; l = l->next)
{
- GDBusObject *block_object = G_DBUS_OBJECT (l->data);
+ UDisksObject *block_object = UDISKS_OBJECT (l->data);
if (str->len > 0)
g_string_append_c (str, ' ');
- g_string_append (str, udisks_block_device_get_preferred_device (UDISKS_PEEK_BLOCK_DEVICE (block_object)));
+ g_string_append (str, udisks_block_device_get_preferred_device (udisks_object_peek_block_device (block_object)));
}
s = g_strdup_printf ("<big><b>%s</b></big>\n"
"<small><span foreground=\"#555555\">%s</span></small>",
@@ -1129,12 +1129,12 @@ update_device_page_for_lun (GduWindow *window,
g_free (name);
}
-static GDBusObject *
+static UDisksObject *
lookup_cleartext_device_for_crypto_device (UDisksClient *client,
const gchar *object_path)
{
GDBusObjectManager *object_manager;
- GDBusObject *ret;
+ UDisksObject *ret;
GList *objects;
GList *l;
@@ -1144,10 +1144,10 @@ lookup_cleartext_device_for_crypto_device (UDisksClient *client,
objects = g_dbus_object_manager_get_objects (object_manager);
for (l = objects; l != NULL; l = l->next)
{
- GDBusObject *object = G_DBUS_OBJECT (l->data);
+ UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksBlockDevice *block;
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
if (block == NULL)
continue;
@@ -1166,10 +1166,10 @@ lookup_cleartext_device_for_crypto_device (UDisksClient *client,
}
static void
-update_device_page_for_block (GduWindow *window,
- GDBusObject *object,
- UDisksBlockDevice *block,
- guint64 size)
+update_device_page_for_block (GduWindow *window,
+ UDisksObject *object,
+ UDisksBlockDevice *block,
+ guint64 size)
{
const gchar *backing_file;
const gchar *usage;
@@ -1255,13 +1255,13 @@ update_device_page_for_block (GduWindow *window,
}
else
{
- GDBusObject *lun_object;
- lun_object = g_dbus_object_manager_get_object (udisks_client_get_object_manager (window->client),
- udisks_block_device_get_lun (block));
+ UDisksObject *lun_object;
+ lun_object = (UDisksObject *) g_dbus_object_manager_get_object (udisks_client_get_object_manager (window->client),
+ udisks_block_device_get_lun (block));
if (lun_object != NULL)
{
UDisksLun *lun;
- lun = UDISKS_PEEK_LUN (lun_object);
+ lun = udisks_object_peek_lun (lun_object);
if (udisks_lun_get_media_removable (lun))
{
gtk_action_set_visible (GTK_ACTION (gtk_builder_get_object (window->builder,
@@ -1274,7 +1274,7 @@ update_device_page_for_block (GduWindow *window,
if (g_strcmp0 (udisks_block_device_get_id_usage (block), "filesystem") == 0)
{
UDisksFilesystem *filesystem;
- filesystem = UDISKS_PEEK_FILESYSTEM (object);
+ filesystem = udisks_object_peek_filesystem (object);
if (filesystem != NULL)
{
const gchar *const *mount_points;
@@ -1319,7 +1319,7 @@ update_device_page_for_block (GduWindow *window,
g_strcmp0 (udisks_block_device_get_id_type (block), "swap") == 0)
{
UDisksSwapspace *swapspace;
- swapspace = UDISKS_PEEK_SWAPSPACE (object);
+ swapspace = udisks_object_peek_swapspace (object);
if (swapspace != NULL)
{
if (udisks_swapspace_get_active (swapspace))
@@ -1336,10 +1336,10 @@ update_device_page_for_block (GduWindow *window,
}
else if (g_strcmp0 (udisks_block_device_get_id_usage (block), "crypto") == 0)
{
- GDBusObject *cleartext_device;
+ UDisksObject *cleartext_device;
cleartext_device = lookup_cleartext_device_for_crypto_device (window->client,
- g_dbus_object_get_object_path (object));
+ g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
if (cleartext_device != NULL)
{
gtk_action_set_visible (GTK_ACTION (gtk_builder_get_object (window->builder,
@@ -1355,19 +1355,19 @@ update_device_page_for_block (GduWindow *window,
}
static void
-update_device_page_for_no_media (GduWindow *window,
- GDBusObject *object,
- UDisksBlockDevice *block)
+update_device_page_for_no_media (GduWindow *window,
+ UDisksObject *object,
+ UDisksBlockDevice *block)
{
//g_debug ("In update_device_page_for_no_media() - selected=%s",
// object != NULL ? g_dbus_object_get_object_path (object) : "<nothing>");
}
static void
-update_device_page_for_free_space (GduWindow *window,
- GDBusObject *object,
- UDisksBlockDevice *block,
- guint64 size)
+update_device_page_for_free_space (GduWindow *window,
+ UDisksObject *object,
+ UDisksBlockDevice *block,
+ guint64 size)
{
//g_debug ("In update_device_page_for_free_space() - size=%" G_GUINT64_FORMAT " selected=%s",
// size,
@@ -1393,7 +1393,7 @@ update_device_page_for_free_space (GduWindow *window,
static void
update_device_page (GduWindow *window)
{
- GDBusObject *object;
+ UDisksObject *object;
GduVolumeGridElementType type;
UDisksBlockDevice *block;
UDisksLun *lun;
@@ -1417,8 +1417,8 @@ update_device_page (GduWindow *window)
object = window->current_object;
- lun = UDISKS_PEEK_LUN (window->current_object);
- block = UDISKS_PEEK_BLOCK_DEVICE (window->current_object);
+ lun = udisks_object_peek_lun (window->current_object);
+ block = udisks_object_peek_block_device (window->current_object);
type = gdu_volume_grid_get_selected_type (GDU_VOLUME_GRID (window->volume_grid));
size = gdu_volume_grid_get_selected_size (GDU_VOLUME_GRID (window->volume_grid));
@@ -1437,7 +1437,7 @@ update_device_page (GduWindow *window)
object = gdu_volume_grid_get_block_device (GDU_VOLUME_GRID (window->volume_grid));
if (object != NULL)
{
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
switch (type)
{
case GDU_VOLUME_GRID_ELEMENT_TYPE_CONTAINER:
@@ -1557,7 +1557,7 @@ on_iscsi_active_toggled (GtkCellRendererToggle *renderer,
tree_view = GTK_TREE_VIEW (gdu_window_get_widget (window, "iscsi-connections-treeview"));
tree_model = gtk_tree_view_get_model (tree_view);
- target = UDISKS_PEEK_ISCSI_TARGET (window->current_object);
+ target = udisks_object_peek_iscsi_target (window->current_object);
if (target == NULL)
{
g_warning ("Expected selected object to be an iSCSI target");
@@ -1737,7 +1737,7 @@ update_iscsi_target_page (GduWindow *window)
}
g_list_free (children);
- target = UDISKS_PEEK_ISCSI_TARGET (window->current_object);
+ target = udisks_object_peek_iscsi_target (window->current_object);
/* TODO: get Alias from somewhere */
set_markup (window,
"iscsitab-alias-label",
@@ -1765,7 +1765,7 @@ iscsi_connection_switch_on_notify_active (GObject *object,
gboolean has_connections;
UDisksIScsiTarget *target;
- target = UDISKS_PEEK_ISCSI_TARGET (window->current_object);
+ target = udisks_object_peek_iscsi_target (window->current_object);
if (target == NULL)
{
g_warning ("Expected selected object to be an iSCSI target");
@@ -1808,8 +1808,8 @@ iscsi_connection_switch_on_notify_active (GObject *object,
}
static void
-setup_iscsi_target_page (GduWindow *window,
- GDBusObject *object)
+setup_iscsi_target_page (GduWindow *window,
+ UDisksObject *object)
{
GtkTreeView *tree_view;
GduIScsiPathModel *model;
@@ -1937,7 +1937,7 @@ on_change_filesystem_label (GduWindow *window)
gint response;
GtkWidget *dialog;
GtkWidget *entry;
- GDBusObject *object;
+ UDisksObject *object;
UDisksBlockDevice *block;
const gchar *label;
ChangeFilesystemLabelData data;
@@ -1946,7 +1946,7 @@ on_change_filesystem_label (GduWindow *window)
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
g_assert (object != NULL);
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
g_assert (block != NULL);
dialog = gdu_window_get_widget (window, "change-filesystem-label-dialog");
@@ -2026,7 +2026,7 @@ on_change_partition_type (GduWindow *window)
gint response;
GtkWidget *dialog;
GtkWidget *combo_box;
- GDBusObject *object;
+ UDisksObject *object;
UDisksBlockDevice *block;
const gchar *scheme;
const gchar *cur_type;
@@ -2038,7 +2038,7 @@ on_change_partition_type (GduWindow *window)
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
g_assert (object != NULL);
- block = UDISKS_PEEK_BLOCK_DEVICE (object);
+ block = udisks_object_peek_block_device (object);
g_assert (block != NULL);
dialog = gdu_window_get_widget (window, "change-partition-type-dialog");
@@ -2157,12 +2157,12 @@ on_devtab_action_mount_activated (GtkAction *action,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- GDBusObject *object;
+ UDisksObject *object;
UDisksFilesystem *filesystem;
const gchar *options[] = {NULL};
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
- filesystem = UDISKS_PEEK_FILESYSTEM (object);
+ filesystem = udisks_object_peek_filesystem (object);
udisks_filesystem_call_mount (filesystem,
"", /* filesystem type */
options, /* options */
@@ -2199,12 +2199,12 @@ on_devtab_action_unmount_activated (GtkAction *action,
gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- GDBusObject *object;
+ UDisksObject *object;
UDisksFilesystem *filesystem;
const gchar *options[] = {NULL};
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
- filesystem = UDISKS_PEEK_FILESYSTEM (object);
+ filesystem = udisks_object_peek_filesystem (object);
udisks_filesystem_call_unmount (filesystem,
options, /* options */
NULL, /* cancellable */
@@ -2284,12 +2284,12 @@ static void
on_devtab_action_activate_swap_activated (GtkAction *action, gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- GDBusObject *object;
+ UDisksObject *object;
UDisksSwapspace *swapspace;
const gchar *options[] = {NULL};
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
- swapspace = UDISKS_PEEK_SWAPSPACE (object);
+ swapspace = udisks_object_peek_swapspace (object);
udisks_swapspace_call_start (swapspace,
options, /* options */
NULL, /* cancellable */
@@ -2322,12 +2322,12 @@ static void
on_devtab_action_deactivate_swap_activated (GtkAction *action, gpointer user_data)
{
GduWindow *window = GDU_WINDOW (user_data);
- GDBusObject *object;
+ UDisksObject *object;
UDisksSwapspace *swapspace;
const gchar *options[] = {NULL};
object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
- swapspace = UDISKS_PEEK_SWAPSPACE (object);
+ swapspace = udisks_object_peek_swapspace (object);
udisks_swapspace_call_stop (swapspace,
options, /* options */
NULL, /* cancellable */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]