From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> Provide constructor methods for GVirConfigCapabilitiesCpuTopology. --- .../libvirt-gconfig-capabilities-cpu-topology.c | 25 ++++++++++++++++++++ .../libvirt-gconfig-capabilities-cpu-topology.h | 3 +++ libvirt-gconfig/libvirt-gconfig.sym | 2 ++ 3 files changed, 30 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c index 65ebcb1..f34a4fe 100644 --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c @@ -49,6 +49,31 @@ static void gvir_config_capabilities_cpu_topology_init(GVirConfigCapabilitiesCpu topology->priv = GVIR_CONFIG_CAPABILITIES_CPU_TOPOLOGY_GET_PRIVATE(topology); } +GVirConfigCapabilitiesCpuTopology *gvir_config_capabilities_cpu_topology_new(void) +{ + GVirConfigObject *object; + + object = gvir_config_object_new(GVIR_CONFIG_TYPE_CAPABILITIES_CPU_TOPOLOGY, + "topology", + NULL); + + return GVIR_CONFIG_CAPABILITIES_CPU_TOPOLOGY(object); +} + +GVirConfigCapabilitiesCpuTopology * +gvir_config_capabilities_cpu_topology_new_from_xml(const gchar *xml, GError **error) +{ + GVirConfigObject *object; + + object = gvir_config_object_new_from_xml(GVIR_CONFIG_TYPE_CAPABILITIES_CPU_TOPOLOGY, + "topology", + NULL, + xml, + error); + + return GVIR_CONFIG_CAPABILITIES_CPU_TOPOLOGY(object); +} + guint64 gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopology *topology) { diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h index 673a340..b8075a0 100644 --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h @@ -59,6 +59,9 @@ struct _GVirConfigCapabilitiesCpuTopologyClass GType gvir_config_capabilities_cpu_topology_get_type(void); +GVirConfigCapabilitiesCpuTopology *gvir_config_capabilities_cpu_topology_new(void); +GVirConfigCapabilitiesCpuTopology * +gvir_config_capabilities_cpu_topology_new_from_xml(const gchar *xml, GError **error); guint64 gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopology *topology); guint64 diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index a9e5da5..c319efc 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -402,6 +402,8 @@ LIBVIRT_GCONFIG_0.0.9 { gvir_config_capabilities_cpu_topology_get_cores; gvir_config_capabilities_cpu_topology_get_sockets; gvir_config_capabilities_cpu_topology_get_threads; + gvir_config_capabilities_cpu_topology_new; + gvir_config_capabilities_cpu_topology_new_from_xml; gvir_config_capabilities_guest_get_type; gvir_config_capabilities_guest_get_arch; -- 1.7.10.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list