From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> --- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 28 +++++++++++++------- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h | 4 ++- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c index e517a20..8d67a13 100644 --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c @@ -37,10 +37,14 @@ struct _GVirConfigCapabilitiesCpuPrivate G_DEFINE_TYPE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT); +GList * +_gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu); static void gvir_config_capabilities_cpu_class_init(GVirConfigCapabilitiesCpuClass *klass) { g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuPrivate)); + + klass->get_features = _gvir_config_capabilities_cpu_get_features; } static void gvir_config_capabilities_cpu_init(GVirConfigCapabilitiesCpu *cpu) @@ -98,16 +102,8 @@ static gboolean add_feature(xmlNodePtr node, gpointer opaque) return TRUE; } -/** - * gvir_config_capabilities_cpu_get_features: - * - * Gets the features of this CPU. - * - * Returns: (element-type LibvirtGConfig.CapabilitiesCpuFeature) (transfer full): - * a newly allocated #GList of #GVirConfigCapabilitiesCpuFeature. - */ GList * -gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) +_gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) { struct GetFeatureData data; @@ -128,6 +124,20 @@ gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) } /** + * gvir_config_capabilities_cpu_get_features: + * + * Gets the features of this CPU. + * + * Returns: (element-type LibvirtGConfig.CapabilitiesCpuFeature) (transfer full): + * a newly allocated #GList of #GVirConfigCapabilitiesCpuFeature. + */ +GList * +gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) +{ + return GVIR_CONFIG_CAPABILITIES_CPU_GET_CLASS(cpu)->get_features(cpu); +} + +/** * gvir_config_capabilities_cpu_get_topology: * * Gets the topology of the cpu. diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h index 67fe607..d2b7094 100644 --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h @@ -57,7 +57,9 @@ struct _GVirConfigCapabilitiesCpuClass { GVirConfigObjectClass parent_class; - gpointer padding[20]; + GList* (* get_features) (GVirConfigCapabilitiesCpu *cpu); + + gpointer padding[19]; }; GType gvir_config_capabilities_cpu_get_type(void); -- 1.7.10.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list