Re: [libvirt-glib 05/37] Add gvir_config_domain_set_clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 10, 2011 at 9:33 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> The implementation is likely to need to be completed later. We
> might want to store pointers from GVirConfigDomain to the associated
> GVirConfigClock, from GVirConfigClock to the GVirConfigDomain that
> contains it. Since I'm not sure yet if they will be needed, I chose
> to keep the implementation simple.

yup, I think it would be helpful to have GVirConfigObject parent in
GVirConfigObject.

otherwise, ack

>  libvirt-gconfig/libvirt-gconfig-domain.c |    8 ++++++++
>  libvirt-gconfig/libvirt-gconfig-domain.h |    2 ++
>  libvirt-gconfig/libvirt-gconfig.sym      |    1 +
>  3 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
> index f80720a..de60054 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain.c
> @@ -237,3 +237,11 @@ void gvir_config_domain_set_features(GVirConfigDomain *domain,
>     g_object_notify(G_OBJECT(domain), "features");
>  }
>
> +void gvir_config_domain_set_clock(GVirConfigDomain *domain,
> +                                  GVirConfigClock *klock)
> +{
> +    xmlNodePtr clock_node;
> +
> +    clock_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(klock));
> +    gvir_config_object_set_child(GVIR_CONFIG_OBJECT(domain), clock_node);
> +}
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain.h b/libvirt-gconfig/libvirt-gconfig-domain.h
> index 6cc8f31..6f822cf 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain.h
> +++ b/libvirt-gconfig/libvirt-gconfig-domain.h
> @@ -69,6 +69,8 @@ void gvir_config_domain_set_memory(GVirConfigDomain *domain, guint64 memory);
>  GStrv gvir_config_domain_get_features(GVirConfigDomain *domain);
>  void gvir_config_domain_set_features(GVirConfigDomain *domain,
>                                      const GStrv features);
> +void gvir_config_domain_set_clock(GVirConfigDomain *domain,
> +                                  GVirConfigClock *klock);
>
>  G_END_DECLS
>
> diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
> index 19e926c..30cabf5 100644
> --- a/libvirt-gconfig/libvirt-gconfig.sym
> +++ b/libvirt-gconfig/libvirt-gconfig.sym
> @@ -13,6 +13,7 @@ LIBVIRT_GOBJECT_0.0.1 {
>        gvir_config_domain_get_type;
>        gvir_config_domain_new;
>        gvir_config_domain_new_from_xml;
> +       gvir_config_domain_set_clock;
>        gvir_config_domain_get_features;
>        gvir_config_domain_set_features;
>        gvir_config_domain_get_memory;
> --
> 1.7.7
>
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
>



-- 
Marc-André Lureau

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]