From 54f2b8abb553005b10cc65e7267a7de2d095fad5 Mon Sep 17 00:00:00 2001 From: "Eduardo Lima (Etrunko)" Date: Thu, 3 Nov 2016 16:36:35 -0200 Subject: [PATCH 08/26] ovirt-foreign-menu: Add accessors for current iso and iso list Also, to keep consistency around the codebase, changed the return value of ovirt_foreign_menu_get_current_iso_name() from char * to gchar *. Signed-off-by: Eduardo Lima (Etrunko) --- src/ovirt-foreign-menu.c | 11 +++++++++-- src/ovirt-foreign-menu.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c index 8a99665..ef3ddd9 100644 --- a/src/ovirt-foreign-menu.c +++ b/src/ovirt-foreign-menu.c @@ -85,10 +85,10 @@ enum { }; -static char * +gchar * ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu) { - char *name; + gchar *name; if (foreign_menu->priv->cdrom == NULL) { return NULL; @@ -100,6 +100,13 @@ ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu) } +GList* +ovirt_foreign_menu_get_iso_names(OvirtForeignMenu *foreign_menu) +{ + return foreign_menu->priv->iso_names; +} + + static void ovirt_foreign_menu_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) diff --git a/src/ovirt-foreign-menu.h b/src/ovirt-foreign-menu.h index a864a60..340201f 100644 --- a/src/ovirt-foreign-menu.h +++ b/src/ovirt-foreign-menu.h @@ -88,6 +88,8 @@ gboolean ovirt_foreign_menu_set_current_iso_name_finish(OvirtForeignMenu *foreig GtkWidget *ovirt_foreign_menu_get_gtk_menu(OvirtForeignMenu *foreign_menu); +gchar *ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *menu); +GList *ovirt_foreign_menu_get_iso_names(OvirtForeignMenu *menu); G_END_DECLS -- 2.12.0