From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> --- libvirt-gconfig/libvirt-gconfig-domain.c | 18 ++++++++++++++++++ libvirt-gconfig/libvirt-gconfig-domain.h | 1 + libvirt-gconfig/libvirt-gconfig.sym | 5 +++++ 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c index 04915ab..b19ac4c 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain.c +++ b/libvirt-gconfig/libvirt-gconfig-domain.c @@ -323,6 +323,24 @@ void gvir_config_domain_set_clock(GVirConfigDomain *domain, GVIR_CONFIG_OBJECT(klock)); } +/** + * gvir_config_domain_get_os: + * + * Returns: (transfer full): + */ +GVirConfigDomainOs *gvir_config_domain_get_os(GVirConfigDomain *domain) +{ + GVirConfigObject *object; + + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain), NULL); + + object = gvir_config_object_add_child(GVIR_CONFIG_OBJECT(domain), + "os", + GVIR_CONFIG_TYPE_DOMAIN_OS); + + return GVIR_CONFIG_DOMAIN_OS(object); +} + void gvir_config_domain_set_os(GVirConfigDomain *domain, GVirConfigDomainOs *os) { diff --git a/libvirt-gconfig/libvirt-gconfig-domain.h b/libvirt-gconfig/libvirt-gconfig-domain.h index 1dbfd95..bdb842b 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain.h +++ b/libvirt-gconfig/libvirt-gconfig-domain.h @@ -114,6 +114,7 @@ void gvir_config_domain_set_features(GVirConfigDomain *domain, const GStrv features); void gvir_config_domain_set_clock(GVirConfigDomain *domain, GVirConfigDomainClock *klock); +GVirConfigDomainOs *gvir_config_domain_get_os(GVirConfigDomain *domain); void gvir_config_domain_set_os(GVirConfigDomain *domain, GVirConfigDomainOs *os); void gvir_config_domain_set_seclabel(GVirConfigDomain *domain, diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index ffeb16b..67e9c3f 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -374,4 +374,9 @@ LIBVIRT_GCONFIG_0.0.8 { *; }; +LIBVIRT_GCONFIG_0.0.9 { + global: + gvir_config_domain_get_os; +} LIBVIRT_GCONFIG_0.0.8; + # .... define new API here using predicted next version number .... -- 1.7.7.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list