On Thu, Nov 10, 2011 at 9:33 PM, Christophe Fergeau <cfergeau(a)redhat.com> 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(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
--
Marc-André Lureau