diff options
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | src/Makefile.am | 12 | ||||
-rw-r--r-- | src/mm-generic-gsm.c | 33 | ||||
-rw-r--r-- | src/mm-generic-gsm.h | 2 |
4 files changed, 4 insertions, 57 deletions
diff --git a/configure.ac b/configure.ac index af4bd094..4f8b94f9 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) IT_PROG_INTLTOOL([0.35.0]) AM_GLIB_GNU_GETTEXT -PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.75 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0) +PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.86 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0) PKG_CHECK_MODULES(GUDEV, gudev-1.0) AC_SUBST(GUDEV_CFLAGS) @@ -126,18 +126,6 @@ NM_COMPILER_WARNINGS dnl -dnl dbus-glib >= 0.86 is required for Location API support -dnl -with_location_api=no -PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.86, with_location_api="yes", with_location_api="no") -if test x"$with_location_api" = xyes; then - AC_DEFINE(LOCATION_API, 1, [Define if you have dbus-glib 0.86 or higher]) -else - AC_MSG_WARN([dbus-glib >= 0.86 is required for Location API support]) -fi -AM_CONDITIONAL(WITH_LOCATION_API, test "x$with_location_api" = "xyes") - -dnl dnl Distribution version string dnl AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="") diff --git a/src/Makefile.am b/src/Makefile.am index a8636676..268b29df 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -78,10 +78,6 @@ auth_sources += \ mm-auth-provider-polkit.h endif -loc_sources = \ - mm-modem-location.c \ - mm-modem-location.h - modem_manager_SOURCES = \ main.c \ mm-callback-info.c \ @@ -117,7 +113,9 @@ modem_manager_SOURCES = \ mm-plugin-base.c \ mm-plugin-base.h \ mm-properties-changed-signal.c \ - mm-properties-changed-signal.h + mm-properties-changed-signal.h \ + mm-modem-location.c \ + mm-modem-location.h mm-manager-glue.h: $(top_srcdir)/introspection/mm-manager.xml $(AM_V_GEN) dbus-binding-tool --prefix=mm_manager --mode=glib-server --output=$@ $< @@ -149,15 +147,11 @@ BUILT_SOURCES = \ mm-modem-gsm-network-glue.h \ mm-modem-gsm-sms-glue.h -if WITH_LOCATION_API mm-modem-location-glue.h: $(top_srcdir)/introspection/mm-modem-location.xml $(AM_V_GEN) dbus-binding-tool --prefix=mm_modem_location --mode=glib-server --output=$@ $< modem_manager_SOURCES += $(loc_sources) BUILT_SOURCES += mm-modem-location-glue.h -else -EXTRA_DIST += $(loc_sources) -endif CLEANFILES = $(BUILT_SOURCES) diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c index db2164c8..2ffa8cfc 100644 --- a/src/mm-generic-gsm.c +++ b/src/mm-generic-gsm.c @@ -35,27 +35,21 @@ #include "mm-options.h" #include "mm-properties-changed-signal.h" #include "mm-utils.h" -#if LOCATION_API #include "mm-modem-location.h" -#endif static void modem_init (MMModem *modem_class); static void modem_gsm_card_init (MMModemGsmCard *gsm_card_class); static void modem_gsm_network_init (MMModemGsmNetwork *gsm_network_class); static void modem_gsm_sms_init (MMModemGsmSms *gsm_sms_class); static void modem_simple_init (MMModemSimple *class); -#if LOCATION_API static void modem_location_init (MMModemLocation *class); -#endif G_DEFINE_TYPE_EXTENDED (MMGenericGsm, mm_generic_gsm, MM_TYPE_MODEM_BASE, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM, modem_init) G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_GSM_CARD, modem_gsm_card_init) G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_GSM_NETWORK, modem_gsm_network_init) G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_GSM_SMS, modem_gsm_sms_init) -#if LOCATION_API G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_LOCATION, modem_location_init) -#endif G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_SIMPLE, modem_simple_init)) #define MM_GENERIC_GSM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MM_TYPE_GENERIC_GSM, MMGenericGsmPrivate)) @@ -905,7 +899,6 @@ release_port (MMModem *modem, const char *subsys, const char *name) check_valid (MM_GENERIC_GSM (modem)); } -#if LOCATION_API static void add_loc_capability (MMGenericGsm *self, guint32 cap) { @@ -917,7 +910,6 @@ add_loc_capability (MMGenericGsm *self, guint32 cap) g_object_notify (G_OBJECT (self), MM_MODEM_LOCATION_CAPABILITIES); } } -#endif static void reg_poll_response (MMAtSerialPort *port, @@ -1016,9 +1008,7 @@ cgreg2_done (MMAtSerialPort *port, /* Try CGREG=1 instead */ mm_at_serial_port_queue_command (port, "+CGREG=1", 3, cgreg1_done, info); } else { -#if LOCATION_API add_loc_capability (MM_GENERIC_GSM (info->modem), MM_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI); -#endif /* Success; get initial state */ mm_at_serial_port_queue_command (port, "+CGREG?", 10, reg_poll_response, info->modem); @@ -1076,9 +1066,7 @@ creg2_done (MMAtSerialPort *port, g_clear_error (&info->error); mm_at_serial_port_queue_command (port, "+CREG=1", 3, creg1_done, info); } else { -#if LOCATION_API add_loc_capability (MM_GENERIC_GSM (info->modem), MM_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI); -#endif /* Success; get initial state */ mm_at_serial_port_queue_command (port, "+CREG?", 10, reg_poll_response, info->modem); @@ -4094,7 +4082,6 @@ simple_get_status (MMModemSimple *simple, /*****************************************************************************/ -#if LOCATION_API static gboolean gsm_lac_ci_available (MMGenericGsm *self, guint32 *out_idx) { @@ -4119,7 +4106,6 @@ gsm_lac_ci_available (MMGenericGsm *self, guint32 *out_idx) return TRUE; } -#endif static void update_lac_ci (MMGenericGsm *self, gulong lac, gulong ci, guint idx) @@ -4137,15 +4123,10 @@ update_lac_ci (MMGenericGsm *self, gulong lac, gulong ci, guint idx) changed = TRUE; } -#if LOCATION_API if (changed && gsm_lac_ci_available (self, NULL) && priv->loc_enabled && priv->loc_signal) g_object_notify (G_OBJECT (self), MM_MODEM_LOCATION_LOCATION); -#endif } - -#if LOCATION_API - static void destroy_gvalue (gpointer data) { @@ -4252,8 +4233,6 @@ location_get (MMModemLocation *modem, g_clear_error (&error); } -#endif /* LOCATION_API */ - /*****************************************************************************/ static void @@ -4292,14 +4271,12 @@ modem_init (MMModem *modem_class) modem_class->set_charset = set_charset; } -#if LOCATION_API static void modem_location_init (MMModemLocation *class) { class->enable = location_enable; class->get_location = location_get; } -#endif static void modem_gsm_card_init (MMModemGsmCard *class) @@ -4357,7 +4334,6 @@ mm_generic_gsm_init (MMGenericGsm *self) NULL, MM_MODEM_GSM_NETWORK_DBUS_INTERFACE); -#if LOCATION_API mm_properties_changed_signal_register_property (G_OBJECT (self), MM_MODEM_LOCATION_CAPABILITIES, "Capabilities", @@ -4377,7 +4353,6 @@ mm_generic_gsm_init (MMGenericGsm *self) MM_MODEM_LOCATION_LOCATION, NULL, MM_MODEM_LOCATION_DBUS_INTERFACE); -#endif g_signal_connect (self, "notify::" MM_MODEM_STATE, G_CALLBACK (modem_state_changed), NULL); @@ -4398,12 +4373,10 @@ set_property (GObject *object, guint prop_id, case MM_GENERIC_GSM_PROP_ALLOWED_MODE: case MM_GENERIC_GSM_PROP_ACCESS_TECHNOLOGY: case MM_GENERIC_GSM_PROP_SIM_IDENTIFIER: -#if LOCATION_API case MM_GENERIC_GSM_PROP_LOC_CAPABILITIES: case MM_GENERIC_GSM_PROP_LOC_ENABLED: case MM_GENERIC_GSM_PROP_LOC_SIGNAL: case MM_GENERIC_GSM_PROP_LOC_LOCATION: -#endif break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -4416,9 +4389,7 @@ get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { MMGenericGsmPrivate *priv = MM_GENERIC_GSM_GET_PRIVATE (object); -#if LOCATION_API GHashTable *locations = NULL; -#endif switch (prop_id) { case MM_MODEM_PROP_DATA_DEVICE: @@ -4467,7 +4438,6 @@ get_property (GObject *object, guint prop_id, case MM_GENERIC_GSM_PROP_SIM_IDENTIFIER: g_value_set_string (value, priv->simid); break; -#if LOCATION_API case MM_GENERIC_GSM_PROP_LOC_CAPABILITIES: g_value_set_uint (value, priv->loc_caps); break; @@ -4487,7 +4457,6 @@ get_property (GObject *object, guint prop_id, locations = g_hash_table_new (g_direct_hash, g_direct_equal); g_value_take_boxed (value, locations); break; -#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -4572,7 +4541,6 @@ mm_generic_gsm_class_init (MMGenericGsmClass *klass) MM_GENERIC_GSM_PROP_SIM_IDENTIFIER, MM_MODEM_GSM_CARD_SIM_IDENTIFIER); -#if LOCATION_API g_object_class_override_property (object_class, MM_GENERIC_GSM_PROP_LOC_CAPABILITIES, MM_MODEM_LOCATION_CAPABILITIES); @@ -4588,7 +4556,6 @@ mm_generic_gsm_class_init (MMGenericGsmClass *klass) g_object_class_override_property (object_class, MM_GENERIC_GSM_PROP_LOC_LOCATION, MM_MODEM_LOCATION_LOCATION); -#endif g_object_class_install_property (object_class, MM_GENERIC_GSM_PROP_POWER_UP_CMD, diff --git a/src/mm-generic-gsm.h b/src/mm-generic-gsm.h index 175cf9a0..c6836efa 100644 --- a/src/mm-generic-gsm.h +++ b/src/mm-generic-gsm.h @@ -49,12 +49,10 @@ typedef enum { MM_GENERIC_GSM_PROP_INIT_CMD_OPTIONAL, MM_GENERIC_GSM_PROP_ALLOWED_MODE, MM_GENERIC_GSM_PROP_ACCESS_TECHNOLOGY, -#if LOCATION_API MM_GENERIC_GSM_PROP_LOC_CAPABILITIES, MM_GENERIC_GSM_PROP_LOC_ENABLED, MM_GENERIC_GSM_PROP_LOC_SIGNAL, MM_GENERIC_GSM_PROP_LOC_LOCATION, -#endif MM_GENERIC_GSM_PROP_SIM_IDENTIFIER, } MMGenericGsmProp; |