On Thu, Jul 14, 2016 at 02:11:05PM +0100, Zeeshan Ali (Khattak) wrote:
Add a getter for model of domain video device.
---
libvirt-gconfig/libvirt-gconfig-domain-video.c | 12 ++++++++++++
libvirt-gconfig/libvirt-gconfig-domain-video.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 1 +
3 files changed, 14 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.c
b/libvirt-gconfig/libvirt-gconfig-domain-video.c
index 64353bd..e38af6f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-video.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-video.c
@@ -68,6 +68,18 @@ GVirConfigDomainVideo *gvir_config_domain_video_new_from_xml(const
gchar *xml,
return GVIR_CONFIG_DOMAIN_VIDEO(object);
}
+GVirConfigDomainVideoModel gvir_config_domain_video_get_model(GVirConfigDomainVideo
*video)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_VIDEO(video),
GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VGA);
+
+ return gvir_config_object_get_attribute_genum
+ (GVIR_CONFIG_OBJECT(video),
I don't think you need to split these first 2 lines.
Looks good otherwise.
Christophe