[libvirt] [libvirt-glib] [PATCH 1/4] GVirDomainSnapshot: Add _is_current

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Aug 6 11:52:55 UTC 2014


On Tue, Aug 5, 2014 at 11:13 AM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> Hey,
>
> On Sat, Aug 02, 2014 at 10:41:46AM +0200, mail at baedert.org wrote:
>> From: Timm Bäder <mail at baedert.org>
>>
>> Add a way to determine if the given GVirDomainSnapshot is the current
>> snapshot of its GVirDomain.
>> ---
>>  libvirt-gobject/libvirt-gobject-domain-snapshot.c | 29 +++++++++++++++++++++++
>>  libvirt-gobject/libvirt-gobject-domain-snapshot.h |  3 +++
>>  libvirt-gobject/libvirt-gobject.sym               |  1 +
>>  3 files changed, 33 insertions(+)
>>
>> diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
>> index 7bb89f1..69b6e5a 100644
>> --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
>> +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
>> @@ -235,3 +235,32 @@ gboolean gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot,
>>      }
>>      return TRUE;
>>  }
>> +
>> +
>> +/**
>> + * gvir_domain_snapshot_is_current:

Although Christophe doesn't like it but the convention is to always
have '_get_" in getter names (and "_set_" in setter) even for booleans
ones like this one. Vala assumes this convention to automatically
translate property access to getter in generated code, which will be
useful when we add properties for these (which IMHO we should).

-- 
Regards,

Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/




More information about the libvir-list mailing list