[libvirt] [PATCH] config: Add listen setter
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Thu Jul 14 17:57:35 UTC 2016
On Thu, Jul 14, 2016 at 3:16 PM, Visarion-Mingopol Alexandru-Viorel
<viorel.visarion at gmail.com> wrote:
> Actually, it seems there is some stuff to work on regarding this change.
Indeed. Please keep in mind that
* if we only use string types if there is no better alternatives.
Static types are preferred as those make it harder to write invalid
code.
* for string types, gvir_config_object_set_attribute_with_type() is
quite an overkill.
Oh and when you provide updated patches, please make the subject
prefix on emails 'gconfig' or 'libvirt-gconfig' so context is very
clear. You'll want version too so --subject-prefix="gconfig v2" would
be good.
> On Wed, Jul 13, 2016 at 6:11 PM, Visarion Alexandru
> <viorel.visarion at gmail.com> wrote:
>>
>> Learn to set the listen attribute on spice.
>> ---
>> libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 10 ++++++++++
>> libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 3 +++
>> libvirt-gconfig/libvirt-gconfig.sym | 4 ++++
>> 3 files changed, 17 insertions(+)
>>
>> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
>> b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
>> index 079ea27..1aba9a7 100644
>> --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
>> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
>> @@ -165,3 +165,13 @@ void
>> gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *gra
>> gvir_config_object_replace_child_with_attribute_enum
>> (GVIR_CONFIG_OBJECT(graphics), "gl", "enable", G_TYPE_BOOLEAN, gl);
>> }
>> +
>> +void
>> gvir_config_domain_graphics_spice_set_listen(GVirConfigDomainGraphicsSpice
>> *graphics,
>> + const char *address)
>> +{
>> + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics));
>> +
>> +
>> gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
>> + "listen", G_TYPE_STRING,
>> address,
>> + NULL);
>> +}
>> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
>> b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
>> index 25c132e..9d995b8 100644
>> --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
>> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
>> @@ -95,6 +95,9 @@ gvir_config_domain_graphics_spice_get_image_compression
>> void
>> gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice
>> *graphics,
>> gboolean gl);
>>
>> +void
>> gvir_config_domain_graphics_spice_set_listen(GVirConfigDomainGraphicsSpice
>> *graphics,
>> + const char *address);
>> +
>> G_END_DECLS
>>
>> #endif /* __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_SPICE_H__ */
>> diff --git a/libvirt-gconfig/libvirt-gconfig.sym
>> b/libvirt-gconfig/libvirt-gconfig.sym
>> index f11f97a..4d28c86 100644
>> --- a/libvirt-gconfig/libvirt-gconfig.sym
>> +++ b/libvirt-gconfig/libvirt-gconfig.sym
>> @@ -738,4 +738,8 @@ LIBVIRT_GCONFIG_0.2.4 {
>> gvir_config_domain_video_set_accel3d;
>> } LIBVIRT_GCONFIG_0.2.2;
>>
>> +LIBVIRT_GCONFIG_0.2.5 {
>> + gvir_config_domain_graphics_spice_set_listen;
>> +} LIBVIRT_GCONFIG_0.2.4;
>> +
>> # .... define new API here using predicted next version number ....
>> --
>> 2.5.5
>>
>
>
>
> --
> Visarion-Mingopol Alexandru-Viorel
> Telefon : 0729614060
> Best Bucuresti
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
--
Regards,
Zeeshan Ali (Khattak)
More information about the libvir-list
mailing list