From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
Provide constructor methods for GVirConfigCapabilitiesCpuTopology.
---
.../libvirt-gconfig-capabilities-cpu-topology.c | 25 ++++++++++++++++++++
.../libvirt-gconfig-capabilities-cpu-topology.h | 3 +++
libvirt-gconfig/libvirt-gconfig.sym | 3 +++
3 files changed, 31 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 1741c51..a7bb65d 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -429,6 +429,9 @@ LIBVIRT_GCONFIG_0.0.10 {
global:
gvir_config_capabilities_cpu_add_feature;
gvir_config_capabilities_cpu_set_topology;
+
+ gvir_config_capabilities_cpu_topology_new;
+ gvir_config_capabilities_cpu_topology_new_from_xml;
} LIBVIRT_GCONFIG_0.0.9;
# .... define new API here using predicted next version number ....
--
1.7.10.4
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list