diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2024-04-18 10:55:56 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2024-05-06 13:27:04 +0000 |
commit | 35c0a6905be622a4e938b66c6128d270cebf1bdc (patch) | |
tree | f8be5eb1966da37416620c081e3c1768f7df1b80 /src | |
parent | 9aab129759ce9f9c713b88049a0fb32b43b0adf9 (diff) |
iface-modem: use G_DECLARE|DEFINE_INTERFACE() macros
Diffstat (limited to 'src')
49 files changed, 549 insertions, 575 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 0f2f8491..30145eb9 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -51,7 +51,7 @@ # include "mm-shared-qmi.h" #endif -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); @@ -67,7 +67,7 @@ static void shared_qmi_init (MMSharedQmi static MMIfaceModemLocation *iface_modem_location_parent; #endif static MMIfaceModemSignal *iface_modem_signal_parent; -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbim, mm_broadband_modem_mbim, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -10048,7 +10048,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); /* Initialization steps */ diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 6c0add38..ac1e1195 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -53,19 +53,19 @@ #include "mm-call-qmi.h" #include "mm-call-list.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); -static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); -static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_oma_init (MMIfaceModemOma *iface); -static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); -static void iface_modem_sar_init (MMIfaceModemSar *iface); -static void iface_modem_signal_init (MMIfaceModemSignal *iface); -static void shared_qmi_init (MMSharedQmi *iface); +static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_oma_init (MMIfaceModemOma *iface); +static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); +static void iface_modem_sar_init (MMIfaceModemSar *iface); +static void iface_modem_signal_init (MMIfaceModemSignal *iface); +static void shared_qmi_init (MMSharedQmi *iface); static MMIfaceModemLocation *iface_modem_location_parent; static MMIfaceModemMessaging *iface_modem_messaging_parent; @@ -13805,7 +13805,7 @@ dispose (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* Initialization steps */ iface->load_current_capabilities = mm_shared_qmi_load_current_capabilities; diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 424290ff..637fdea5 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -61,20 +61,20 @@ #include "libqcdm/src/log-items.h" #include "mm-helper-enums-types.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); -static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); -static void iface_modem_simple_init (MMIfaceModemSimple *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void iface_modem_signal_init (MMIfaceModemSignal *iface); -static void iface_modem_oma_init (MMIfaceModemOma *iface); -static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); -static void iface_modem_sar_init (MMIfaceModemSar *iface); +static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_simple_init (MMIfaceModemSimple *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void iface_modem_signal_init (MMIfaceModemSignal *iface); +static void iface_modem_oma_init (MMIfaceModemOma *iface); +static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); +static void iface_modem_sar_init (MMIfaceModemSar *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModem, mm_broadband_modem, MM_TYPE_BASE_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -4876,8 +4876,8 @@ registration_state_changed (MMPortSerialAt *port, * we fight with the custom commands. Plus CREG/CGREG access technologies * don't have fine-grained distinction between HSxPA or GPRS/EDGE, etc. */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies == modem_load_access_technologies || - MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies == NULL) + if (MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies == modem_load_access_technologies || + MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies == NULL) mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), act); mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cell_id); @@ -13478,7 +13478,7 @@ dispose (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* Initialization steps */ iface->load_current_capabilities = modem_load_current_capabilities; diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 64ee23de..4b2a3553 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -55,6 +55,8 @@ * so this is just to cover that corner case. */ #define POWER_STATE_MIN_TIME_BETWEEN_UPDATES_SEC 2 +G_DEFINE_INTERFACE (MMIfaceModem, mm_iface_modem, MM_TYPE_BASE_MODEM) + /*****************************************************************************/ /* Private data context */ @@ -123,14 +125,14 @@ get_private (MMIfaceModem *self) /* Initially assume supported if load_access_technologies() is * implemented. If the plugin reports an UNSUPPORTED error we'll clear * this flag and no longer poll. */ - priv->access_technology_polling_supported = (MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies_finish); + priv->access_technology_polling_supported = (MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies && + MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies_finish); /* Initially assume supported if load_signal_quality() is * implemented. If the plugin reports an UNSUPPORTED error we'll clear * this flag and no longer poll. */ - priv->signal_quality_polling_supported = (MM_IFACE_MODEM_GET_INTERFACE (self)->load_signal_quality && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_signal_quality_finish); + priv->signal_quality_polling_supported = (MM_IFACE_MODEM_GET_IFACE (self)->load_signal_quality && + MM_IFACE_MODEM_GET_IFACE (self)->load_signal_quality_finish); /* Get plugin-specific setup for the polling logic */ g_object_get (self, @@ -167,7 +169,7 @@ check_basic_sim_details_ready (MMIfaceModem *self, g_autofree gchar *current_imsi = NULL; gboolean sim_inserted; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_basic_sim_details_finish ( + if (!MM_IFACE_MODEM_GET_IFACE (self)->check_basic_sim_details_finish ( self, res, &sim_inserted, ¤t_iccid, ¤t_imsi, &error)) { mm_obj_warn (self, "SIM details check failed: %s", error->message); g_task_return_error (task, error); @@ -215,7 +217,7 @@ explicit_check_for_sim_swap_ready (MMIfaceModem *self, { GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish (self, res, &error)) { mm_obj_warn (self, "SIM swap check failed: %s", error->message); g_task_return_error (task, error); } else { @@ -234,20 +236,20 @@ mm_iface_modem_check_for_sim_swap (MMIfaceModem *self, task = g_task_new (self, NULL, callback, user_data); - if (MM_IFACE_MODEM_GET_INTERFACE (self)->check_basic_sim_details && - MM_IFACE_MODEM_GET_INTERFACE (self)->check_basic_sim_details_finish) { + if (MM_IFACE_MODEM_GET_IFACE (self)->check_basic_sim_details && + MM_IFACE_MODEM_GET_IFACE (self)->check_basic_sim_details_finish) { mm_obj_info (self, "started checking for basic SIM details..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->check_basic_sim_details ( + MM_IFACE_MODEM_GET_IFACE (self)->check_basic_sim_details ( self, (GAsyncReadyCallback)check_basic_sim_details_ready, task); return; } - if (MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap && - MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) { + if (MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap && + MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish) { mm_obj_info (self, "started checking for SIM swap..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap ( + MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap ( self, (GAsyncReadyCallback)explicit_check_for_sim_swap_ready, task); @@ -346,8 +348,8 @@ mm_iface_modem_process_sim_event (MMIfaceModem *self) { mm_obj_info (self, "Processing SIM event"); - if (MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap) - MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap (self); + if (MM_IFACE_MODEM_GET_IFACE (self)->cleanup_sim_hot_swap) + MM_IFACE_MODEM_GET_IFACE (self)->cleanup_sim_hot_swap (self); mm_base_modem_set_reprobe (MM_BASE_MODEM (self), TRUE); mm_base_modem_disable (MM_BASE_MODEM (self), @@ -668,7 +670,7 @@ load_unlock_required_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - lock = MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish (self, res, &error); + lock = MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required_finish (self, res, &error); if (error) { mm_obj_dbg (self, "couldn't check if unlock required: %s", error->message); @@ -757,7 +759,7 @@ internal_load_unlock_required_context_step (GTask *task) g_assert (ctx->cancellable_id == 0); g_assert (ctx->timeout_id == 0); - MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required ( + MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required ( self, (ctx->retries >= ctx->max_retries), /* last_attempt? */ g_task_get_cancellable (task), @@ -792,8 +794,8 @@ internal_load_unlock_required (MMIfaceModem *self, ctx->max_retries = load_unlock_required_max_retries (self); g_task_set_task_data (task, ctx, (GDestroyNotify)internal_load_unlock_required_context_free); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required || - !MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required || + !MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required_finish) { /* Just assume that no lock is required */ g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -937,7 +939,7 @@ create_bearer_ready (MMIfaceModem *self, MMBaseBearer *bearer; GError *error = NULL; - bearer = MM_IFACE_MODEM_GET_INTERFACE (self)->create_bearer_finish (self, res, &error); + bearer = MM_IFACE_MODEM_GET_IFACE (self)->create_bearer_finish (self, res, &error); if (error) { g_task_return_error (task, error); g_object_unref (task); @@ -990,7 +992,7 @@ mm_iface_modem_create_bearer (MMIfaceModem *self, return; } - MM_IFACE_MODEM_GET_INTERFACE (self)->create_bearer ( + MM_IFACE_MODEM_GET_IFACE (self)->create_bearer ( self, properties, (GAsyncReadyCallback)create_bearer_ready, @@ -1122,7 +1124,7 @@ command_ready (MMIfaceModem *self, GError *error = NULL; const gchar *result; - result = MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish (self, res, &error); + result = MM_IFACE_MODEM_GET_IFACE (self)->command_finish (self, res, &error); if (error) { mm_obj_dbg (self, "failed running AT command '%s': %s", ctx->cmd, error->message); mm_dbus_method_invocation_take_error (ctx->invocation, error); @@ -1158,7 +1160,7 @@ handle_command_auth_ready (MMBaseModem *self, #endif /* If command is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->command || !MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->command || !MM_IFACE_MODEM_GET_IFACE (self)->command_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Operation not supported"); handle_command_context_free (ctx); @@ -1166,11 +1168,11 @@ handle_command_auth_ready (MMBaseModem *self, } mm_obj_dbg (self, "processing user request to run AT command '%s'...", ctx->cmd); - MM_IFACE_MODEM_GET_INTERFACE (self)->command (ctx->self, - ctx->cmd, - ctx->timeout, - (GAsyncReadyCallback)command_ready, - ctx); + MM_IFACE_MODEM_GET_IFACE (self)->command (ctx->self, + ctx->cmd, + ctx->timeout, + (GAsyncReadyCallback)command_ready, + ctx); } static gboolean @@ -1360,7 +1362,7 @@ set_primary_sim_slot_ready (MMIfaceModem *self, { g_autoptr(GError) error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_primary_sim_slot_finish (self, res, &error)) { /* If the implementation returns EXISTS, we're already in the requested SIM slot, * so we can safely return a success on the operation and skip the reprobing */ if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_EXISTS)) { @@ -1397,8 +1399,8 @@ handle_set_primary_sim_slot_auth_ready (MMBaseModem *self, } /* If SIM switching is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot || - !MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_primary_sim_slot || + !MM_IFACE_MODEM_GET_IFACE (self)->set_primary_sim_slot_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Operation not supported"); handle_set_primary_sim_slot_context_free (ctx); @@ -1415,10 +1417,10 @@ handle_set_primary_sim_slot_auth_ready (MMBaseModem *self, } mm_obj_info (self, "processing user request to set primary SIM slot '%u'...", ctx->requested_sim_slot); - MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot (MM_IFACE_MODEM (self), - ctx->requested_sim_slot, - (GAsyncReadyCallback)set_primary_sim_slot_ready, - ctx); + MM_IFACE_MODEM_GET_IFACE (self)->set_primary_sim_slot (MM_IFACE_MODEM (self), + ctx->requested_sim_slot, + (GAsyncReadyCallback)set_primary_sim_slot_ready, + ctx); } static gboolean @@ -1486,7 +1488,7 @@ get_cell_info_ready (MMIfaceModem *self, GError *error = NULL; GList *info_list; - info_list = MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info_finish (self, res, &error); + info_list = MM_IFACE_MODEM_GET_IFACE (self)->get_cell_info_finish (self, res, &error); if (error) { mm_obj_dbg (self, "failed retrieving cell info: %s", error->message); mm_dbus_method_invocation_take_error (ctx->invocation, error); @@ -1516,8 +1518,8 @@ handle_get_cell_info_auth_ready (MMBaseModem *self, } /* If getting cell info is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info || - !MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->get_cell_info || + !MM_IFACE_MODEM_GET_IFACE (self)->get_cell_info_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Cannot get cell info: operation not supported"); handle_get_cell_info_context_free (ctx); @@ -1530,9 +1532,9 @@ handle_get_cell_info_auth_ready (MMBaseModem *self, } mm_obj_info (self, "processing user request to retrieve cell info..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info (ctx->self, - (GAsyncReadyCallback)get_cell_info_ready, - ctx); + MM_IFACE_MODEM_GET_IFACE (self)->get_cell_info (ctx->self, + (GAsyncReadyCallback)get_cell_info_ready, + ctx); } static gboolean @@ -1771,7 +1773,7 @@ load_access_technologies_ready (MMIfaceModem *self, priv = get_private (self); ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies_finish ( + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies_finish ( self, res, &ctx->access_technologies, @@ -1807,7 +1809,7 @@ load_signal_quality_ready (MMIfaceModem *self, priv = get_private (self); ctx = g_task_get_task_data (task); - ctx->signal_quality = MM_IFACE_MODEM_GET_INTERFACE (self)->load_signal_quality_finish (self, res, &error); + ctx->signal_quality = MM_IFACE_MODEM_GET_IFACE (self)->load_signal_quality_finish (self, res, &error); if (error) { /* Did the plugin report that polling signal quality is unsupported? */ if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) { @@ -1846,7 +1848,7 @@ periodic_signal_check_step (GTask *task) case SIGNAL_CHECK_STEP_SIGNAL_QUALITY: if (priv->signal_check_enabled && priv->signal_quality_polling_supported && (!priv->signal_check_initial_done || !priv->signal_quality_polling_disabled)) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_signal_quality ( + MM_IFACE_MODEM_GET_IFACE (self)->load_signal_quality ( self, (GAsyncReadyCallback)load_signal_quality_ready, task); return; } @@ -1856,7 +1858,7 @@ periodic_signal_check_step (GTask *task) case SIGNAL_CHECK_STEP_ACCESS_TECHNOLOGIES: if (priv->signal_check_enabled && priv->access_technology_polling_supported && (!priv->signal_check_initial_done || !priv->access_technology_polling_disabled)) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies ( + MM_IFACE_MODEM_GET_IFACE (self)->load_access_technologies ( self, (GAsyncReadyCallback)load_access_technologies_ready, task); return; } @@ -2549,7 +2551,7 @@ handle_reset_ready (MMIfaceModem *self, { GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->reset_finish (self, res, &error)) { mm_obj_warn (self, "failed requesting modem reset: %s", error->message); mm_dbus_method_invocation_take_error (ctx->invocation, error); } else { @@ -2574,7 +2576,7 @@ handle_reset_auth_ready (MMBaseModem *self, } /* If reseting is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset || !MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->reset || !MM_IFACE_MODEM_GET_IFACE (self)->reset_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Operation not supported"); handle_reset_context_free (ctx); @@ -2582,9 +2584,9 @@ handle_reset_auth_ready (MMBaseModem *self, } mm_obj_info (self, "processing user request to reset modem..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->reset (MM_IFACE_MODEM (self), - (GAsyncReadyCallback)handle_reset_ready, - ctx); + MM_IFACE_MODEM_GET_IFACE (self)->reset (MM_IFACE_MODEM (self), + (GAsyncReadyCallback)handle_reset_ready, + ctx); } static gboolean @@ -2634,7 +2636,7 @@ handle_factory_reset_ready (MMIfaceModem *self, { GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->factory_reset_finish (self, res, &error)) { mm_obj_warn (self, "failed requesting modem factory reset: %s", error->message); mm_dbus_method_invocation_take_error (ctx->invocation, error); } else { @@ -2659,7 +2661,7 @@ handle_factory_reset_auth_ready (MMBaseModem *self, } /* If reseting is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset || !MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->factory_reset || !MM_IFACE_MODEM_GET_IFACE (self)->factory_reset_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Operation not supported"); handle_factory_reset_context_free (ctx); @@ -2667,10 +2669,10 @@ handle_factory_reset_auth_ready (MMBaseModem *self, } mm_obj_info (self, "processing user request to factory reset modem..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset (MM_IFACE_MODEM (self), - ctx->code, - (GAsyncReadyCallback)handle_factory_reset_ready, - ctx); + MM_IFACE_MODEM_GET_IFACE (self)->factory_reset (MM_IFACE_MODEM (self), + ctx->code, + (GAsyncReadyCallback)handle_factory_reset_ready, + ctx); } static gboolean @@ -2729,7 +2731,7 @@ set_current_capabilities_ready (MMIfaceModem *self, { GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_capabilities_finish (self, res, &error)) { mm_obj_warn (self, "failed setting current capabilities to '%s': %s", ctx->capabilities_str, error->message); mm_dbus_method_invocation_take_error (ctx->invocation, error); } else { @@ -2766,8 +2768,8 @@ handle_set_current_capabilities_auth_ready (MMBaseModem } /* If setting current capabilities is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities || - !MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_capabilities || + !MM_IFACE_MODEM_GET_IFACE (self)->set_current_capabilities_finish) { mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Setting current capabilities not supported"); handle_set_current_capabilities_context_free (ctx); @@ -2803,7 +2805,7 @@ handle_set_current_capabilities_auth_ready (MMBaseModem ctx->capabilities_str = mm_modem_capability_build_string_from_mask (ctx->capabilities); mm_obj_info (self, "processing user request to set current capabilities to '%s'...", ctx->capabilities_str); - MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities ( + MM_IFACE_MODEM_GET_IFACE (self)->set_current_capabilities ( MM_IFACE_MODEM (self), ctx->capabilities, (GAsyncReadyCallback)set_current_capabilities_ready, @@ -2900,7 +2902,7 @@ after_set_load_current_bands_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - current_bands = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish (self, res, &error); + current_bands = MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands_finish (self, res, &error); if (!current_bands) { /* If we can retry, do it */ if (ctx->retries > 0) { @@ -2970,7 +2972,7 @@ set_current_bands_reload (GTask *task) g_assert (ctx->retries > 0); ctx->retries--; - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands ( + MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands ( self, (GAsyncReadyCallback)after_set_load_current_bands_ready, task); @@ -2993,14 +2995,14 @@ set_current_bands_ready (MMIfaceModem *self, { GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_bands_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_bands_finish (self, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish) { + if (MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands && + MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands_finish) { set_current_bands_reload (task); return; } @@ -3080,8 +3082,8 @@ mm_iface_modem_set_current_bands (MMIfaceModem *self, GTask *task; /* If setting allowed bands is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_bands || - !MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_bands_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_bands || + !MM_IFACE_MODEM_GET_IFACE (self)->set_current_bands_finish) { g_task_report_new_error (self, callback, user_data, @@ -3174,7 +3176,7 @@ mm_iface_modem_set_current_bands (MMIfaceModem *self, } mm_obj_dbg (self, "setting new list of bands: %s", bands_string); - MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_bands ( + MM_IFACE_MODEM_GET_IFACE (self)->set_current_bands ( self, ctx->bands_array, (GAsyncReadyCallback)set_current_bands_ready, @@ -3319,11 +3321,11 @@ after_set_load_current_modes_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes_finish (self, - res, - &allowed, - &preferred, - &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes_finish (self, + res, + &allowed, + &preferred, + &error)) { /* If we can retry, do it */ if (ctx->retries > 0) { mm_obj_dbg (self, "couldn't load current allowed/preferred modes: %s", error->message); @@ -3396,7 +3398,7 @@ set_current_modes_reload (GTask *task) g_assert (ctx->retries > 0); ctx->retries--; - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes ( + MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes ( self, (GAsyncReadyCallback)after_set_load_current_modes_ready, task); @@ -3420,14 +3422,14 @@ set_current_modes_ready (MMIfaceModem *self, SetCurrentModesContext *ctx; GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_modes_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_modes_finish (self, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes_finish) { + if (MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes && + MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes_finish) { set_current_modes_reload (task); return; } @@ -3459,8 +3461,8 @@ mm_iface_modem_set_current_modes (MMIfaceModem *self, GTask *task; /* If setting allowed modes is not implemented, report an error */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_modes || - !MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_modes_finish) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->set_current_modes || + !MM_IFACE_MODEM_GET_IFACE (self)->set_current_modes_finish) { g_task_report_new_error (self, callback, user_data, @@ -3572,11 +3574,11 @@ mm_iface_modem_set_current_modes (MMIfaceModem *self, ctx->allowed = allowed; ctx->preferred = preferred; - MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_modes (self, - allowed, - preferred, - (GAsyncReadyCallback)set_current_modes_ready, - task); + MM_IFACE_MODEM_GET_IFACE (self)->set_current_modes (self, + allowed, + preferred, + (GAsyncReadyCallback)set_current_modes_ready, + task); } /*****************************************************************************/ @@ -3883,7 +3885,7 @@ load_unlock_retries_ready (MMIfaceModem *self, GError *error = NULL; MMUnlockRetries *unlock_retries; - unlock_retries = MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries_finish (self, res, &error); + unlock_retries = MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_retries_finish (self, res, &error); if (!unlock_retries) { mm_obj_dbg (self, "couldn't load unlock retries: %s", error->message); g_error_free (error); @@ -3907,7 +3909,7 @@ modem_after_sim_unlock_ready (MMIfaceModem *self, UpdateLockInfoContext *ctx; GError *error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock_finish (self, res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->modem_after_sim_unlock_finish (self, res, &error)) { mm_obj_dbg (self, "after SIM unlock failed: %s", error->message); g_error_free (error); } @@ -4027,10 +4029,10 @@ update_lock_info_context_step (GTask *task) (ctx->lock == MM_MODEM_LOCK_NONE || ctx->lock == MM_MODEM_LOCK_SIM_PIN2 || ctx->lock == MM_MODEM_LOCK_SIM_PUK2)) { - if (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock != NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock_finish != NULL) { + if (MM_IFACE_MODEM_GET_IFACE (self)->modem_after_sim_unlock != NULL && + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_sim_unlock_finish != NULL) { mm_obj_dbg (self, "SIM is ready, running after SIM unlock step..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock ( + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_sim_unlock ( self, (GAsyncReadyCallback)modem_after_sim_unlock_ready, task); @@ -4045,9 +4047,9 @@ update_lock_info_context_step (GTask *task) case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES: /* Load unlock retries if possible */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_retries && + MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_retries_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_retries ( self, (GAsyncReadyCallback)load_unlock_retries_ready, task); @@ -4168,7 +4170,7 @@ modem_after_power_up_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); g_assert (!ctx->saved_error); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish (self, res, &ctx->saved_error); + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_power_up_finish (self, res, &ctx->saved_error); if (ctx->saved_error) mm_obj_info (self, "failure running after power up step: %s", ctx->saved_error->message); @@ -4288,7 +4290,7 @@ set_power_state_load_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - ctx->previous_real_power_state = MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish (self, res, &error); + ctx->previous_real_power_state = MM_IFACE_MODEM_GET_IFACE (self)->load_power_state_finish (self, res, &error); if (error) { mm_obj_dbg (self, "couldn't reload current power state: %s", error->message); /* Default to the cached one */ @@ -4320,9 +4322,9 @@ set_power_state_step (GTask *task) * as the real power status of the modem may also be changed by rfkill. So, * before updating the current power state, re-check which is the real power * state. */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state (self, (GAsyncReadyCallback)set_power_state_load_ready, task); + if (MM_IFACE_MODEM_GET_IFACE (self)->load_power_state && + MM_IFACE_MODEM_GET_IFACE (self)->load_power_state_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_power_state (self, (GAsyncReadyCallback)set_power_state_load_ready, task); return; } /* If there is no way to load power state, just keep on assuming the cached @@ -4398,10 +4400,10 @@ set_power_state_step (GTask *task) case SET_POWER_STATE_STEP_AFTER_UPDATE: if ((ctx->requested_power_state == MM_MODEM_POWER_STATE_ON) && !ctx->saved_error && - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up && - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_power_up && + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_power_up_finish) { mm_obj_dbg (self, "running after power up operation..."); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up (self, (GAsyncReadyCallback)modem_after_power_up_ready, task); + MM_IFACE_MODEM_GET_IFACE (self)->modem_after_power_up (self, (GAsyncReadyCallback)modem_after_power_up_ready, task); return; } ctx->step++; @@ -4458,16 +4460,16 @@ mm_iface_modem_set_power_state (MMIfaceModem *self, /* Setup requested operation */ switch (ctx->requested_power_state) { case MM_MODEM_POWER_STATE_OFF: - ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off; - ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off_finish; + ctx->requested_power_setup = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_off; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_off_finish; break; case MM_MODEM_POWER_STATE_LOW: - ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down; - ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish; + ctx->requested_power_setup = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down_finish; break; case MM_MODEM_POWER_STATE_ON: - ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up; - ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish; + ctx->requested_power_setup = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up_finish; break; case MM_MODEM_POWER_STATE_UNKNOWN: default: @@ -4580,7 +4582,7 @@ check_for_sim_swap_ready (MMIfaceModem *self, EnablingContext *ctx; g_autoptr(GError) error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish (self, res, &error)) mm_obj_dbg (self, "failed to check if SIM was swapped: %s", error->message); /* Go on to next step */ @@ -4597,7 +4599,7 @@ setup_flow_control_ready (MMIfaceModem *self, EnablingContext *ctx; GError *error = NULL; - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control_finish (self, res, &error); + MM_IFACE_MODEM_GET_IFACE (self)->setup_flow_control_finish (self, res, &error); if (error) { g_task_return_error (task, error); g_object_unref (task); @@ -4647,9 +4649,9 @@ interface_enabling_step (GTask *task) return; case ENABLING_STEP_CHECK_FOR_SIM_SWAP: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap && - MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap ( + if (MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap && + MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap ( self, (GAsyncReadyCallback)check_for_sim_swap_ready, task); @@ -4659,9 +4661,9 @@ interface_enabling_step (GTask *task) /* fall-through */ case ENABLING_STEP_FLOW_CONTROL: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control ( + if (MM_IFACE_MODEM_GET_IFACE (self)->setup_flow_control && + MM_IFACE_MODEM_GET_IFACE (self)->setup_flow_control_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->setup_flow_control ( self, (GAsyncReadyCallback)setup_flow_control_ready, task); @@ -4799,7 +4801,7 @@ sync_sim_lock_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish (self, res, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required_finish (self, res, &error)) mm_obj_warn (self, "checking sim lock status failed: %s", error->message); /* Go on to next step */ @@ -4854,7 +4856,7 @@ interface_syncing_step (GTask *task) /* * Refresh SIM lock status and wait until complete. */ - MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required ( + MM_IFACE_MODEM_GET_IFACE (self)->load_unlock_required ( self, FALSE, NULL, @@ -4975,7 +4977,7 @@ initialization_context_free (InitializationContext *ctx) \ ctx = g_task_get_task_data (task); \ \ - val = MM_IFACE_MODEM_GET_INTERFACE (self)->load_##NAME##_finish (self, res, &error); \ + val = MM_IFACE_MODEM_GET_IFACE (self)->load_##NAME##_finish (self, res, &error); \ mm_gdbus_modem_set_##NAME (ctx->skeleton, val); \ \ if (error) \ @@ -5000,7 +5002,7 @@ initialization_context_free (InitializationContext *ctx) \ mm_gdbus_modem_set_##NAME ( \ ctx->skeleton, \ - MM_IFACE_MODEM_GET_INTERFACE (self)->load_##NAME##_finish (self, res, &error)); \ + MM_IFACE_MODEM_GET_IFACE (self)->load_##NAME##_finish (self, res, &error)); \ \ if (error) \ mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message); \ @@ -5021,7 +5023,7 @@ load_current_capabilities_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - caps = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_capabilities_finish (self, res, &error); + caps = MM_IFACE_MODEM_GET_IFACE (self)->load_current_capabilities_finish (self, res, &error); if (error) { ctx->fatal_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Failed to load current capabilities: %s", @@ -5079,7 +5081,7 @@ load_supported_capabilities_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - supported_capabilities = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_capabilities_finish (self, res, &error); + supported_capabilities = MM_IFACE_MODEM_GET_IFACE (self)->load_supported_capabilities_finish (self, res, &error); if (error) { ctx->fatal_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Failed to load supported capabilities: %s", @@ -5116,7 +5118,7 @@ load_supported_charsets_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - ctx->supported_charsets = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish (self, res, &error); + ctx->supported_charsets = MM_IFACE_MODEM_GET_IFACE (self)->load_supported_charsets_finish (self, res, &error); if (error) mm_obj_dbg (self, "couldn't load supported charsets: %s", error->message); @@ -5135,7 +5137,7 @@ setup_charset_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish (self, res, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->setup_charset_finish (self, res, &error)) mm_obj_dbg (self, "couldn't set charset '%s': %s", mm_modem_charset_to_string (*ctx->current_charset), error->message); @@ -5158,7 +5160,7 @@ load_supported_modes_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - modes_array = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes_finish (self, res, &error); + modes_array = MM_IFACE_MODEM_GET_IFACE (self)->load_supported_modes_finish (self, res, &error); if (modes_array != NULL) { mm_gdbus_modem_set_supported_modes (ctx->skeleton, mm_common_mode_combinations_garray_to_variant (modes_array)); @@ -5184,7 +5186,7 @@ load_supported_bands_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - bands_array = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_bands_finish (self, res, &error); + bands_array = MM_IFACE_MODEM_GET_IFACE (self)->load_supported_bands_finish (self, res, &error); if (bands_array) { mm_common_bands_garray_sort (bands_array); mm_gdbus_modem_set_supported_bands (ctx->skeleton, @@ -5211,7 +5213,7 @@ load_supported_ip_families_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - ip_families = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_ip_families_finish (self, res, &error); + ip_families = MM_IFACE_MODEM_GET_IFACE (self)->load_supported_ip_families_finish (self, res, &error); if (ip_families != MM_BEARER_IP_FAMILY_NONE) mm_gdbus_modem_set_supported_ip_families (ctx->skeleton, ip_families); @@ -5238,7 +5240,7 @@ load_current_modes_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes_finish (self, + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes_finish (self, res, &allowed, &preferred, @@ -5264,7 +5266,7 @@ load_current_bands_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - current_bands = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish (self, res, &error); + current_bands = MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands_finish (self, res, &error); if (!current_bands) { /* Errors when getting current bands won't be critical */ mm_obj_dbg (self, "couldn't load current bands: %s", error->message); @@ -5305,7 +5307,7 @@ setup_sim_hot_swap_ready (MMIfaceModem *self, priv = get_private (self); ctx = g_task_get_task_data (task); - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish (self, res, &error); + MM_IFACE_MODEM_GET_IFACE (self)->setup_sim_hot_swap_finish (self, res, &error); if (error) mm_obj_info (self, "SIM hot swap setup failed: %s", error->message); else { @@ -5330,11 +5332,11 @@ load_sim_slots_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots_finish (self, - res, - &sim_slots, - &primary_sim_slot, - &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_sim_slots_finish (self, + res, + &sim_slots, + &primary_sim_slot, + &error)) mm_obj_dbg (self, "couldn't query SIM slots: %s", error->message); if (sim_slots) { @@ -5420,7 +5422,7 @@ sim_new_ready (GAsyncInitable *initable, self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); - sim = MM_IFACE_MODEM_GET_INTERFACE (self)->create_sim_finish (self, res, &error); + sim = MM_IFACE_MODEM_GET_IFACE (self)->create_sim_finish (self, res, &error); if (error) { mm_obj_warn (self, "couldn't create SIM: %s", error->message); g_task_return_error (task, error); @@ -5477,7 +5479,7 @@ setup_carrier_config_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config_finish (self, res, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->setup_carrier_config_finish (self, res, &error)) mm_obj_warn (self, "couldn't setup carrier config: %s", error->message); /* Go on to next step */ @@ -5497,7 +5499,7 @@ load_carrier_config_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config_finish (self, res, &name, &revision, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->load_carrier_config_finish (self, res, &name, &revision, &error)) mm_obj_dbg (self, "couldn't load carrier config: %s", error->message); else { mm_gdbus_modem_set_carrier_configuration (ctx->skeleton, name); @@ -5520,7 +5522,7 @@ load_own_numbers_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); - str_list = MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish (self, res, &error); + str_list = MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers_finish (self, res, &error); if (error) mm_obj_dbg (self, "couldn't load list of own numbers: %s", error->message); @@ -5633,9 +5635,9 @@ interface_initialization_step (GTask *task) * reloaded. So if we're asked to re-initialize, if we already have current capabilities loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_current_capabilities (ctx->skeleton) == MM_MODEM_CAPABILITY_NONE && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_capabilities && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_capabilities_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_capabilities ( + MM_IFACE_MODEM_GET_IFACE (self)->load_current_capabilities && + MM_IFACE_MODEM_GET_IFACE (self)->load_current_capabilities_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_current_capabilities ( self, (GAsyncReadyCallback)load_current_capabilities_ready, task); @@ -5657,9 +5659,9 @@ interface_initialization_step (GTask *task) g_array_index (supported_capabilities, MMModemCapability, 0) == MM_MODEM_CAPABILITY_NONE) { MMModemCapability current; - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_capabilities && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_capabilities_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_capabilities ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_supported_capabilities && + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_capabilities_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_capabilities ( self, (GAsyncReadyCallback)load_supported_capabilities_ready, task); @@ -5682,9 +5684,9 @@ interface_initialization_step (GTask *task) } /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_CHARSETS: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_supported_charsets && + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_charsets_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_charsets ( self, (GAsyncReadyCallback)load_supported_charsets_ready, task); @@ -5696,8 +5698,8 @@ interface_initialization_step (GTask *task) case INITIALIZATION_STEP_CHARSET: /* Only try to set charsets if we were able to load supported ones */ if (ctx->supported_charsets > 0 && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->setup_charset && + MM_IFACE_MODEM_GET_IFACE (self)->setup_charset_finish) { gboolean next_to_try = FALSE; while (!next_to_try) { @@ -5716,7 +5718,7 @@ interface_initialization_step (GTask *task) } if (next_to_try) { - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset ( + MM_IFACE_MODEM_GET_IFACE (self)->setup_charset ( self, *ctx->current_charset, (GAsyncReadyCallback)setup_charset_ready, @@ -5734,9 +5736,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_manufacturer (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_manufacturer && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_manufacturer_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_manufacturer ( + MM_IFACE_MODEM_GET_IFACE (self)->load_manufacturer && + MM_IFACE_MODEM_GET_IFACE (self)->load_manufacturer_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_manufacturer ( self, (GAsyncReadyCallback)load_manufacturer_ready, task); @@ -5750,9 +5752,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_model (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_model && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_model_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_model ( + MM_IFACE_MODEM_GET_IFACE (self)->load_model && + MM_IFACE_MODEM_GET_IFACE (self)->load_model_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_model ( self, (GAsyncReadyCallback)load_model_ready, task); @@ -5766,9 +5768,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_revision (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_revision && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_revision_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_revision ( + MM_IFACE_MODEM_GET_IFACE (self)->load_revision && + MM_IFACE_MODEM_GET_IFACE (self)->load_revision_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_revision ( self, (GAsyncReadyCallback)load_revision_ready, task); @@ -5791,7 +5793,7 @@ interface_initialization_step (GTask *task) NULL); if (!list) { - list = MM_IFACE_MODEM_GET_INTERFACE (self)->create_bearer_list (self); + list = MM_IFACE_MODEM_GET_IFACE (self)->create_bearer_list (self); g_signal_connect (list, "notify::" MM_BEARER_LIST_NUM_BEARERS, G_CALLBACK (bearer_list_updated), @@ -5821,11 +5823,12 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_carrier_configuration (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config (self, - (GAsyncReadyCallback)load_carrier_config_ready, - task); + MM_IFACE_MODEM_GET_IFACE (self)->load_carrier_config && + MM_IFACE_MODEM_GET_IFACE (self)->load_carrier_config_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_carrier_config ( + self, + (GAsyncReadyCallback)load_carrier_config_ready, + task); return; } ctx->step++; @@ -5836,9 +5839,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_hardware_revision (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_hardware_revision && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_hardware_revision_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_hardware_revision ( + MM_IFACE_MODEM_GET_IFACE (self)->load_hardware_revision && + MM_IFACE_MODEM_GET_IFACE (self)->load_hardware_revision_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_hardware_revision ( self, (GAsyncReadyCallback)load_hardware_revision_ready, task); @@ -5852,9 +5855,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_equipment_identifier (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_equipment_identifier && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_equipment_identifier_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_equipment_identifier ( + MM_IFACE_MODEM_GET_IFACE (self)->load_equipment_identifier && + MM_IFACE_MODEM_GET_IFACE (self)->load_equipment_identifier_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_equipment_identifier ( self, (GAsyncReadyCallback)load_equipment_identifier_ready, task); @@ -5868,9 +5871,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_device_identifier (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_device_identifier && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_device_identifier_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_device_identifier ( + MM_IFACE_MODEM_GET_IFACE (self)->load_device_identifier && + MM_IFACE_MODEM_GET_IFACE (self)->load_device_identifier_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_device_identifier ( self, (GAsyncReadyCallback)load_device_identifier_ready, task); @@ -5880,8 +5883,8 @@ interface_initialization_step (GTask *task) /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_MODES: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes != NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes_finish != NULL) { + if (MM_IFACE_MODEM_GET_IFACE (self)->load_supported_modes != NULL && + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_modes_finish != NULL) { GArray *supported_modes; MMModemModeCombination *mode = NULL; @@ -5895,7 +5898,7 @@ interface_initialization_step (GTask *task) mode = &g_array_index (supported_modes, MMModemModeCombination, 0); if (supported_modes->len == 0 || (mode && mode->allowed == MM_MODEM_MODE_ANY && mode->preferred == MM_MODEM_MODE_NONE)) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes ( + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_modes ( self, (GAsyncReadyCallback)load_supported_modes_ready, task); @@ -5919,9 +5922,9 @@ interface_initialization_step (GTask *task) * don't try to load them again. */ if (supported_bands->len == 0 || g_array_index (supported_bands, MMModemBand, 0) == MM_MODEM_BAND_UNKNOWN) { - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_bands && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_bands_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_bands ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_supported_bands && + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_bands_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_bands ( self, (GAsyncReadyCallback)load_supported_bands_ready, task); @@ -5942,10 +5945,10 @@ interface_initialization_step (GTask *task) /* Supported ip_families are meant to be loaded only once during the whole * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_ip_families != NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_ip_families_finish != NULL && + if (MM_IFACE_MODEM_GET_IFACE (self)->load_supported_ip_families != NULL && + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_ip_families_finish != NULL && mm_gdbus_modem_get_supported_ip_families (ctx->skeleton) == MM_BEARER_IP_FAMILY_NONE) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_ip_families ( + MM_IFACE_MODEM_GET_IFACE (self)->load_supported_ip_families ( self, (GAsyncReadyCallback)load_supported_ip_families_ready, task); @@ -5958,9 +5961,9 @@ interface_initialization_step (GTask *task) /* Initial power state is meant to be loaded only once. Therefore, if we * already have it loaded, don't try to load it again. */ if (mm_gdbus_modem_get_power_state (ctx->skeleton) == MM_MODEM_POWER_STATE_UNKNOWN) { - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_power_state && + MM_IFACE_MODEM_GET_IFACE (self)->load_power_state_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_power_state ( self, (GAsyncReadyCallback)load_power_state_ready, task); @@ -5996,9 +5999,9 @@ interface_initialization_step (GTask *task) supported_mode = &g_array_index (supported, MMModemModeCombination, 0); mm_gdbus_modem_set_current_modes (ctx->skeleton, g_variant_new ("(uu)", supported_mode->allowed, supported_mode->preferred)); - } else if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_modes ( + } else if (MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes && + MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_current_modes ( self, (GAsyncReadyCallback)load_current_modes_ready, task); @@ -6023,9 +6026,9 @@ interface_initialization_step (GTask *task) /* Current bands are only meant to be loaded once, so if we have them * loaded already, just skip re-loading */ if (!current || (current->len == 1 && g_array_index (current, MMModemBand, 0) == MM_MODEM_BAND_UNKNOWN)) { - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands ( + if (MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands && + MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_current_bands ( self, (GAsyncReadyCallback)load_current_bands_ready, task); @@ -6049,9 +6052,9 @@ interface_initialization_step (GTask *task) priv = get_private (self); if (!priv->sim_hot_swap_configured && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap ( + MM_IFACE_MODEM_GET_IFACE (self)->setup_sim_hot_swap && + MM_IFACE_MODEM_GET_IFACE (self)->setup_sim_hot_swap_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->setup_sim_hot_swap ( MM_IFACE_MODEM (self), (GAsyncReadyCallback) setup_sim_hot_swap_ready, task); @@ -6066,11 +6069,12 @@ interface_initialization_step (GTask *task) * for SIM slots */ if (!mm_gdbus_modem_get_sim_slots (ctx->skeleton) && !mm_iface_modem_is_cdma_only (self) && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots (MM_IFACE_MODEM (self), - (GAsyncReadyCallback)load_sim_slots_ready, - task); + MM_IFACE_MODEM_GET_IFACE (self)->load_sim_slots && + MM_IFACE_MODEM_GET_IFACE (self)->load_sim_slots_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_sim_slots ( + MM_IFACE_MODEM (self), + (GAsyncReadyCallback)load_sim_slots_ready, + task); return; } ctx->step++; @@ -6103,15 +6107,15 @@ interface_initialization_step (GTask *task) /* If the modem doesn't need any SIM (not implemented by plugin, or not * needed in CDMA-only modems) */ if (!mm_iface_modem_is_cdma_only (self) && - MM_IFACE_MODEM_GET_INTERFACE (self)->create_sim && - MM_IFACE_MODEM_GET_INTERFACE (self)->create_sim_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->create_sim && + MM_IFACE_MODEM_GET_IFACE (self)->create_sim_finish) { MMBaseSim *sim = NULL; g_object_get (self, MM_IFACE_MODEM_SIM, &sim, NULL); if (!sim) { - MM_IFACE_MODEM_GET_INTERFACE (self)->create_sim ( + MM_IFACE_MODEM_GET_IFACE (self)->create_sim ( MM_IFACE_MODEM (self), (GAsyncReadyCallback)sim_new_ready, task); @@ -6136,8 +6140,8 @@ interface_initialization_step (GTask *task) * SIM initialization has been performed, only applicable if there is * actually a SIM found with a valid IMSI read */ if (!mm_iface_modem_is_cdma_only (self) && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->setup_carrier_config && + MM_IFACE_MODEM_GET_IFACE (self)->setup_carrier_config_finish) { g_autoptr(MMBaseSim) sim = NULL; g_autofree gchar *carrier_config_mapping = NULL; @@ -6161,11 +6165,12 @@ interface_initialization_step (GTask *task) if (!imsi) mm_obj_dbg (self, "not setting up carrier config: unknown IMSI"); else { - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config (self, - imsi, - carrier_config_mapping, - (GAsyncReadyCallback)setup_carrier_config_ready, - task); + MM_IFACE_MODEM_GET_IFACE (self)->setup_carrier_config ( + self, + imsi, + carrier_config_mapping, + (GAsyncReadyCallback)setup_carrier_config_ready, + task); return; } } @@ -6178,9 +6183,9 @@ interface_initialization_step (GTask *task) * lifetime of the modem. Therefore, if we already have them loaded, * don't try to load them again. */ if (mm_gdbus_modem_get_own_numbers (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers ( + MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers && + MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers_finish) { + MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers ( self, (GAsyncReadyCallback)load_own_numbers_ready, task); @@ -6334,8 +6339,8 @@ mm_iface_modem_shutdown (MMIfaceModem *self) restart_initialize_idle_disable (self); /* Cleanup SIM hot swap, if any */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap) - MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap (self); + if (MM_IFACE_MODEM_GET_IFACE (self)->cleanup_sim_hot_swap) + MM_IFACE_MODEM_GET_IFACE (self)->cleanup_sim_hot_swap (self); /* Remove SIM object */ g_object_set (self, @@ -6601,109 +6606,86 @@ mm_iface_modem_get_carrier_config (MMIfaceModem *self, /*****************************************************************************/ static void -iface_modem_init (gpointer g_iface) +mm_iface_modem_default_init (MMIfaceModemInterface *iface) { - static gboolean initialized = FALSE; + static gsize initialized = 0; - if (initialized) + if (!g_once_init_enter (&initialized)) return; /* Properties */ - g_object_interface_install_property - (g_iface, - g_param_spec_object (MM_IFACE_MODEM_DBUS_SKELETON, - "Modem DBus skeleton", - "DBus skeleton for the Modem interface", - MM_GDBUS_TYPE_MODEM_SKELETON, - G_PARAM_READWRITE)); - - g_object_interface_install_property - (g_iface, - g_param_spec_object (MM_IFACE_MODEM_SIM, - "SIM", - "SIM object", - MM_TYPE_BASE_SIM, - G_PARAM_READWRITE)); + g_object_interface_install_property ( + iface, + g_param_spec_object (MM_IFACE_MODEM_DBUS_SKELETON, + "Modem DBus skeleton", + "DBus skeleton for the Modem interface", + MM_GDBUS_TYPE_MODEM_SKELETON, + G_PARAM_READWRITE)); - g_object_interface_install_property - (g_iface, - g_param_spec_boxed (MM_IFACE_MODEM_SIM_SLOTS, - "SIM slots", - "SIM objects in SIM slots", - MM_TYPE_OBJECT_ARRAY, + g_object_interface_install_property ( + iface, + g_param_spec_object (MM_IFACE_MODEM_SIM, + "SIM", + "SIM object", + MM_TYPE_BASE_SIM, G_PARAM_READWRITE)); - g_object_interface_install_property - (g_iface, - g_param_spec_enum (MM_IFACE_MODEM_STATE, - "State", - "State of the modem", - MM_TYPE_MODEM_STATE, - MM_MODEM_STATE_UNKNOWN, + g_object_interface_install_property ( + iface, + g_param_spec_boxed (MM_IFACE_MODEM_SIM_SLOTS, + "SIM slots", + "SIM objects in SIM slots", + MM_TYPE_OBJECT_ARRAY, G_PARAM_READWRITE)); - g_object_interface_install_property - (g_iface, - g_param_spec_object (MM_IFACE_MODEM_BEARER_LIST, - "Bearer list", - "List of bearers handled by the modem", - MM_TYPE_BEARER_LIST, + g_object_interface_install_property ( + iface, + g_param_spec_enum (MM_IFACE_MODEM_STATE, + "State", + "State of the modem", + MM_TYPE_MODEM_STATE, + MM_MODEM_STATE_UNKNOWN, + G_PARAM_READWRITE)); + + g_object_interface_install_property ( + iface, + g_param_spec_object (MM_IFACE_MODEM_BEARER_LIST, + "Bearer list", + "List of bearers handled by the modem", + MM_TYPE_BEARER_LIST, + G_PARAM_READWRITE)); + + g_object_interface_install_property ( + iface, + g_param_spec_boolean (MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, + "Sim Hot Swap Supported", + "Whether the modem supports sim hot swap or not.", + FALSE, G_PARAM_READWRITE)); - g_object_interface_install_property - (g_iface, - g_param_spec_boolean (MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, - "Sim Hot Swap Supported", - "Whether the modem supports sim hot swap or not.", - FALSE, - G_PARAM_READWRITE)); - - g_object_interface_install_property - (g_iface, - g_param_spec_boolean (MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED, - "Periodic signal quality check disabled", - "Whether periodic signal quality check is disabled.", - FALSE, - G_PARAM_READWRITE)); - - g_object_interface_install_property - (g_iface, - g_param_spec_boolean (MM_IFACE_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED, - "Periodic access technology check disabled", - "Whether periodic access technology check is disabled.", - FALSE, - G_PARAM_READWRITE)); - - g_object_interface_install_property - (g_iface, - g_param_spec_string (MM_IFACE_MODEM_CARRIER_CONFIG_MAPPING, - "Carrier config mapping table", - "Path to the file including the carrier mapping for the module", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - initialized = TRUE; -} - -GType -mm_iface_modem_get_type (void) -{ - static GType iface_modem_type = 0; - - if (!G_UNLIKELY (iface_modem_type)) { - static const GTypeInfo info = { - sizeof (MMIfaceModem), /* class_size */ - iface_modem_init, /* base_init */ - NULL, /* base_finalize */ - }; - - iface_modem_type = g_type_register_static (G_TYPE_INTERFACE, - "MMIfaceModem", - &info, - 0); - - g_type_interface_add_prerequisite (iface_modem_type, MM_TYPE_BASE_MODEM); - } - - return iface_modem_type; + g_object_interface_install_property ( + iface, + g_param_spec_boolean (MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED, + "Periodic signal quality check disabled", + "Whether periodic signal quality check is disabled.", + FALSE, + G_PARAM_READWRITE)); + + g_object_interface_install_property ( + iface, + g_param_spec_boolean (MM_IFACE_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED, + "Periodic access technology check disabled", + "Whether periodic access technology check is disabled.", + FALSE, + G_PARAM_READWRITE)); + + g_object_interface_install_property ( + iface, + g_param_spec_string (MM_IFACE_MODEM_CARRIER_CONFIG_MAPPING, + "Carrier config mapping table", + "Path to the file including the carrier mapping for the module", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_once_init_leave (&initialized, 1); } diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h index daf3404d..11df05bb 100644 --- a/src/mm-iface-modem.h +++ b/src/mm-iface-modem.h @@ -24,15 +24,14 @@ #include <libmm-glib.h> #include "mm-charsets.h" +#include "mm-base-modem.h" #include "mm-port-serial-at.h" #include "mm-base-bearer.h" #include "mm-base-sim.h" #include "mm-bearer-list.h" -#define MM_TYPE_IFACE_MODEM (mm_iface_modem_get_type ()) -#define MM_IFACE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_IFACE_MODEM, MMIfaceModem)) -#define MM_IS_IFACE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_MODEM)) -#define MM_IFACE_MODEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_MODEM, MMIfaceModem)) +#define MM_TYPE_IFACE_MODEM mm_iface_modem_get_type () +G_DECLARE_INTERFACE (MMIfaceModem, mm_iface_modem, MM, IFACE_MODEM, MMBaseModem) #define MM_IFACE_MODEM_DBUS_SKELETON "iface-modem-dbus-skeleton" #define MM_IFACE_MODEM_STATE "iface-modem-state" @@ -44,9 +43,7 @@ #define MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED "iface-modem-periodic-signal-check-disabled" #define MM_IFACE_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED "iface-modem-periodic-access-tech-check-disabled" -typedef struct _MMIfaceModem MMIfaceModem; - -struct _MMIfaceModem { +struct _MMIfaceModemInterface { GTypeInterface g_iface; /* Loading of the SupportedCapabilities property */ @@ -425,9 +422,6 @@ struct _MMIfaceModem { GError **error); }; -GType mm_iface_modem_get_type (void); -G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModem, g_object_unref) - /* Helpers to query access technologies */ MMModemAccessTechnology mm_iface_modem_get_access_technologies (MMIfaceModem *self); diff --git a/src/plugins/altair/mm-broadband-modem-altair-lte.c b/src/plugins/altair/mm-broadband-modem-altair-lte.c index 98fb6076..3678434b 100644 --- a/src/plugins/altair/mm-broadband-modem-altair-lte.c +++ b/src/plugins/altair/mm-broadband-modem-altair-lte.c @@ -41,9 +41,9 @@ #include "mm-serial-parsers.h" #include "mm-bearer-list.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemAltairLte, mm_broadband_modem_altair_lte, MM_TYPE_BROADBAND_MODEM, 0, @@ -626,7 +626,7 @@ altair_load_own_numbers_ready (MMIfaceModem *iface_modem, GError *error = NULL; GStrv str_list; - str_list = MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish (MM_IFACE_MODEM (self), res, &error); + str_list = MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers_finish (MM_IFACE_MODEM (self), res, &error); if (error) { mm_obj_warn (self, "Couldn't reload Own Numbers: '%s'", error->message); g_error_free (error); @@ -656,9 +656,9 @@ altair_sim_refresh_timer_expired (MMBroadbandModemAltairLte *self) { mm_obj_dbg (self, "no more SIM refreshes, reloading own numbers and reregistering modem"); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish); - MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers ( + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers); + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers_finish); + MM_IFACE_MODEM_GET_IFACE (self)->load_own_numbers ( MM_IFACE_MODEM (self), (GAsyncReadyCallback)altair_load_own_numbers_ready, self); @@ -1220,7 +1220,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->modem_power_down = modem_power_down; iface->modem_power_down_finish = modem_power_down_finish; diff --git a/src/plugins/anydata/mm-broadband-modem-anydata.c b/src/plugins/anydata/mm-broadband-modem-anydata.c index e1bfae4f..ea2c2268 100644 --- a/src/plugins/anydata/mm-broadband-modem-anydata.c +++ b/src/plugins/anydata/mm-broadband-modem-anydata.c @@ -33,8 +33,8 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-cdma.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemAnydata, mm_broadband_modem_anydata, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -333,7 +333,7 @@ mm_broadband_modem_anydata_init (MMBroadbandModemAnydata *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->reset = reset; iface->reset_finish = reset_finish; diff --git a/src/plugins/cinterion/mm-broadband-modem-cinterion.c b/src/plugins/cinterion/mm-broadband-modem-cinterion.c index a2cd9f39..78dc9bf4 100644 --- a/src/plugins/cinterion/mm-broadband-modem-cinterion.c +++ b/src/plugins/cinterion/mm-broadband-modem-cinterion.c @@ -42,7 +42,7 @@ #include "mm-broadband-bearer-cinterion.h" #include "mm-iface-modem-signal.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); static void iface_modem_location_init (MMIfaceModemLocation *iface); @@ -51,12 +51,12 @@ static void iface_modem_time_init (MMIfaceModemTime *iface); static void iface_modem_signal_init (MMIfaceModemSignal *iface); static void shared_cinterion_init (MMSharedCinterion *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; -static MMIfaceModemLocation *iface_modem_location_parent; -static MMIfaceModemVoice *iface_modem_voice_parent; -static MMIfaceModemTime *iface_modem_time_parent; -static MMIfaceModemSignal *iface_modem_signal_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; +static MMIfaceModemTime *iface_modem_time_parent; +static MMIfaceModemSignal *iface_modem_signal_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemCinterion, mm_broadband_modem_cinterion, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -3456,7 +3456,7 @@ set_primary_sim_slot_finish (MMIfaceModem *self, } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -3495,7 +3495,7 @@ iface_modem_init (MMIfaceModem *iface) iface->set_primary_sim_slot_finish = set_primary_sim_slot_finish; } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_interface (MMSharedCinterion *self) { return iface_modem_parent; diff --git a/src/plugins/cinterion/mm-broadband-modem-mbim-cinterion.c b/src/plugins/cinterion/mm-broadband-modem-mbim-cinterion.c index 64b4b584..54520a2e 100644 --- a/src/plugins/cinterion/mm-broadband-modem-mbim-cinterion.c +++ b/src/plugins/cinterion/mm-broadband-modem-mbim-cinterion.c @@ -30,16 +30,16 @@ #include "mm-broadband-modem-mbim-cinterion.h" #include "mm-shared-cinterion.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void shared_cinterion_init (MMSharedCinterion *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void shared_cinterion_init (MMSharedCinterion *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModemLocation *iface_modem_location_parent; -static MMIfaceModemVoice *iface_modem_voice_parent; -static MMIfaceModemTime *iface_modem_time_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; +static MMIfaceModemTime *iface_modem_time_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimCinterion, mm_broadband_modem_mbim_cinterion, MM_TYPE_BROADBAND_MODEM_MBIM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -80,7 +80,7 @@ mm_broadband_modem_mbim_cinterion_init (MMBroadbandModemMbimCinterion *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -88,7 +88,7 @@ iface_modem_init (MMIfaceModem *iface) iface->reset_finish = mm_shared_cinterion_modem_reset_finish; } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_interface (MMSharedCinterion *self) { return iface_modem_parent; diff --git a/src/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c b/src/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c index 8bd5eafc..e20b506e 100644 --- a/src/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c +++ b/src/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c @@ -31,16 +31,16 @@ #include "mm-broadband-modem-qmi-cinterion.h" #include "mm-shared-cinterion.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void shared_cinterion_init (MMSharedCinterion *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void shared_cinterion_init (MMSharedCinterion *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModemLocation *iface_modem_location_parent; -static MMIfaceModemVoice *iface_modem_voice_parent; -static MMIfaceModemTime *iface_modem_time_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; +static MMIfaceModemTime *iface_modem_time_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemQmiCinterion, mm_broadband_modem_qmi_cinterion, MM_TYPE_BROADBAND_MODEM_QMI, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -79,7 +79,7 @@ mm_broadband_modem_qmi_cinterion_init (MMBroadbandModemQmiCinterion *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -87,7 +87,7 @@ iface_modem_init (MMIfaceModem *iface) iface->reset_finish = mm_shared_cinterion_modem_reset_finish; } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_interface (MMSharedCinterion *self) { return iface_modem_parent; diff --git a/src/plugins/cinterion/mm-shared-cinterion.c b/src/plugins/cinterion/mm-shared-cinterion.c index cab38332..0724c3cd 100644 --- a/src/plugins/cinterion/mm-shared-cinterion.c +++ b/src/plugins/cinterion/mm-shared-cinterion.c @@ -45,7 +45,7 @@ typedef enum { typedef struct { /* modem */ - MMIfaceModem *iface_modem_parent; + MMIfaceModemInterface *iface_modem_parent; /* location */ MMIfaceModemLocation *iface_modem_location_parent; MMModemLocationSource supported_sources; diff --git a/src/plugins/cinterion/mm-shared-cinterion.h b/src/plugins/cinterion/mm-shared-cinterion.h index eb6beac8..5605408f 100644 --- a/src/plugins/cinterion/mm-shared-cinterion.h +++ b/src/plugins/cinterion/mm-shared-cinterion.h @@ -41,7 +41,7 @@ struct _MMSharedCinterion { GTypeInterface g_iface; /* Peek modem interface of the parent class of the object */ - MMIfaceModem * (* peek_parent_interface) (MMSharedCinterion *self); + MMIfaceModemInterface * (* peek_parent_interface) (MMSharedCinterion *self); /* Peek location interface of the parent class of the object */ MMIfaceModemLocation * (* peek_parent_location_interface) (MMSharedCinterion *self); diff --git a/src/plugins/fibocom/mm-broadband-modem-fibocom.c b/src/plugins/fibocom/mm-broadband-modem-fibocom.c index 1faf1ae7..77d4f39b 100644 --- a/src/plugins/fibocom/mm-broadband-modem-fibocom.c +++ b/src/plugins/fibocom/mm-broadband-modem-fibocom.c @@ -25,13 +25,13 @@ #include "mm-log.h" #include "mm-shared-fibocom.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); static void shared_fibocom_init (MMSharedFibocom *iface); -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; static MMIfaceModem3gppProfileManager *iface_modem_3gpp_profile_manager_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemFibocom, mm_broadband_modem_fibocom, MM_TYPE_BROADBAND_MODEM, 0, @@ -424,7 +424,7 @@ set_initial_eps_bearer_power_up_ready (MMBaseModem *_self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish (MM_IFACE_MODEM (self), res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up_finish (MM_IFACE_MODEM (self), res, &error)) { g_prefix_error (&error, "Couldn't power up modem: "); g_task_return_error (task, error); g_object_unref (task); @@ -467,7 +467,7 @@ set_initial_eps_bearer_power_down_ready (MMBaseModem *self, ctx = g_task_get_task_data (task); - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish (MM_IFACE_MODEM (self), res, &error)) { + if (!MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down_finish (MM_IFACE_MODEM (self), res, &error)) { g_prefix_error (&error, "Couldn't power down modem: "); g_task_return_error (task, error); g_object_unref (task); @@ -488,7 +488,7 @@ set_initial_eps_bearer_load_power_state_ready (MMBaseModem *self, ctx = g_task_get_task_data (task); - ctx->power_state = MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish (MM_IFACE_MODEM (self), res, &error); + ctx->power_state = MM_IFACE_MODEM_GET_IFACE (self)->load_power_state_finish (MM_IFACE_MODEM (self), res, &error); if (error) { g_task_return_error (task, error); g_object_unref (task); @@ -511,9 +511,9 @@ set_initial_eps_step (GTask *task) switch (ctx->step) { case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_LOAD_POWER_STATE: mm_obj_dbg (self, "querying current power state..."); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish); - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state ( + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->load_power_state); + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->load_power_state_finish); + MM_IFACE_MODEM_GET_IFACE (self)->load_power_state ( MM_IFACE_MODEM (self), (GAsyncReadyCallback) set_initial_eps_bearer_load_power_state_ready, task); @@ -522,9 +522,9 @@ set_initial_eps_step (GTask *task) case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_DOWN: if (ctx->power_state == MM_MODEM_POWER_STATE_ON) { mm_obj_dbg (self, "powering down before changing initial EPS bearer settings..."); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down ( + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down); + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down_finish); + MM_IFACE_MODEM_GET_IFACE (self)->modem_power_down ( MM_IFACE_MODEM (self), (GAsyncReadyCallback) set_initial_eps_bearer_power_down_ready, task); @@ -546,9 +546,9 @@ set_initial_eps_step (GTask *task) case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_UP: if (ctx->power_state == MM_MODEM_POWER_STATE_ON) { mm_obj_dbg (self, "powering up after changing initial EPS bearer settings..."); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up); - g_assert (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up ( + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up); + g_assert (MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up_finish); + MM_IFACE_MODEM_GET_IFACE (self)->modem_power_up ( MM_IFACE_MODEM (self), (GAsyncReadyCallback) set_initial_eps_bearer_power_up_ready, task); @@ -694,7 +694,7 @@ mm_broadband_modem_fibocom_init (MMBroadbandModemFibocom *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->create_bearer = modem_create_bearer; iface->create_bearer_finish = modem_create_bearer_finish; diff --git a/src/plugins/huawei/mm-broadband-modem-huawei.c b/src/plugins/huawei/mm-broadband-modem-huawei.c index 2f7467a2..b4262b93 100644 --- a/src/plugins/huawei/mm-broadband-modem-huawei.c +++ b/src/plugins/huawei/mm-broadband-modem-huawei.c @@ -50,20 +50,20 @@ #include "mm-bearer-list.h" #include "mm-sim-huawei.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void iface_modem_signal_init (MMIfaceModemSignal *iface); - -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; -static MMIfaceModemLocation *iface_modem_location_parent; -static MMIfaceModemCdma *iface_modem_cdma_parent; -static MMIfaceModemVoice *iface_modem_voice_parent; +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_signal_init (MMIfaceModemSignal *iface); + +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemCdma *iface_modem_cdma_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemHuawei, mm_broadband_modem_huawei, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -4983,7 +4983,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/icera/mm-broadband-modem-icera.c b/src/plugins/icera/mm-broadband-modem-icera.c index 3299f67b..0d25b01e 100644 --- a/src/plugins/icera/mm-broadband-modem-icera.c +++ b/src/plugins/icera/mm-broadband-modem-icera.c @@ -39,7 +39,7 @@ #include "mm-broadband-modem-icera.h" #include "mm-modem-helpers-icera.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); static void iface_modem_time_init (MMIfaceModemTime *iface); @@ -2277,7 +2277,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/iridium/mm-broadband-modem-iridium.c b/src/plugins/iridium/mm-broadband-modem-iridium.c index fe6bff6e..c6e8eaa3 100644 --- a/src/plugins/iridium/mm-broadband-modem-iridium.c +++ b/src/plugins/iridium/mm-broadband-modem-iridium.c @@ -34,8 +34,8 @@ #include "mm-bearer-iridium.h" #include "mm-modem-helpers.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemIridium, mm_broadband_modem_iridium, MM_TYPE_BROADBAND_MODEM, 0, @@ -369,7 +369,7 @@ mm_broadband_modem_iridium_init (MMBroadbandModemIridium *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* Create Iridium-specific SIM and bearer*/ iface->create_sim = create_sim; diff --git a/src/plugins/linktop/mm-broadband-modem-linktop.c b/src/plugins/linktop/mm-broadband-modem-linktop.c index 6673072a..9e83f665 100644 --- a/src/plugins/linktop/mm-broadband-modem-linktop.c +++ b/src/plugins/linktop/mm-broadband-modem-linktop.c @@ -34,9 +34,9 @@ #include "mm-broadband-modem-linktop.h" #include "mm-modem-helpers-linktop.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemLinktop, mm_broadband_modem_linktop, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)) @@ -253,7 +253,7 @@ mm_broadband_modem_linktop_init (MMBroadbandModemLinktop *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/longcheer/mm-broadband-modem-longcheer.c b/src/plugins/longcheer/mm-broadband-modem-longcheer.c index 25dc381d..b7851e26 100644 --- a/src/plugins/longcheer/mm-broadband-modem-longcheer.c +++ b/src/plugins/longcheer/mm-broadband-modem-longcheer.c @@ -31,9 +31,9 @@ #include "mm-modem-helpers.h" #include "mm-broadband-modem-longcheer.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemLongcheer, mm_broadband_modem_longcheer, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)) @@ -396,7 +396,7 @@ mm_broadband_modem_longcheer_init (MMBroadbandModemLongcheer *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/mbm/mm-broadband-modem-mbm.c b/src/plugins/mbm/mm-broadband-modem-mbm.c index e888088b..09905295 100644 --- a/src/plugins/mbm/mm-broadband-modem-mbm.c +++ b/src/plugins/mbm/mm-broadband-modem-mbm.c @@ -47,13 +47,13 @@ /* sets the interval in seconds on how often the card emits the NMEA sentences */ #define MBM_GPS_NMEA_INTERVAL "5" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; -static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbm, mm_broadband_modem_mbm, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -1538,7 +1538,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/motorola/mm-broadband-modem-motorola.c b/src/plugins/motorola/mm-broadband-modem-motorola.c index fbc514e2..0274e1e5 100644 --- a/src/plugins/motorola/mm-broadband-modem-motorola.c +++ b/src/plugins/motorola/mm-broadband-modem-motorola.c @@ -28,7 +28,7 @@ #include "mm-iface-modem-3gpp.h" #include "mm-broadband-modem-motorola.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMotorola, mm_broadband_modem_motorola, MM_TYPE_BROADBAND_MODEM, 0, @@ -72,7 +72,7 @@ iface_modem_3gpp_init (MMIfaceModem3gpp *iface) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* Loading IMEI with +CGSN is not supported, just assume we cannot load * equipment ID */ diff --git a/src/plugins/mtk/mm-broadband-modem-mbim-mtk-fibocom.c b/src/plugins/mtk/mm-broadband-modem-mbim-mtk-fibocom.c index 67ef8dcf..68f43f43 100644 --- a/src/plugins/mtk/mm-broadband-modem-mbim-mtk-fibocom.c +++ b/src/plugins/mtk/mm-broadband-modem-mbim-mtk-fibocom.c @@ -29,12 +29,12 @@ #include "mm-broadband-modem-mbim-mtk-fibocom.h" #include "mm-shared-fibocom.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void shared_fibocom_init (MMSharedFibocom *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void shared_fibocom_init (MMSharedFibocom *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimMtkFibocom, mm_broadband_modem_mbim_mtk_fibocom, MM_TYPE_BROADBAND_MODEM_MBIM_MTK, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -273,7 +273,7 @@ mm_broadband_modem_mbim_mtk_fibocom_init (MMBroadbandModemMbimMtkFibocom *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/mtk/mm-broadband-modem-mtk-legacy.c b/src/plugins/mtk/mm-broadband-modem-mtk-legacy.c index 37624db8..2f6fd3d0 100644 --- a/src/plugins/mtk/mm-broadband-modem-mtk-legacy.c +++ b/src/plugins/mtk/mm-broadband-modem-mtk-legacy.c @@ -32,11 +32,11 @@ #include "mm-iface-modem-3gpp.h" #include "mm-broadband-modem-mtk-legacy.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMtkLegacy, mm_broadband_modem_mtk_legacy, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -913,7 +913,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/nokia/mm-broadband-modem-nokia.c b/src/plugins/nokia/mm-broadband-modem-nokia.c index d256a0f4..41698a2c 100644 --- a/src/plugins/nokia/mm-broadband-modem-nokia.c +++ b/src/plugins/nokia/mm-broadband-modem-nokia.c @@ -34,10 +34,10 @@ #include "mm-broadband-modem-nokia.h" #include "mm-sim-nokia.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemNokia, mm_broadband_modem_nokia, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -381,7 +381,7 @@ iface_modem_messaging_init (MMIfaceModemMessaging *iface) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/novatel/mm-broadband-modem-novatel-lte.c b/src/plugins/novatel/mm-broadband-modem-novatel-lte.c index 1027d22b..90264ef1 100644 --- a/src/plugins/novatel/mm-broadband-modem-novatel-lte.c +++ b/src/plugins/novatel/mm-broadband-modem-novatel-lte.c @@ -35,8 +35,8 @@ #include "mm-modem-helpers.h" #include "mm-serial-parsers.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static MMIfaceModem3gpp *iface_modem_3gpp_parent; @@ -663,7 +663,7 @@ mm_broadband_modem_novatel_lte_init (MMBroadbandModemNovatelLte *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->modem_power_down = modem_power_down; iface->modem_power_down_finish = modem_power_down_finish; diff --git a/src/plugins/novatel/mm-broadband-modem-novatel.c b/src/plugins/novatel/mm-broadband-modem-novatel.c index f0cde18a..904d3c28 100644 --- a/src/plugins/novatel/mm-broadband-modem-novatel.c +++ b/src/plugins/novatel/mm-broadband-modem-novatel.c @@ -38,12 +38,12 @@ #include "libqcdm/src/result.h" #include "mm-log-object.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemNovatel, mm_broadband_modem_novatel, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -1560,7 +1560,7 @@ mm_broadband_modem_novatel_init (MMBroadbandModemNovatel *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/option/mm-broadband-modem-hso.c b/src/plugins/option/mm-broadband-modem-hso.c index 377f2406..e5d3f59e 100644 --- a/src/plugins/option/mm-broadband-modem-hso.c +++ b/src/plugins/option/mm-broadband-modem-hso.c @@ -36,12 +36,12 @@ #include "mm-bearer-list.h" #include "mm-shared-option.h" -static void shared_option_init (MMSharedOption *iface); -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void shared_option_init (MMSharedOption *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemHso, mm_broadband_modem_hso, MM_TYPE_BROADBAND_MODEM_OPTION, 0, @@ -787,7 +787,7 @@ shared_option_init (MMSharedOption *iface) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->create_sim = mm_shared_option_create_sim; iface->create_sim_finish = mm_shared_option_create_sim_finish; diff --git a/src/plugins/option/mm-broadband-modem-option.c b/src/plugins/option/mm-broadband-modem-option.c index 8df1fb2a..39509059 100644 --- a/src/plugins/option/mm-broadband-modem-option.c +++ b/src/plugins/option/mm-broadband-modem-option.c @@ -33,12 +33,12 @@ #include "mm-broadband-modem-option.h" #include "mm-shared-option.h" -static void shared_option_init (MMSharedOption *iface); -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void shared_option_init (MMSharedOption *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemOption, mm_broadband_modem_option, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_SHARED_OPTION, shared_option_init) @@ -1205,7 +1205,7 @@ shared_option_init (MMSharedOption *iface) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/pantech/mm-broadband-modem-pantech.c b/src/plugins/pantech/mm-broadband-modem-pantech.c index d286dc38..510ef2d4 100644 --- a/src/plugins/pantech/mm-broadband-modem-pantech.c +++ b/src/plugins/pantech/mm-broadband-modem-pantech.c @@ -28,7 +28,7 @@ #include "mm-broadband-modem-pantech.h" #include "mm-sim-pantech.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); static MMIfaceModemMessaging *iface_modem_messaging_parent; @@ -164,7 +164,7 @@ mm_broadband_modem_pantech_init (MMBroadbandModemPantech *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* Create Pantech-specific SIM */ iface->create_sim = create_sim; diff --git a/src/plugins/quectel/mm-broadband-modem-mbim-quectel.c b/src/plugins/quectel/mm-broadband-modem-mbim-quectel.c index ab524103..ba345f29 100644 --- a/src/plugins/quectel/mm-broadband-modem-mbim-quectel.c +++ b/src/plugins/quectel/mm-broadband-modem-mbim-quectel.c @@ -22,14 +22,14 @@ #include "mm-iface-modem-time.h" #include "mm-shared-quectel.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void shared_quectel_init (MMSharedQuectel *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void shared_quectel_init (MMSharedQuectel *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimQuectel, mm_broadband_modem_mbim_quectel, MM_TYPE_BROADBAND_MODEM_MBIM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -71,7 +71,7 @@ mm_broadband_modem_mbim_quectel_init (MMBroadbandModemMbimQuectel *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -107,7 +107,7 @@ iface_modem_time_init (MMIfaceModemTime *iface) iface->check_support_finish = mm_shared_quectel_time_check_support_finish; } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_modem_interface (MMSharedQuectel *self) { return iface_modem_parent; diff --git a/src/plugins/quectel/mm-broadband-modem-qmi-quectel.c b/src/plugins/quectel/mm-broadband-modem-qmi-quectel.c index df990f3f..e30d4cc3 100644 --- a/src/plugins/quectel/mm-broadband-modem-qmi-quectel.c +++ b/src/plugins/quectel/mm-broadband-modem-qmi-quectel.c @@ -25,14 +25,14 @@ #include "mm-modem-helpers-quectel.h" #include "mm-shared-quectel.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); static void iface_modem_location_init (MMIfaceModemLocation *iface); static void iface_modem_time_init (MMIfaceModemTime *iface); static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManager *iface); static void shared_quectel_init (MMSharedQuectel *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; static MMIfaceModemLocation *iface_modem_location_parent; static MMIfaceModem3gppProfileManager *iface_modem_3gpp_profile_manager_parent; @@ -153,7 +153,7 @@ mm_broadband_modem_qmi_quectel_init (MMBroadbandModemQmiQuectel *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -195,7 +195,7 @@ peek_parent_broadband_modem_class (MMSharedQuectel *self) return MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_qmi_quectel_parent_class); } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_modem_interface (MMSharedQuectel *self) { return iface_modem_parent; diff --git a/src/plugins/quectel/mm-broadband-modem-quectel.c b/src/plugins/quectel/mm-broadband-modem-quectel.c index a14bd100..91d6e4ed 100644 --- a/src/plugins/quectel/mm-broadband-modem-quectel.c +++ b/src/plugins/quectel/mm-broadband-modem-quectel.c @@ -22,14 +22,14 @@ #include "mm-iface-modem-time.h" #include "mm-shared-quectel.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); -static void shared_quectel_init (MMSharedQuectel *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); +static void shared_quectel_init (MMSharedQuectel *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemQuectel, mm_broadband_modem_quectel, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -68,7 +68,7 @@ mm_broadband_modem_quectel_init (MMBroadbandModemQuectel *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -110,7 +110,7 @@ peek_parent_broadband_modem_class (MMSharedQuectel *self) return MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_quectel_parent_class); } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_modem_interface (MMSharedQuectel *self) { return iface_modem_parent; diff --git a/src/plugins/quectel/mm-shared-quectel.c b/src/plugins/quectel/mm-shared-quectel.c index 3f3b5f81..93cd3d23 100644 --- a/src/plugins/quectel/mm-shared-quectel.c +++ b/src/plugins/quectel/mm-shared-quectel.c @@ -49,7 +49,7 @@ typedef enum { typedef struct { MMBroadbandModemClass *broadband_modem_class_parent; - MMIfaceModem *iface_modem_parent; + MMIfaceModemInterface *iface_modem_parent; MMIfaceModemLocation *iface_modem_location_parent; MMModemLocationSource provided_sources; MMModemLocationSource enabled_sources; @@ -502,7 +502,7 @@ quectel_qusim_check_for_sim_swap_ready (MMIfaceModem *self, { g_autoptr(GError) error = NULL; - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) + if (!MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish (self, res, &error)) mm_obj_warn (self, "couldn't check SIM swap: %s", error->message); else mm_obj_dbg (self, "check SIM swap completed"); @@ -513,12 +513,12 @@ quectel_qusim_unsolicited_handler (MMPortSerialAt *port, GMatchInfo *match_info, MMIfaceModem *self) { - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap || - !MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) + if (!MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap || + !MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap_finish) return; mm_obj_dbg (self, "checking SIM swap"); - MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap ( + MM_IFACE_MODEM_GET_IFACE (self)->check_for_sim_swap ( self, (GAsyncReadyCallback)quectel_qusim_check_for_sim_swap_ready, NULL); diff --git a/src/plugins/quectel/mm-shared-quectel.h b/src/plugins/quectel/mm-shared-quectel.h index 0dfcbde4..802b6c8a 100644 --- a/src/plugins/quectel/mm-shared-quectel.h +++ b/src/plugins/quectel/mm-shared-quectel.h @@ -38,7 +38,7 @@ typedef struct _MMSharedQuectel MMSharedQuectel; struct _MMSharedQuectel { GTypeInterface g_iface; MMBroadbandModemClass * (* peek_parent_broadband_modem_class) (MMSharedQuectel *self); - MMIfaceModem * (* peek_parent_modem_interface) (MMSharedQuectel *self); + MMIfaceModemInterface * (* peek_parent_modem_interface) (MMSharedQuectel *self); MMIfaceModemLocation * (* peek_parent_modem_location_interface) (MMSharedQuectel *self); }; diff --git a/src/plugins/sierra/mm-broadband-modem-sierra-icera.c b/src/plugins/sierra/mm-broadband-modem-sierra-icera.c index bf26f8e1..1761e871 100644 --- a/src/plugins/sierra/mm-broadband-modem-sierra-icera.c +++ b/src/plugins/sierra/mm-broadband-modem-sierra-icera.c @@ -31,7 +31,7 @@ #include "mm-common-sierra.h" #include "mm-broadband-bearer-sierra.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSierraIcera, mm_broadband_modem_sierra_icera, MM_TYPE_BROADBAND_MODEM_ICERA, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)) @@ -124,7 +124,7 @@ mm_broadband_modem_sierra_icera_init (MMBroadbandModemSierraIcera *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { mm_common_sierra_peek_parent_interfaces (iface); diff --git a/src/plugins/sierra/mm-broadband-modem-sierra.c b/src/plugins/sierra/mm-broadband-modem-sierra.c index 801428b5..c9ca5514 100644 --- a/src/plugins/sierra/mm-broadband-modem-sierra.c +++ b/src/plugins/sierra/mm-broadband-modem-sierra.c @@ -37,12 +37,12 @@ #include "mm-common-sierra.h" #include "mm-broadband-bearer-sierra.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_cdma_init (MMIfaceModemCdma *iface); -static void iface_modem_time_init (MMIfaceModemTime *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_cdma_init (MMIfaceModemCdma *iface); +static void iface_modem_time_init (MMIfaceModemTime *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModemCdma *iface_modem_cdma_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModemCdma *iface_modem_cdma_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSierra, mm_broadband_modem_sierra, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -1869,7 +1869,7 @@ mm_broadband_modem_sierra_init (MMBroadbandModemSierra *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/sierra/mm-common-sierra.c b/src/plugins/sierra/mm-common-sierra.c index 06b889ee..74720ebe 100644 --- a/src/plugins/sierra/mm-common-sierra.c +++ b/src/plugins/sierra/mm-common-sierra.c @@ -24,7 +24,7 @@ #include "mm-modem-helpers.h" #include "mm-sim-sierra.h" -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; /*****************************************************************************/ /* Custom init and port type hints */ @@ -510,7 +510,7 @@ mm_common_sierra_setup_ports (MMBroadbandModem *self) /*****************************************************************************/ void -mm_common_sierra_peek_parent_interfaces (MMIfaceModem *iface) +mm_common_sierra_peek_parent_interfaces (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); } diff --git a/src/plugins/sierra/mm-common-sierra.h b/src/plugins/sierra/mm-common-sierra.h index 22471c0f..e24c99c8 100644 --- a/src/plugins/sierra/mm-common-sierra.h +++ b/src/plugins/sierra/mm-common-sierra.h @@ -62,6 +62,6 @@ MMBaseSim *mm_common_sierra_create_sim_finish (MMIfaceModem *self, void mm_common_sierra_setup_ports (MMBroadbandModem *self); -void mm_common_sierra_peek_parent_interfaces (MMIfaceModem *iface); +void mm_common_sierra_peek_parent_interfaces (MMIfaceModemInterface *iface); #endif /* MM_COMMON_SIERRA_H */ diff --git a/src/plugins/simtech/mm-broadband-modem-simtech.c b/src/plugins/simtech/mm-broadband-modem-simtech.c index afe0173a..261b4610 100644 --- a/src/plugins/simtech/mm-broadband-modem-simtech.c +++ b/src/plugins/simtech/mm-broadband-modem-simtech.c @@ -37,16 +37,16 @@ #include "mm-shared-simtech.h" #include "mm-broadband-modem-simtech.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); -static void shared_simtech_init (MMSharedSimtech *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void shared_simtech_init (MMSharedSimtech *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; -static MMIfaceModemLocation *iface_modem_location_parent; -static MMIfaceModemVoice *iface_modem_voice_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSimtech, mm_broadband_modem_simtech, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -1439,7 +1439,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/telit/mm-broadband-modem-mbim-telit.c b/src/plugins/telit/mm-broadband-modem-mbim-telit.c index ae54e992..0f0c6c34 100644 --- a/src/plugins/telit/mm-broadband-modem-mbim-telit.c +++ b/src/plugins/telit/mm-broadband-modem-mbim-telit.c @@ -30,10 +30,10 @@ #include "mm-modem-helpers-telit.h" #include "mm-shared-telit.h" -static void iface_modem_init (MMIfaceModem *iface); -static void shared_telit_init (MMSharedTelit *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void shared_telit_init (MMSharedTelit *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimTelit, mm_broadband_modem_mbim_telit, MM_TYPE_BROADBAND_MODEM_MBIM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -231,7 +231,7 @@ mm_broadband_modem_mbim_telit_init (MMBroadbandModemMbimTelit *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); @@ -251,7 +251,7 @@ iface_modem_init (MMIfaceModem *iface) iface->load_revision = load_revision; } -static MMIfaceModem * +static MMIfaceModemInterface * peek_parent_modem_interface (MMSharedTelit *self) { return iface_modem_parent; diff --git a/src/plugins/telit/mm-broadband-modem-telit.c b/src/plugins/telit/mm-broadband-modem-telit.c index 5cbfd869..f1e8cd79 100644 --- a/src/plugins/telit/mm-broadband-modem-telit.c +++ b/src/plugins/telit/mm-broadband-modem-telit.c @@ -36,14 +36,14 @@ #include "mm-telit-enums-types.h" #include "mm-shared-telit.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static void shared_telit_init (MMSharedTelit *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void shared_telit_init (MMSharedTelit *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; -static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemTelit, mm_broadband_modem_telit, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -1549,7 +1549,7 @@ mm_broadband_modem_telit_init (MMBroadbandModemTelit *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/telit/mm-shared-telit.c b/src/plugins/telit/mm-shared-telit.c index e0029657..9fdcc62e 100644 --- a/src/plugins/telit/mm-shared-telit.c +++ b/src/plugins/telit/mm-shared-telit.c @@ -40,12 +40,12 @@ static GQuark private_quark; typedef struct { - MMIfaceModem *iface_modem_parent; - gboolean alternate_3g_bands; - gboolean ext_4g_bands; - GArray *supported_bands; - GArray *supported_modes; - gchar *software_package_version; + MMIfaceModemInterface *iface_modem_parent; + gboolean alternate_3g_bands; + gboolean ext_4g_bands; + GArray *supported_bands; + GArray *supported_modes; + gchar *software_package_version; } Private; static void @@ -814,4 +814,3 @@ mm_shared_telit_get_type (void) return shared_telit_type; } - diff --git a/src/plugins/telit/mm-shared-telit.h b/src/plugins/telit/mm-shared-telit.h index bf093ea5..911b4cd9 100644 --- a/src/plugins/telit/mm-shared-telit.h +++ b/src/plugins/telit/mm-shared-telit.h @@ -38,7 +38,7 @@ struct _MMSharedTelit { GTypeInterface g_iface; /* Peek modem interface of the parent class of the object */ - MMIfaceModem * (* peek_parent_modem_interface) (MMSharedTelit *self); + MMIfaceModemInterface * (* peek_parent_modem_interface) (MMSharedTelit *self); }; GType mm_shared_telit_get_type (void); diff --git a/src/plugins/thuraya/mm-broadband-modem-thuraya.c b/src/plugins/thuraya/mm-broadband-modem-thuraya.c index badcf968..6ed2aacf 100644 --- a/src/plugins/thuraya/mm-broadband-modem-thuraya.c +++ b/src/plugins/thuraya/mm-broadband-modem-thuraya.c @@ -34,8 +34,8 @@ #include "mm-modem-helpers.h" #include "mm-modem-helpers-thuraya.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_messaging_init (MMIfaceModemMessaging *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemThuraya, mm_broadband_modem_thuraya, MM_TYPE_BROADBAND_MODEM, 0, @@ -239,7 +239,7 @@ mm_broadband_modem_thuraya_init (MMBroadbandModemThuraya *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { /* No need to power-up/power-down the modem */ iface->load_power_state = NULL; diff --git a/src/plugins/ublox/mm-broadband-modem-ublox.c b/src/plugins/ublox/mm-broadband-modem-ublox.c index e45f775b..f64240b0 100644 --- a/src/plugins/ublox/mm-broadband-modem-ublox.c +++ b/src/plugins/ublox/mm-broadband-modem-ublox.c @@ -34,8 +34,8 @@ #include "mm-modem-helpers-ublox.h" #include "mm-ublox-enums-types.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_voice_init (MMIfaceModemVoice *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); static MMIfaceModemVoice *iface_modem_voice_parent; @@ -2010,7 +2010,7 @@ mm_broadband_modem_ublox_init (MMBroadbandModemUblox *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->create_sim = modem_create_sim; iface->create_sim_finish = modem_create_sim_finish; diff --git a/src/plugins/wavecom/mm-broadband-modem-wavecom.c b/src/plugins/wavecom/mm-broadband-modem-wavecom.c index aac7eec2..1b8af4be 100644 --- a/src/plugins/wavecom/mm-broadband-modem-wavecom.c +++ b/src/plugins/wavecom/mm-broadband-modem-wavecom.c @@ -35,8 +35,8 @@ #include "mm-base-modem-at.h" #include "mm-broadband-modem-wavecom.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static MMIfaceModem3gpp *iface_modem_3gpp_parent; @@ -1278,7 +1278,7 @@ mm_broadband_modem_wavecom_init (MMBroadbandModemWavecom *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->load_supported_modes = load_supported_modes; iface->load_supported_modes_finish = load_supported_modes_finish; diff --git a/src/plugins/x22x/mm-broadband-modem-x22x.c b/src/plugins/x22x/mm-broadband-modem-x22x.c index 4f6c75ca..d207390a 100644 --- a/src/plugins/x22x/mm-broadband-modem-x22x.c +++ b/src/plugins/x22x/mm-broadband-modem-x22x.c @@ -31,9 +31,9 @@ #include "mm-iface-modem.h" #include "mm-broadband-modem-x22x.h" -static void iface_modem_init (MMIfaceModem *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); -static MMIfaceModem *iface_modem_parent; +static MMIfaceModemInterface *iface_modem_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemX22x, mm_broadband_modem_x22x, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)) @@ -402,7 +402,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); diff --git a/src/plugins/xmm/mm-broadband-modem-mbim-xmm.c b/src/plugins/xmm/mm-broadband-modem-mbim-xmm.c index 8604dfb7..9698fa51 100644 --- a/src/plugins/xmm/mm-broadband-modem-mbim-xmm.c +++ b/src/plugins/xmm/mm-broadband-modem-mbim-xmm.c @@ -27,9 +27,9 @@ #include "mm-broadband-modem-mbim-xmm.h" #include "mm-shared-xmm.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); -static void shared_xmm_init (MMSharedXmm *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void shared_xmm_init (MMSharedXmm *iface); static MMIfaceModemLocation *iface_modem_location_parent; @@ -72,7 +72,7 @@ mm_broadband_modem_mbim_xmm_init (MMBroadbandModemMbimXmm *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->load_supported_modes = mm_shared_xmm_load_supported_modes; iface->load_supported_modes_finish = mm_shared_xmm_load_supported_modes_finish; diff --git a/src/plugins/xmm/mm-broadband-modem-xmm.c b/src/plugins/xmm/mm-broadband-modem-xmm.c index 71931de9..cc7731c9 100644 --- a/src/plugins/xmm/mm-broadband-modem-xmm.c +++ b/src/plugins/xmm/mm-broadband-modem-xmm.c @@ -27,11 +27,10 @@ #include "mm-broadband-modem-xmm.h" #include "mm-shared-xmm.h" - -static void iface_modem_init (MMIfaceModem *iface); -static void shared_xmm_init (MMSharedXmm *iface); -static void iface_modem_signal_init (MMIfaceModemSignal *iface); -static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void shared_xmm_init (MMSharedXmm *iface); +static void iface_modem_signal_init (MMIfaceModemSignal *iface); +static void iface_modem_location_init (MMIfaceModemLocation *iface); static MMIfaceModemLocation *iface_modem_location_parent; @@ -70,7 +69,7 @@ mm_broadband_modem_xmm_init (MMBroadbandModemXmm *self) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface->load_supported_modes = mm_shared_xmm_load_supported_modes; iface->load_supported_modes_finish = mm_shared_xmm_load_supported_modes_finish; diff --git a/src/plugins/zte/mm-broadband-modem-zte.c b/src/plugins/zte/mm-broadband-modem-zte.c index 275ad9fc..f9bca7fb 100644 --- a/src/plugins/zte/mm-broadband-modem-zte.c +++ b/src/plugins/zte/mm-broadband-modem-zte.c @@ -32,11 +32,11 @@ #include "mm-common-zte.h" #include "mm-broadband-modem-zte.h" -static void iface_modem_init (MMIfaceModem *iface); -static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); +static void iface_modem_init (MMIfaceModemInterface *iface); +static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); -static MMIfaceModem *iface_modem_parent; -static MMIfaceModem3gpp *iface_modem_3gpp_parent; +static MMIfaceModemInterface *iface_modem_parent; +static MMIfaceModem3gpp *iface_modem_3gpp_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemZte, mm_broadband_modem_zte, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -720,7 +720,7 @@ finalize (GObject *object) } static void -iface_modem_init (MMIfaceModem *iface) +iface_modem_init (MMIfaceModemInterface *iface) { iface_modem_parent = g_type_interface_peek_parent (iface); |