diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-28 22:34:00 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-28 22:34:00 +0200 |
commit | b382302ef64281329127066253eeeb4aa5736544 (patch) | |
tree | 7937d26b31796b6359183af8379c2151986b5383 | |
parent | 62aca53beb6294cd874bfeb303c1ca8e46154a6b (diff) | |
download | ModemManager-aleksander/deprecated-subscription-state.tar.gz |
api: deprecate SubscriptionState propertyaleksander/deprecated-subscription-state
-rw-r--r-- | introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml | 4 | ||||
-rw-r--r-- | libmm-glib/mm-modem-3gpp.c | 12 | ||||
-rw-r--r-- | libmm-glib/mm-modem-3gpp.h | 5 | ||||
-rw-r--r-- | plugins/altair/mm-broadband-modem-altair-lte.c | 287 | ||||
-rw-r--r-- | src/mm-broadband-modem.c | 33 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 81 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.h | 8 |
7 files changed, 17 insertions, 413 deletions
diff --git a/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml b/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml index 1aaba4c09..af00458e8 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml @@ -152,6 +152,10 @@ A <link linkend="MMModem3gppSubscriptionState">MMModem3gppSubscriptionState</link> value representing the subscription status of the account and whether there is any data remaining, given as an unsigned integer (signature <literal>"u"</literal>). + + Deprecated: 1.10.0. The value of this property can only be obtained with operator + specific logic (e.g. processing specific PCO info), and therefore it doesn't make sense + to expose it in the ModemManager interface. --> <property name="SubscriptionState" type="u" access="read" /> diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c index 69edc276d..d3f930da7 100644 --- a/libmm-glib/mm-modem-3gpp.c +++ b/libmm-glib/mm-modem-3gpp.c @@ -252,14 +252,20 @@ mm_modem_3gpp_get_registration_state (MMModem3gpp *self) * Get the current subscription status of the account. This value is only * available after the modem attempts to register with the network. * + * The value of this property can only be obtained with operator specific logic (e.g. + * processing specific PCO info), and therefore it doesn't make sense to expose it in + * the ModemManager interface. + * * Returns: A #MMModem3gppSubscriptionState value, specifying the current subscription state. + * + * Deprecated: 1.10.0. The value of this property can only be obtained with operator + * specific logic (e.g. processing specific PCO info), and therefore it doesn't make sense + * to expose it in the ModemManager interface. */ MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state (MMModem3gpp *self) { - g_return_val_if_fail (MM_IS_MODEM_3GPP (self), MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN); - - return mm_gdbus_modem3gpp_get_subscription_state (MM_GDBUS_MODEM3GPP (self)); + return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; } /*****************************************************************************/ diff --git a/libmm-glib/mm-modem-3gpp.h b/libmm-glib/mm-modem-3gpp.h index a3b37f08b..0ff295feb 100644 --- a/libmm-glib/mm-modem-3gpp.h +++ b/libmm-glib/mm-modem-3gpp.h @@ -76,7 +76,6 @@ const gchar *mm_modem_3gpp_get_operator_name (MMModem3gpp *self); gchar *mm_modem_3gpp_dup_operator_name (MMModem3gpp *self); MMModem3gppRegistrationState mm_modem_3gpp_get_registration_state (MMModem3gpp *self); -MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state (MMModem3gpp *self); MMModem3gppFacility mm_modem_3gpp_get_enabled_facility_locks (MMModem3gpp *self); @@ -134,6 +133,10 @@ gboolean mm_modem_3gpp_set_eps_ue_mode_operation_sync (MMModem3gpp GCancellable *cancellable, GError **error); +/* Deprecated APIs */ +G_DEPRECATED +MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state (MMModem3gpp *self); + G_END_DECLS #endif /* _MM_MODEM_3GPP_H_ */ diff --git a/plugins/altair/mm-broadband-modem-altair-lte.c b/plugins/altair/mm-broadband-modem-altair-lte.c index 8f66b7feb..ca240363a 100644 --- a/plugins/altair/mm-broadband-modem-altair-lte.c +++ b/plugins/altair/mm-broadband-modem-altair-lte.c @@ -65,8 +65,6 @@ struct _MMBroadbandModemAltairLtePrivate { gboolean sim_refresh_detach_in_progress; /* Regex for bearer related notifications */ GRegex *statcm_regex; - /* Regex for PCO notifications */ - GRegex *pcoinfo_regex; }; static MMIfaceModem3gpp *iface_modem_3gpp_parent; @@ -403,110 +401,6 @@ reset (MMIfaceModem *self, } /*****************************************************************************/ -/* Run registration checks (3GPP interface) */ - -static gboolean -modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) -{ - return g_task_propagate_boolean (G_TASK (res), error); -} - -static void -run_registration_checks_subscription_state_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) -{ - GError *error = NULL; - const gchar *at_response; - gchar *ceer_response; - - /* If the AT+CEER command fails, or we fail to obtain a valid result, we - * ignore the error. This allows the registration attempt to continue. - * So, the async response from this function is *always* True. - */ - - at_response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); - if (!at_response) { - g_assert (error); - mm_warn ("AT+CEER failed: %s", error->message); - g_error_free (error); - g_task_return_boolean (task, TRUE); - g_object_unref (task); - return; - } - - ceer_response = mm_altair_parse_ceer_response (at_response, &error); - if (!ceer_response) { - g_assert (error); - mm_warn ("Failed to parse AT+CEER response: %s", error->message); - g_error_free (error); - g_task_return_boolean (task, TRUE); - g_object_unref (task); - return; - } - - if (g_strcmp0 ("EPS_AND_NON_EPS_SERVICES_NOT_ALLOWED", ceer_response) == 0) { - mm_dbg ("Registration failed due to unprovisioned SIM."); - mm_iface_modem_3gpp_update_subscription_state (self, MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNPROVISIONED); - } else { - mm_dbg ("Failed to find a better reason for registration failure."); - } - - g_task_return_boolean (task, TRUE); - g_object_unref (task); - g_free (ceer_response); -} - -static void -run_registration_checks_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) -{ - GError *error = NULL; - gboolean success; - - g_assert (iface_modem_3gpp_parent->run_registration_checks_finish); - success = iface_modem_3gpp_parent->run_registration_checks_finish (self, res, &error); - if (!success) { - g_assert (error); - g_task_return_error (task, error); - g_object_unref (task); - return; - } - - mm_dbg ("Checking if SIM is unprovisioned (ignoring registration state)."); - mm_base_modem_at_command (MM_BASE_MODEM (self), - "+CEER", - 6, - FALSE, - (GAsyncReadyCallback) run_registration_checks_subscription_state_ready, - task); -} - -static void -modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GTask *task; - - task = g_task_new (self, NULL, callback, user_data); - - g_assert (iface_modem_3gpp_parent->run_registration_checks); - iface_modem_3gpp_parent->run_registration_checks (self, - cs_supported, - ps_supported, - eps_supported, - (GAsyncReadyCallback) run_registration_checks_ready, - task); -} - -/*****************************************************************************/ /* Register in network (3GPP interface) */ static gboolean @@ -716,11 +610,6 @@ altair_statcm_changed (MMPortSerialAt *port, /* Setup/Cleanup unsolicited events (3GPP interface) */ static void -altair_pco_info_changed (MMPortSerialAt *port, - GMatchInfo *match_info, - MMBroadbandModemAltairLte *self); - -static void set_3gpp_unsolicited_events_handlers (MMBroadbandModemAltairLte *self, gboolean enable) { @@ -750,14 +639,6 @@ set_3gpp_unsolicited_events_handlers (MMBroadbandModemAltairLte *self, enable ? (MMPortSerialAtUnsolicitedMsgFn)altair_statcm_changed : NULL, enable ? self : NULL, NULL); - - /* PCO info handler */ - mm_port_serial_at_add_unsolicited_msg_handler ( - ports[i], - self->priv->pcoinfo_regex, - enable ? (MMPortSerialAtUnsolicitedMsgFn)altair_pco_info_changed : NULL, - enable ? self : NULL, - NULL); } } @@ -860,7 +741,6 @@ response_processor_no_result_stop_on_error (MMBaseModem *self, static const MMBaseModemAtCommand unsolicited_events_enable_sequence[] = { { "%STATCM=1", 10, FALSE, response_processor_no_result_stop_on_error }, { "%NOTIFYEV=\"SIMREFRESH\",1", 10, FALSE, NULL }, - { "%PCOINFO=1", 10, FALSE, NULL }, { NULL } }; @@ -932,7 +812,6 @@ modem_3gpp_enable_unsolicited_events (MMIfaceModem3gpp *self, static const MMBaseModemAtCommand unsolicited_events_disable_sequence[] = { { "%STATCM=0", 10, FALSE, NULL }, { "%NOTIFYEV=\"SIMREFRESH\",0", 10, FALSE, NULL }, - { "%PCOINFO=0", 10, FALSE, NULL }, { NULL } }; @@ -1099,164 +978,6 @@ modem_3gpp_load_operator_name (MMIfaceModem3gpp *self, } /*****************************************************************************/ -/* Subscription State loading (3GPP interface) */ - -typedef struct { - gchar *pco_info; -} LoadSubscriptionStateContext; - -static void -load_subscription_state_context_free (LoadSubscriptionStateContext *ctx) -{ - g_free (ctx->pco_info); - g_slice_free (LoadSubscriptionStateContext, ctx); -} - -static MMModem3gppSubscriptionState -altair_vzw_pco_value_to_mm_modem_3gpp_subscription_state (guint pco_value) -{ - switch (pco_value) { - case 0: - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_PROVISIONED; - case 3: - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_OUT_OF_DATA; - case 5: - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNPROVISIONED; - default: - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; - } -} - -static MMModem3gppSubscriptionState -modem_3gpp_load_subscription_state_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) -{ - GError *inner_error = NULL; - gssize value; - - value = g_task_propagate_int (G_TASK (res), &inner_error); - if (inner_error) { - g_propagate_error (error, inner_error); - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; - } - return (MMModem3gppSubscriptionState)value; -} - -static void -altair_get_subscription_state (MMIfaceModem3gpp *self, - GTask *task) -{ - LoadSubscriptionStateContext *ctx; - guint pco_value = -1; - GError *error = NULL; - MMModem3gppSubscriptionState subscription_state; - - ctx = g_task_get_task_data (task); - - mm_dbg ("Parsing vendor PCO info: %s", ctx->pco_info); - pco_value = mm_altair_parse_vendor_pco_info (ctx->pco_info, &error); - if (error) { - g_task_return_error (task, error); - g_object_unref (task); - return; - } - mm_dbg ("PCO value = %d", pco_value); - - subscription_state = altair_vzw_pco_value_to_mm_modem_3gpp_subscription_state (pco_value); - g_task_return_int (task, subscription_state); - g_object_unref (task); -} - -static void -altair_load_vendor_pco_info_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) -{ - LoadSubscriptionStateContext *ctx; - const gchar *response; - GError *error = NULL; - - response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); - if (error) { - mm_dbg ("Failed to load vendor PCO info."); - g_task_return_error (task, error); - g_object_unref (task); - return; - } - g_assert (response); - ctx = g_task_get_task_data (task); - ctx->pco_info = g_strdup (response); - altair_get_subscription_state (self, task); -} - -static void -modem_3gpp_load_subscription_state (MMIfaceModem3gpp *self, - GAsyncReadyCallback callback, - gpointer user_data) -{ - LoadSubscriptionStateContext *ctx; - GTask *task; - - ctx = g_slice_new0 (LoadSubscriptionStateContext); - - task = g_task_new (self, NULL, callback, user_data); - g_task_set_task_data (task, ctx, (GDestroyNotify)load_subscription_state_context_free); - - mm_dbg ("Loading vendor PCO info..."); - mm_base_modem_at_command (MM_BASE_MODEM (self), - "%PCOINFO?", - 6, - FALSE, - (GAsyncReadyCallback)altair_load_vendor_pco_info_ready, - task); -} - -/*****************************************************************************/ -/* PCOINFO unsolicited event handler */ - -static void -altair_get_subscription_state_ready (MMBroadbandModemAltairLte *self, - GAsyncResult *res, - gpointer *user_data) -{ - GError *error = NULL; - MMModem3gppSubscriptionState subscription_state; - - subscription_state = (MMModem3gppSubscriptionState)g_task_propagate_int (G_TASK (res), &error); - if (error) { - mm_warn ("Couldn't load Subscription State: '%s'", error->message); - g_error_free (error); - return; - } - - if (subscription_state != MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN) - mm_iface_modem_3gpp_update_subscription_state (MM_IFACE_MODEM_3GPP (self), subscription_state); -} - -static void -altair_pco_info_changed (MMPortSerialAt *port, - GMatchInfo *match_info, - MMBroadbandModemAltairLte *self) -{ - LoadSubscriptionStateContext *ctx; - const gchar *response; - GTask *task; - - ctx = g_slice_new0 (LoadSubscriptionStateContext); - response = g_match_info_fetch (match_info, 0); - ctx->pco_info = g_strdup (response); - - task = g_task_new (self, - NULL, - (GAsyncReadyCallback)altair_get_subscription_state_ready, - NULL); - g_task_set_task_data (task, ctx, (GDestroyNotify)load_subscription_state_context_free); - - altair_get_subscription_state (MM_IFACE_MODEM_3GPP (self), task); -} - -/*****************************************************************************/ /* Generic ports open/close context */ static const gchar *primary_init_sequence[] = { @@ -1318,7 +1039,6 @@ mm_broadband_modem_altair_lte_is_sim_refresh_detach_in_progress (MMBroadbandMode static void mm_broadband_modem_altair_lte_init (MMBroadbandModemAltairLte *self) { - /* Initialize private data */ self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), MM_TYPE_BROADBAND_MODEM_ALTAIR_LTE, @@ -1330,8 +1050,6 @@ mm_broadband_modem_altair_lte_init (MMBroadbandModemAltairLte *self) self->priv->sim_refresh_timer_id = 0; self->priv->statcm_regex = g_regex_new ("\\r\\n\\%STATCM:\\s*(\\d*),?(\\d*)\\r+\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - self->priv->pcoinfo_regex = g_regex_new ("\\r\\n\\%PCOINFO:\\s*(\\d*),([^,\\s]*),([^,\\s]*)\\r+\\n", - G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); } static void @@ -1343,7 +1061,6 @@ finalize (GObject *object) g_source_remove (self->priv->sim_refresh_timer_id); g_regex_unref (self->priv->sim_refresh_regex); g_regex_unref (self->priv->statcm_regex); - g_regex_unref (self->priv->pcoinfo_regex); G_OBJECT_CLASS (mm_broadband_modem_altair_lte_parent_class)->finalize (object); } @@ -1401,8 +1118,6 @@ iface_modem_3gpp_init (MMIfaceModem3gpp *iface) iface->register_in_network = modem_3gpp_register_in_network; iface->register_in_network_finish = modem_3gpp_register_in_network_finish; - iface->run_registration_checks = modem_3gpp_run_registration_checks; - iface->run_registration_checks_finish = modem_3gpp_run_registration_checks_finish; /* Scanning is not currently supported */ iface->scan_networks = NULL; @@ -1413,8 +1128,6 @@ iface_modem_3gpp_init (MMIfaceModem3gpp *iface) iface->load_operator_code_finish = modem_3gpp_load_operator_code_finish; iface->load_operator_name = modem_3gpp_load_operator_name; iface->load_operator_name_finish = modem_3gpp_load_operator_name_finish; - iface->load_subscription_state = modem_3gpp_load_subscription_state; - iface->load_subscription_state_finish = modem_3gpp_load_subscription_state_finish; } static void diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 7337fe673..28de6f441 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -3899,37 +3899,6 @@ modem_3gpp_load_operator_name (MMIfaceModem3gpp *self, } /*****************************************************************************/ -/* Subscription State Loading (3GPP interface) */ - -static MMModem3gppSubscriptionState -modem_3gpp_load_subscription_state_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) -{ - GError *inner_error = NULL; - gssize value; - - value = g_task_propagate_int (G_TASK (res), &inner_error); - if (inner_error) { - g_propagate_error (error, inner_error); - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; - } - return (MMModem3gppSubscriptionState)value; -} - -static void -modem_3gpp_load_subscription_state (MMIfaceModem3gpp *self, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GTask *task; - - task = g_task_new (self, NULL, callback, user_data); - g_task_return_int (task, MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN); - g_object_unref (task); -} - -/*****************************************************************************/ /* UE mode of operation for EPS loading (3GPP interface) */ static MMModem3gppEpsUeModeOperation @@ -11111,8 +11080,6 @@ iface_modem_3gpp_init (MMIfaceModem3gpp *iface) iface->load_operator_code_finish = modem_3gpp_load_operator_code_finish; iface->load_operator_name = modem_3gpp_load_operator_name; iface->load_operator_name_finish = modem_3gpp_load_operator_name_finish; - iface->load_subscription_state = modem_3gpp_load_subscription_state; - iface->load_subscription_state_finish = modem_3gpp_load_subscription_state_finish; iface->run_registration_checks = modem_3gpp_run_registration_checks; iface->run_registration_checks_finish = modem_3gpp_run_registration_checks_finish; iface->register_in_network = modem_3gpp_register_in_network; diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 4e19815d2..facde7673 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -64,10 +64,6 @@ mm_iface_modem_3gpp_bind_simple_status (MMIfaceModem3gpp *self, status, MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME, G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); - g_object_bind_property (skeleton, "subscription-state", - status, MM_SIMPLE_PROPERTY_3GPP_SUBSCRIPTION_STATE, - G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); - g_object_unref (skeleton); } @@ -962,7 +958,6 @@ typedef struct { MmGdbusModem3gpp *skeleton; gboolean operator_code_loaded; gboolean operator_name_loaded; - gboolean subscription_state_loaded; } ReloadCurrentRegistrationInfoContext; static void @@ -1044,31 +1039,6 @@ load_operator_code_ready (MMIfaceModem3gpp *self, } static void -load_subscription_state_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) -{ - ReloadCurrentRegistrationInfoContext *ctx; - GError *error = NULL; - MMModem3gppSubscriptionState subscription_state = MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; - - ctx = g_task_get_task_data (task); - - subscription_state = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_subscription_state_finish (self, res, &error); - if (error) { - mm_warn ("Couldn't load Subscription State: '%s'", error->message); - g_error_free (error); - } - - if (ctx->skeleton) - mm_gdbus_modem3gpp_set_subscription_state (ctx->skeleton, subscription_state); - - ctx->subscription_state_loaded = TRUE; - reload_current_registration_info_context_step (task); -} - - -static void reload_current_registration_info_context_step (GTask *task) { MMIfaceModem3gpp *self; @@ -1095,15 +1065,6 @@ reload_current_registration_info_context_step (GTask *task) return; } - if (!ctx->subscription_state_loaded) { - /* Launch subscription state update */ - MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_subscription_state ( - self, - (GAsyncReadyCallback)load_subscription_state_ready, - task); - return; - } - /* If all are loaded, all done */ g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -1147,11 +1108,6 @@ mm_iface_modem_3gpp_reload_current_registration_info (MMIfaceModem3gpp *self, if (ctx->operator_name_loaded) mm_gdbus_modem3gpp_set_operator_name (ctx->skeleton, NULL); - ctx->subscription_state_loaded = !(MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_subscription_state && - MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_subscription_state_finish); - if (ctx->subscription_state_loaded) - mm_gdbus_modem3gpp_set_subscription_state (ctx->skeleton, MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN); - reload_current_registration_info_context_step (task); } @@ -1172,19 +1128,6 @@ mm_iface_modem_3gpp_clear_current_operator (MMIfaceModem3gpp *self) mm_iface_modem_location_3gpp_update_mcc_mnc (MM_IFACE_MODEM_LOCATION (self), 0, 0); } -static void -clear_subscription_state (MMIfaceModem3gpp *self) -{ - MmGdbusModem3gpp *skeleton = NULL; - - g_object_get (self, - MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &skeleton, - NULL); - if (!skeleton) - return; - mm_gdbus_modem3gpp_set_subscription_state (skeleton, MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN); -} - /*****************************************************************************/ void @@ -1284,13 +1227,6 @@ update_non_registered_state (MMIfaceModem3gpp *self, /* Not registered neither in home nor roaming network */ mm_iface_modem_3gpp_clear_current_operator (self); - /* The subscription state can be computed in two ways: a) via PCO which is - * sent by the carrier during registration or b) by looking at the - * registration reject error code. If b), we want to make sure we - * preserve the subscription state */ - if (reg_state_is_registered (old_state)) - clear_subscription_state (self); - /* The property in the interface is bound to the property * in the skeleton, so just updating here is enough */ g_object_set (self, @@ -1427,22 +1363,6 @@ mm_iface_modem_3gpp_update_eps_registration_state (MMIfaceModem3gpp *self, update_registration_state (self, get_consolidated_reg_state (ctx), TRUE); } -void -mm_iface_modem_3gpp_update_subscription_state (MMIfaceModem3gpp *self, - MMModem3gppSubscriptionState state) -{ - MmGdbusModem3gpp *skeleton = NULL; - - g_object_get (self, - MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &skeleton, - NULL); - if (skeleton) { - mm_dbg ("Setting subscription state to: %s", mm_modem_3gpp_subscription_state_get_string (state)); - mm_gdbus_modem3gpp_set_subscription_state (skeleton, state); - g_object_unref (skeleton); - } -} - /*****************************************************************************/ typedef struct { @@ -2239,7 +2159,6 @@ mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self, mm_gdbus_modem3gpp_set_operator_code (skeleton, NULL); mm_gdbus_modem3gpp_set_operator_name (skeleton, NULL); mm_gdbus_modem3gpp_set_enabled_facility_locks (skeleton, MM_MODEM_3GPP_FACILITY_NONE); - mm_gdbus_modem3gpp_set_subscription_state (skeleton, MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN); /* Bind our RegistrationState property */ g_object_bind_property (self, MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h index 7b6d47e10..e32e8e2e0 100644 --- a/src/mm-iface-modem-3gpp.h +++ b/src/mm-iface-modem-3gpp.h @@ -184,14 +184,6 @@ struct _MMIfaceModem3gpp { GAsyncResult *res, GError **error); - /* Loading of the subscription state property */ - void (*load_subscription_state) (MMIfaceModem3gpp *self, - GAsyncReadyCallback callback, - gpointer user_data); - MMModem3gppSubscriptionState (*load_subscription_state_finish) (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error); - /* Scan current networks, expect a GList of MMModem3gppNetworkInfo */ void (* scan_networks) (MMIfaceModem3gpp *self, GAsyncReadyCallback callback, |