udisks_client_get_object_manager
udisks_client_get_manager
udisks_client_settle
-udisks_client_get_drive_info
udisks_client_get_block_for_dev
udisks_client_get_block_for_drive
udisks_client_get_drive_for_block
udisks_client_get_cleartext_block
udisks_client_get_partition_table
-
+<SUBSECTION>
+udisks_client_get_drive_info
+udisks_client_get_partition_info
<SUBSECTION>
udisks_client_get_size_for_display
udisks_client_get_part_scheme_for_display
/* ---------------------------------------------------------------------------------------------------- */
/**
+ * udisks_client_get_partition_info:
+ * @client: A #UDisksClient.
+ * @partition: # #UDisksPartition.
+ *
+ * Gets information about @partition that is suitable to present in an
+ * user interface in a single line of text.
+ *
+ * The returned string is localized and includes things like the type,
+ * label (if any) and flags (if any).
+ *
+ * Returns: (transfer full): A string that should be freed with g_free().
+ */
+gchar *
+udisks_client_get_partition_info (UDisksClient *client,
+ UDisksPartition *partition)
+{
+ gchar *ret = NULL;
+ UDisksPartitionTable *table = NULL;
+
+ g_return_val_if_fail (UDISKS_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (UDISKS_IS_PARTITION (partition), NULL);
+
+ table = udisks_client_get_partition_table (client, partition);
+
+ /* TODO: also include label and flags */
+ ret = udisks_client_get_part_type_for_display (client,
+ udisks_partition_table_get_type_ (table),
+ udisks_partition_get_type_ (partition),
+ FALSE /* long_string */);
+
+ g_object_unref (table);
+
+ return ret;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+/**
* udisks_client_get_cleartext_block:
* @client: A #UDisksClient.
* @block: A #UDisksBlock.
gchar **out_media_description,
GIcon **out_media_icon);
+gchar *udisks_client_get_partition_info (UDisksClient *client,
+ UDisksPartition *partition);
+
+
gchar *udisks_client_get_size_for_display (UDisksClient *client,
guint64 size,
gboolean use_pow2,