[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-glib 04/13] Add gvir_config_domain_controller_usb_set_model



---
 .../libvirt-gconfig-domain-controller-usb.c        |   13 +++++++++++++
 .../libvirt-gconfig-domain-controller-usb.h        |   15 +++++++++++++++
 libvirt-gconfig/libvirt-gconfig.sym                |    2 ++
 3 files changed, 30 insertions(+)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
index 2b7e0b6..5da1cbd 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
@@ -70,3 +70,16 @@ GVirConfigDomainControllerUsb *gvir_config_domain_controller_usb_new_from_xml(co
     gvir_config_object_set_attribute(object, "type", "usb", NULL);
     return GVIR_CONFIG_DOMAIN_CONTROLLER_USB(object);
 }
+
+void gvir_config_domain_controller_usb_set_model(GVirConfigDomainControllerUsb *controller,
+                                                 GVirConfigDomainControllerUsbModel model)
+{
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_CONTROLLER_USB(controller));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(controller),
+                                               "model",
+                                               GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER_USB_MODEL,
+                                               model,
+                                               NULL);
+
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.h b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.h
index 2d50340..f8cc4bf 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.h
@@ -56,11 +56,26 @@ struct _GVirConfigDomainControllerUsbClass
     gpointer padding[20];
 };
 
+typedef enum {
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_PIIX3_UHCI,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_PIIX4_UHCI,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_EHCI,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_EHCI1,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI1,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI2,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI3,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_VT82C686B_UHCI,
+    GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_PCI_OHCI
+} GVirConfigDomainControllerUsbModel;
+
 GType gvir_config_domain_controller_usb_get_type(void);
 
 GVirConfigDomainControllerUsb *gvir_config_domain_controller_usb_new(void);
 GVirConfigDomainControllerUsb *gvir_config_domain_controller_usb_new_from_xml(const gchar *xml,
                                                                               GError **error);
+void gvir_config_domain_controller_usb_set_model(GVirConfigDomainControllerUsb *controller,
+                                                 GVirConfigDomainControllerUsbModel model);
+
 G_END_DECLS
 
 #endif /* __LIBVIRT_GCONFIG_DOMAIN_CONTROLLER_USB_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 9453a97..a0dca07 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -74,8 +74,10 @@ LIBVIRT_GCONFIG_0.0.4 {
 	gvir_config_domain_controller_set_index;
 
 	gvir_config_domain_controller_usb_get_type;
+	gvir_config_domain_controller_usb_model_get_type;
 	gvir_config_domain_controller_usb_new;
 	gvir_config_domain_controller_usb_new_from_xml;
+	gvir_config_domain_controller_usb_set_model;
 
 	gvir_config_domain_device_get_type;
 
-- 
1.7.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]