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), + "model", + "type", + GVIR_CONFIG_TYPE_DOMAIN_VIDEO_MODEL, + GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VGA); +} + void gvir_config_domain_video_set_model(GVirConfigDomainVideo *video, GVirConfigDomainVideoModel model) { diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.h b/libvirt-gconfig/libvirt-gconfig-domain-video.h index 9fb8e4d..973ba72 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-video.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-video.h @@ -71,6 +71,7 @@ GType gvir_config_domain_video_get_type(void); GVirConfigDomainVideo *gvir_config_domain_video_new(void); GVirConfigDomainVideo *gvir_config_domain_video_new_from_xml(const gchar *xml, GError **error); +GVirConfigDomainVideoModel gvir_config_domain_video_get_model(GVirConfigDomainVideo *video); void gvir_config_domain_video_set_model(GVirConfigDomainVideo *video, GVirConfigDomainVideoModel model); void gvir_config_domain_video_set_vram(GVirConfigDomainVideo *video, diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index f11f97a..df6dd3a 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -735,6 +735,7 @@ global: LIBVIRT_GCONFIG_0.2.4 { gvir_config_domain_graphics_spice_set_gl; + gvir_config_domain_video_get_model; gvir_config_domain_video_set_accel3d; } LIBVIRT_GCONFIG_0.2.2; -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list