On Wed, May 16, 2012 at 04:58:51AM +0300, Zeeshan Ali (Khattak) wrote:
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
---
libvirt-gconfig/libvirt-gconfig-domain.c | 12 ++++++++++++
libvirt-gconfig/libvirt-gconfig-domain.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt-gconfig/libvirt-gconfig-domain.c
index b6b43f0..7477400 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -187,6 +187,18 @@ GVirConfigDomain *gvir_config_domain_new(void)
return GVIR_CONFIG_DOMAIN(object);
}
+GVirConfigDomainVirtType gvir_config_domain_get_virt_type(GVirConfigDomain *domain)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain),
+ GVIR_CONFIG_DOMAIN_VIRT_QEMU);
+
+ return gvir_config_object_get_attribute_genum
+ (GVIR_CONFIG_OBJECT(domain),
+ NULL,
+ "type",
+ GVIR_CONFIG_TYPE_DOMAIN_VIRT_TYPE,
+ GVIR_CONFIG_DOMAIN_VIRT_QEMU);
+}
void gvir_config_domain_set_virt_type(GVirConfigDomain *domain, GVirConfigDomainVirtType
type)
{
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.h
b/libvirt-gconfig/libvirt-gconfig-domain.h
index bdb842b..5deb58e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain.h
@@ -99,6 +99,7 @@ GType gvir_config_domain_get_type(void);
GVirConfigDomain *gvir_config_domain_new_from_xml(const gchar *xml, GError **error);
GVirConfigDomain *gvir_config_domain_new(void);
+GVirConfigDomainVirtType gvir_config_domain_get_virt_type(GVirConfigDomain *domain);
void gvir_config_domain_set_virt_type(GVirConfigDomain *domain, GVirConfigDomainVirtType
type);
const char *gvir_config_domain_get_name(GVirConfigDomain *domain);
void gvir_config_domain_set_name(GVirConfigDomain *domain, const char *name);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 21fff46..f1af2ea 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -376,6 +376,8 @@ LIBVIRT_GCONFIG_0.0.8 {
LIBVIRT_GCONFIG_0.0.9 {
global:
+ gvir_config_domain_get_virt_type;
+
gvir_config_domain_get_os;
gvir_config_domain_os_get_boot_devices;
ACK if this looks like:
LIBVIRT_GCONFIG_0.0.9 {
global:
gvir_config_domain_get_os;
gvir_config_domain_get_virt_type;
gvir_config_domain_os_get_boot_devices;
Christophe