[virt-tools-list] [libosinfo 4/4] API to indicate media is live and/or installer

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Nov 24 14:04:26 UTC 2011


On Thu, Nov 24, 2011 at 3:53 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Thu, Nov 24, 2011 at 03:46:47PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Thu, Nov 24, 2011 at 10:48 AM, Christophe Fergeau
>> <cfergeau at redhat.com> wrote:
>> > On Thu, Nov 24, 2011 at 12:07:58AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
>> >>
>> >> Add live and installer boolean getters to Media.
>> >> ---
>> >>  osinfo/libosinfo.syms  |    2 ++
>> >>  osinfo/osinfo_loader.c |   15 +++++++++++++++
>> >>  osinfo/osinfo_media.c  |   40 ++++++++++++++++++++++++++++++++++++++++
>> >>  osinfo/osinfo_media.h  |    4 ++++
>> >>  tools/osinfo-detect.c  |   25 +++++++++++++++++--------
>> >>  5 files changed, 78 insertions(+), 8 deletions(-)
>> >>
>> >> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
>> >> index 5b4113e..f1411f7 100644
>> >> --- a/osinfo/libosinfo.syms
>> >> +++ b/osinfo/libosinfo.syms
>> >> @@ -157,6 +157,8 @@ LIBOSINFO_0.0.1 {
>> >>       osinfo_media_get_publisher_id;
>> >>          osinfo_media_get_kernel_path;
>> >>          osinfo_media_get_initrd_path;
>> >> +     osinfo_media_get_installer;
>> >> +     osinfo_media_get_live;
>> >
>> > osinfo_media_is_installer and osinfo_media_is_live sounds better
>>
>>   I admit that sounds better but when we will add props for these
>> (actually I should already) it wouldn't be be immediately obvious to
>> parsers (e.g vapigen) that these getters are for those props. Don't
>> know of other parsers/bindings but in case of vala we really do want
>> VAPI to know these associations for performance reasons.
>
> Surely this association can be specified through annotation or by editing
> the vapi file. Making the C api worse just because it makes things more
> convenient for a specific binding doesn't sound like a good plan.

  You do realize that vala is expecting it like this cause its the
most usual convention in gobject world? Check similar functions in
gtk+ for example: gtk_widget_get_child_visible(). I wouldn't want to
do that extra work just to make the names of getters sound *slightly*
better.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the virt-tools-list mailing list