From 151bcf366bc81d3a9a32ebf47b4049f94eb5975b Mon Sep 17 00:00:00 2001 From: Abhimanyu Swami Date: Fri, 7 Feb 2020 17:42:31 +0530 Subject: [PATCH] Glib Upgrade Issue Fix Change-Id: I1feaae4a3ab95b1a4c64ab5967fe9c77755a7ca6 Signed-off-by: Abhimanyu Swami --- location/manager/location-fused.c | 6 ++---- location/manager/location-gps.c | 6 ++---- location/manager/location-hybrid.c | 6 ++---- location/manager/location-passive.c | 6 ++---- location/manager/location-wps.c | 6 ++---- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/location/manager/location-fused.c b/location/manager/location-fused.c index 34febf4..82449da 100644 --- a/location/manager/location-fused.c +++ b/location/manager/location-fused.c @@ -80,10 +80,10 @@ enum { static guint32 signals[LAST_SIGNAL] = {0, }; static GParamSpec *properties[PROP_MAX] = {NULL, }; -#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), LOCATION_TYPE_FUSED, LocationFusedPrivate)) +#define GET_PRIVATE(o) (location_fused_get_instance_private((LocationFused *)(o))) static void location_ielement_interface_init(LocationIElementInterface *iface); -G_DEFINE_TYPE_WITH_CODE(LocationFused, location_fused, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE(LocationFused, location_fused, G_TYPE_OBJECT,G_ADD_PRIVATE(LocationFused) G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); static void fused_position_cb(gboolean enabled, LocationPosition *pos, LocationVelocity *vel, LocationAccuracy *acc, gpointer self); @@ -752,8 +752,6 @@ location_fused_class_init(LocationFusedClass *klass) gobject_class->dispose = location_fused_dispose; gobject_class->finalize = location_fused_finalize; - g_type_class_add_private(klass, sizeof(LocationFusedPrivate)); - signals[SERVICE_ENABLED] = g_signal_new("service-enabled", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE, diff --git a/location/manager/location-gps.c b/location/manager/location-gps.c index d493dfe..9ef335d 100644 --- a/location/manager/location-gps.c +++ b/location/manager/location-gps.c @@ -95,12 +95,12 @@ enum { static guint32 signals[LAST_SIGNAL] = {0, }; static GParamSpec *properties[PROP_MAX] = {NULL, }; -#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), LOCATION_TYPE_GPS, LocationGpsPrivate)) +#define GET_PRIVATE(o) (location_gps_get_instance_private((LocationGps *)(o))) static void location_ielement_interface_init(LocationIElementInterface *iface); static int location_gps_cancel_single_location(LocationGps *self); -G_DEFINE_TYPE_WITH_CODE(LocationGps, location_gps, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE(LocationGps, location_gps, G_TYPE_OBJECT,G_ADD_PRIVATE(LocationGps) G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); static void @@ -1216,8 +1216,6 @@ location_gps_class_init(LocationGpsClass *klass) gobject_class->dispose = location_gps_dispose; gobject_class->finalize = location_gps_finalize; - g_type_class_add_private(klass, sizeof(LocationGpsPrivate)); - signals[SERVICE_ENABLED] = g_signal_new("service-enabled", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE, diff --git a/location/manager/location-hybrid.c b/location/manager/location-hybrid.c index 146038b..dee8bc9 100644 --- a/location/manager/location-hybrid.c +++ b/location/manager/location-hybrid.c @@ -82,11 +82,11 @@ enum { static guint32 signals[LAST_SIGNAL] = {0, }; static GParamSpec *properties[PROP_MAX] = {NULL, }; -#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), LOCATION_TYPE_HYBRID, LocationHybridPrivate)) +#define GET_PRIVATE(o) (location_hybrid_get_instance_private((LocationHybrid *)(o))) static void location_ielement_interface_init(LocationIElementInterface *iface); -G_DEFINE_TYPE_WITH_CODE(LocationHybrid, location_hybrid, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); +G_DEFINE_TYPE_WITH_CODE(LocationHybrid, location_hybrid, G_TYPE_OBJECT, G_ADD_PRIVATE(LocationHybrid)G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); static int __get_availability_use_location(gpointer self) @@ -1213,8 +1213,6 @@ location_hybrid_class_init(LocationHybridClass *klass) gobject_class->dispose = location_hybrid_dispose; gobject_class->finalize = location_hybrid_finalize; - g_type_class_add_private(klass, sizeof(LocationHybridPrivate)); - signals[SERVICE_ENABLED] = g_signal_new("service-enabled", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE, diff --git a/location/manager/location-passive.c b/location/manager/location-passive.c index e666e3e..8e6e0d8 100644 --- a/location/manager/location-passive.c +++ b/location/manager/location-passive.c @@ -80,11 +80,11 @@ enum { static guint32 signals[LAST_SIGNAL] = {0, }; static GParamSpec *properties[PROP_MAX] = {NULL, }; -#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), LOCATION_TYPE_PASSIVE, LocationPassivePrivate)) +#define GET_PRIVATE(o) (location_passive_get_instance_private((LocationPassive *)(o))) static void location_ielement_interface_init(LocationIElementInterface *iface); -G_DEFINE_TYPE_WITH_CODE(LocationPassive, location_passive, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE(LocationPassive, location_passive, G_TYPE_OBJECT,G_ADD_PRIVATE(LocationPassive) G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); static void @@ -742,8 +742,6 @@ location_passive_class_init(LocationPassiveClass *klass) gobject_class->dispose = location_passive_dispose; gobject_class->finalize = location_passive_finalize; - g_type_class_add_private(klass, sizeof(LocationPassivePrivate)); - signals[SERVICE_ENABLED] = g_signal_new("service-enabled", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE, diff --git a/location/manager/location-wps.c b/location/manager/location-wps.c index 7962ecb..f9a1da7 100644 --- a/location/manager/location-wps.c +++ b/location/manager/location-wps.c @@ -80,12 +80,12 @@ enum { static guint32 signals[LAST_SIGNAL] = {0, }; static GParamSpec *properties[PROP_MAX] = {NULL, }; -#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), LOCATION_TYPE_WPS, LocationWpsPrivate)) +#define GET_PRIVATE(o) (location_wps_get_instance_private((LocationWps *)(o))) static void location_ielement_interface_init(LocationIElementInterface *iface); static int location_wps_cancel_single_location(LocationWps *self); -G_DEFINE_TYPE_WITH_CODE(LocationWps, location_wps, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE(LocationWps, location_wps, G_TYPE_OBJECT,G_ADD_PRIVATE(LocationWps) G_IMPLEMENT_INTERFACE(LOCATION_TYPE_IELEMENT, location_ielement_interface_init)); static void @@ -860,8 +860,6 @@ location_wps_class_init(LocationWpsClass *klass) gobject_class->dispose = location_wps_dispose; gobject_class->finalize = location_wps_finalize; - g_type_class_add_private(klass, sizeof(LocationWpsPrivate)); - signals[SERVICE_ENABLED] = g_signal_new("service-enabled", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE, -- 2.7.4