aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2024-04-18 10:05:51 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2024-05-06 13:27:04 +0000
commitab6e4bf391cf3d05dc7758b4bf8844e3ac1e7da7 (patch)
tree955b4403ac2387bcaf3bda4e4190c8d68163b1da /src/mm-iface-modem-3gpp.c
parent35c0a6905be622a4e938b66c6128d270cebf1bdc (diff)
iface-modem-3gpp: use G_DECLARE|DEFINE_INTERFACE() macros
Diffstat (limited to 'src/mm-iface-modem-3gpp.c')
-rw-r--r--src/mm-iface-modem-3gpp.c419
1 files changed, 199 insertions, 220 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index a7426937..2adb63f3 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -54,6 +54,7 @@
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ACCESS_TYPE_PREFERENCE | \
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ROAMING_ALLOWANCE)
+G_DEFINE_INTERFACE (MMIfaceModem3gpp, mm_iface_modem_3gpp, MM_TYPE_IFACE_MODEM)
/*****************************************************************************/
/* Private data context */
@@ -617,7 +618,7 @@ register_in_network_ready (MMIfaceModem3gpp *self,
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network_finish (self, res, &error)) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->register_in_network_finish (self, res, &error)) {
/* Propagate error when trying to lock to network */
register_in_network_context_complete_failed (task, error);
return;
@@ -699,7 +700,7 @@ initial_registration_checks_ready (MMIfaceModem3gpp *self,
priv->pending_registration_cancellable = g_object_ref (ctx->cancellable);
ctx->timer = g_timer_new ();
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->register_in_network (
self,
ctx->operator_id,
ctx->cancellable,
@@ -852,8 +853,8 @@ handle_register_auth_ready (MMBaseModem *self,
return;
}
- g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network != NULL);
- g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network_finish != NULL);
+ g_assert (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->register_in_network != NULL);
+ g_assert (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->register_in_network_finish != NULL);
g_object_get (self,
MM_IFACE_MODEM_STATE, &modem_state,
@@ -990,7 +991,7 @@ handle_scan_ready (MMIfaceModem3gpp *self,
GList *info_list;
g_autoptr(GVariant) dict_array = NULL;
- info_list = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->scan_networks_finish (self, res, &error);
+ info_list = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->scan_networks_finish (self, res, &error);
if (error) {
mm_obj_warn (self, "failed scanning networks: %s", error->message);
mm_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -1019,8 +1020,8 @@ handle_scan_auth_ready (MMBaseModem *self,
}
/* If scanning is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->scan_networks ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->scan_networks_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->scan_networks ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->scan_networks_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Cannot scan networks: operation not supported");
handle_scan_context_free (ctx);
@@ -1034,7 +1035,7 @@ handle_scan_auth_ready (MMBaseModem *self,
return;
}
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->scan_networks (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->scan_networks (
MM_IFACE_MODEM_3GPP (self),
(GAsyncReadyCallback)handle_scan_ready,
ctx);
@@ -1086,7 +1087,7 @@ after_set_load_eps_ue_mode_operation_ready (MMIfaceModem3gpp *
MMModem3gppEpsUeModeOperation uemode;
GError *error = NULL;
- uemode = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
+ uemode = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
if (error) {
mm_obj_warn (self, "failed reloading EPS UE mode of operation after update to '%s': %s",
mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode),
@@ -1118,7 +1119,7 @@ handle_set_eps_ue_mode_operation_ready (MMIfaceModem3gpp *self
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation_finish (self, res, &error)) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_eps_ue_mode_operation_finish (self, res, &error)) {
mm_obj_warn (self, "failed setting EPS UE mode of operation to '%s': %s",
mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode),
error->message);
@@ -1127,9 +1128,9 @@ handle_set_eps_ue_mode_operation_ready (MMIfaceModem3gpp *self
return;
}
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation (
self,
(GAsyncReadyCallback)after_set_load_eps_ue_mode_operation_ready,
ctx);
@@ -1165,8 +1166,8 @@ handle_set_eps_ue_mode_operation_auth_ready (MMBaseModem
}
/* If UE mode update is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_eps_ue_mode_operation ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_eps_ue_mode_operation_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Cannot set UE mode of operation for EPS: operation not supported");
handle_set_eps_ue_mode_operation_context_free (ctx);
@@ -1176,7 +1177,7 @@ handle_set_eps_ue_mode_operation_auth_ready (MMBaseModem
mm_obj_info (self, "processing user request to set EPS UE mode of operation to '%s'...",
mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode));
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_eps_ue_mode_operation (
MM_IFACE_MODEM_3GPP (self),
ctx->mode,
(GAsyncReadyCallback)handle_set_eps_ue_mode_operation_ready,
@@ -1235,7 +1236,7 @@ after_set_load_initial_eps_bearer_settings_ready (MMIfaceModem3gpp
g_autoptr(MMBearerProperties) new_config = NULL;
g_autoptr(GVariant) dictionary = NULL;
- new_config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
+ new_config = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
if (error) {
mm_obj_warn (self, "failed reloading initial EPS bearer settings after update: %s", error->message);
mm_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -1266,7 +1267,7 @@ set_initial_eps_bearer_settings_ready (MMIfaceModem3gpp
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings_finish (self, res, &error)) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_initial_eps_bearer_settings_finish (self, res, &error)) {
mm_obj_warn (self, "failed setting initial EPS bearer settings: %s", error->message);
/* process profile manager updates right away on error */
mm_iface_modem_3gpp_profile_manager_update_ignore_stop (MM_IFACE_MODEM_3GPP_PROFILE_MANAGER (self));
@@ -1280,9 +1281,9 @@ set_initial_eps_bearer_settings_ready (MMIfaceModem3gpp
/* delay processing profile manager updates on success */
mm_iface_modem_3gpp_profile_manager_update_ignore_stop_delayed (MM_IFACE_MODEM_3GPP_PROFILE_MANAGER (self));
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings (
self,
(GAsyncReadyCallback)after_set_load_initial_eps_bearer_settings_ready,
ctx);
@@ -1311,8 +1312,8 @@ set_initial_eps_bearer_settings_auth_ready (MMBaseModem
}
/* If UE mode update is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_initial_eps_bearer_settings ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_initial_eps_bearer_settings_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Operation not supported");
handle_set_initial_eps_bearer_settings_context_free (ctx);
@@ -1345,7 +1346,7 @@ set_initial_eps_bearer_settings_auth_ready (MMBaseModem
/* Start ignoring our own indications */
mm_iface_modem_3gpp_profile_manager_update_ignore_start (MM_IFACE_MODEM_3GPP_PROFILE_MANAGER (self));
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_initial_eps_bearer_settings (
MM_IFACE_MODEM_3GPP (self),
ctx->config,
(GAsyncReadyCallback)set_initial_eps_bearer_settings_ready,
@@ -1425,7 +1426,7 @@ handle_disable_facility_lock_ready (MMIfaceModem3gpp *self,
MMModem3gppFacility facilities;
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock_finish (self, res, &error)) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_facility_lock_finish (self, res, &error)) {
mm_obj_warn (self, "failed disabling facility lock '%s': %s",
ctx->facility_str, error->message);
mm_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -1461,8 +1462,8 @@ disable_facility_lock_auth_ready (MMBaseModem *self,
}
/* If disable facility locks is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_facility_lock ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_facility_lock_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Operation not supported");
handle_disable_facility_lock_context_free (ctx);
@@ -1501,7 +1502,7 @@ disable_facility_lock_auth_ready (MMBaseModem *self,
ctx->facility_str = mm_modem_3gpp_facility_build_string_from_mask (ctx->facility);
mm_obj_info (self, "processing user request to disable facility lock '%s'...", ctx->facility_str);
mm_obj_info (self, " control key: %s", mm_log_str_personal_info (ctx->control_key));
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_facility_lock (
MM_IFACE_MODEM_3GPP (self),
ctx->facility,
ctx->slot,
@@ -1550,7 +1551,7 @@ set_packet_service_state_ready (MMIfaceModem3gpp *self,
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state_finish (self, res, &error))
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_packet_service_state_finish (self, res, &error))
g_task_return_error (task, error);
else
g_task_return_boolean (task, TRUE);
@@ -1570,15 +1571,15 @@ mm_iface_modem_3gpp_set_packet_service_state (MMIfaceModem3gpp *sel
task = g_task_new (self, NULL, callback, user_data);
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_packet_service_state ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_packet_service_state_finish) {
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Explicit packet service attach/detach operation not supported");
g_object_unref (task);
return;
}
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_packet_service_state (
self,
packet_service_state,
(GAsyncReadyCallback)set_packet_service_state_ready,
@@ -1712,7 +1713,7 @@ after_set_load_nr5g_registration_settings_ready (MMIfaceModem3gpp
g_autoptr(MMNr5gRegistrationSettings) new_settings = NULL;
g_autoptr(GVariant) dictionary = NULL;
- new_settings = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
+ new_settings = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
if (error) {
mm_dbus_method_invocation_take_error (ctx->invocation, error);
handle_set_nr5g_registration_settings_context_free (ctx);
@@ -1742,16 +1743,16 @@ set_nr5g_registration_settings_ready (MMIfaceModem3gpp *
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings_finish (self, res, &error)) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_nr5g_registration_settings_finish (self, res, &error)) {
mm_obj_warn (self, "failed setting 5GNR registration settings: %s", error->message);
mm_dbus_method_invocation_take_error (ctx->invocation, error);
handle_set_nr5g_registration_settings_context_free (ctx);
return;
}
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings (
self,
(GAsyncReadyCallback)after_set_load_nr5g_registration_settings_ready,
ctx);
@@ -1782,8 +1783,8 @@ set_nr5g_registration_settings_auth_ready (MMBaseModem
}
/* If 5GNR registration settings update is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_nr5g_registration_settings ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_nr5g_registration_settings_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Operation not supported");
handle_set_nr5g_registration_settings_context_free (ctx);
@@ -1828,7 +1829,7 @@ set_nr5g_registration_settings_auth_ready (MMBaseModem
return;
}
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_nr5g_registration_settings (
MM_IFACE_MODEM_3GPP (self),
ctx->settings,
(GAsyncReadyCallback)set_nr5g_registration_settings_ready,
@@ -1864,8 +1865,8 @@ mm_iface_modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self,
GAsyncResult *res,
GError **error)
{
- g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks_finish != NULL);
- return MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks_finish (self, res, error);
+ g_assert (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->run_registration_checks_finish != NULL);
+ return MM_IFACE_MODEM_3GPP_GET_IFACE (self)->run_registration_checks_finish (self, res, error);
}
void
@@ -1878,7 +1879,7 @@ mm_iface_modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self,
gboolean is_eps_supported;
gboolean is_5gs_supported;
- g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks != NULL);
+ g_assert (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->run_registration_checks != NULL);
is_cs_supported = get_cs_network_supported (self);
is_ps_supported = get_ps_network_supported (self);
@@ -1891,13 +1892,13 @@ mm_iface_modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self,
is_eps_supported ? "yes" : "no",
is_5gs_supported ? "yes" : "no");
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks (self,
- is_cs_supported,
- is_ps_supported,
- is_eps_supported,
- is_5gs_supported,
- callback,
- user_data);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->run_registration_checks (self,
+ is_cs_supported,
+ is_ps_supported,
+ is_eps_supported,
+ is_5gs_supported,
+ callback,
+ user_data);
}
/*****************************************************************************/
@@ -1937,7 +1938,7 @@ load_operator_name_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- str = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_name_finish (self, res, &error);
+ str = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_name_finish (self, res, &error);
if (error) {
mm_obj_warn (self, "couldn't load operator name: %s", error->message);
g_error_free (error);
@@ -1962,7 +1963,7 @@ load_operator_code_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- str = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_code_finish (self, res, &error);
+ str = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_code_finish (self, res, &error);
if (error) {
mm_obj_warn (self, "couldn't load operator code: %s", error->message);
} else if (!mm_3gpp_parse_operator_id (str, NULL, NULL, NULL, &error)) {
@@ -1995,7 +1996,7 @@ reload_current_registration_info_context_step (GTask *task)
if (!ctx->operator_code_loaded) {
/* Launch operator code update */
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_code (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_code (
self,
(GAsyncReadyCallback)load_operator_code_ready,
task);
@@ -2004,7 +2005,7 @@ reload_current_registration_info_context_step (GTask *task)
if (!ctx->operator_name_loaded) {
/* Launch operator name update */
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_name (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_name (
self,
(GAsyncReadyCallback)load_operator_name_ready,
task);
@@ -2041,16 +2042,16 @@ mm_iface_modem_3gpp_reload_current_registration_info (MMIfaceModem3gpp *self,
return;
}
- ctx->operator_code_loaded = !(MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_code &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_code_finish);
+ ctx->operator_code_loaded = !(MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_code &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_code_finish);
if (ctx->operator_code_loaded) {
mm_gdbus_modem3gpp_set_operator_code (ctx->skeleton, NULL);
if (MM_IS_IFACE_MODEM_LOCATION (self))
mm_iface_modem_location_3gpp_update_operator_code (MM_IFACE_MODEM_LOCATION (self), NULL);
}
- ctx->operator_name_loaded = !(MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_name &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_name_finish);
+ ctx->operator_name_loaded = !(MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_name &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_operator_name_finish);
if (ctx->operator_name_loaded)
mm_gdbus_modem3gpp_set_operator_name (ctx->skeleton, NULL);
@@ -2519,8 +2520,8 @@ mm_iface_modem_3gpp_update_initial_eps_bearer (MMIfaceModem3gpp *self,
}
mm_obj_dbg (self, "updating initial EPS bearer...");
- g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->create_initial_eps_bearer);
- new_bearer = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->create_initial_eps_bearer (self, properties);
+ g_assert (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->create_initial_eps_bearer);
+ new_bearer = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->create_initial_eps_bearer (self, properties);
g_object_set (self,
MM_IFACE_MODEM_3GPP_INITIAL_EPS_BEARER, new_bearer,
NULL);
@@ -2535,7 +2536,7 @@ reload_initial_eps_bearer_ready (MMIfaceModem3gpp *self,
g_autoptr(MMBearerProperties) properties = NULL;
g_autoptr(GError) error = NULL;
- properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
+ properties = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
if (!properties) {
mm_obj_dbg (self, "couldn't load initial default bearer properties: %s", error->message);
return;
@@ -2548,9 +2549,9 @@ void
mm_iface_modem_3gpp_reload_initial_eps_bearer (MMIfaceModem3gpp *self)
{
if (get_eps_network_supported (self) &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer (
self,
(GAsyncReadyCallback)reload_initial_eps_bearer_ready,
NULL);
@@ -2604,7 +2605,7 @@ mm_iface_modem_3gpp_disable_finish (MMIfaceModem3gpp *self,
DisablingContext *ctx; \
g_autoptr(GError) error = NULL; \
\
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->NAME##_finish (self, res, &error); \
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->NAME##_finish (self, res, &error); \
if (error) \
mm_obj_dbg (self, "couldn't %s: %s", DISPLAY, error->message); \
\
@@ -2651,9 +2652,9 @@ interface_disabling_step (GTask *task)
/* fall through */
case DISABLING_STEP_DISABLE_UNSOLICITED_REGISTRATION_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_registration_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_registration_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_registration_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_registration_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_registration_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_registration_events (
self,
get_cs_network_supported (self),
get_ps_network_supported (self),
@@ -2666,9 +2667,9 @@ interface_disabling_step (GTask *task)
/* fall through */
case DISABLING_STEP_CLEANUP_UNSOLICITED_REGISTRATION_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_registration_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_registration_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_registration_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_registration_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_registration_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_registration_events (
self,
(GAsyncReadyCallback)cleanup_unsolicited_registration_events_ready,
task);
@@ -2678,9 +2679,9 @@ interface_disabling_step (GTask *task)
/* fall through */
case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->cleanup_unsolicited_events (
self,
(GAsyncReadyCallback)cleanup_unsolicited_events_ready,
task);
@@ -2690,9 +2691,9 @@ interface_disabling_step (GTask *task)
/* fall through */
case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->disable_unsolicited_events (
self,
(GAsyncReadyCallback)disable_unsolicited_events_ready,
task);
@@ -2797,7 +2798,7 @@ setup_unsolicited_events_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events_finish (self, res, &error);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_events_finish (self, res, &error);
if (error) {
mm_obj_dbg (self, "setting up unsolicited events failed: %s", error->message);
@@ -2821,7 +2822,7 @@ enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
EnablingContext *ctx;
g_autoptr(GError) error = NULL;
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_events_finish (self, res, &error);
if (error)
mm_obj_dbg (self, "enabling unsolicited events failed: %s", error->message);
@@ -2841,7 +2842,7 @@ setup_unsolicited_registration_events_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events_finish (self, res, &error);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_registration_events_finish (self, res, &error);
if (error) {
mm_obj_dbg (self, "setting up unsolicited registration events failed: %s", error->message);
/* If error, setup periodic registration checks */
@@ -2867,7 +2868,7 @@ enable_unsolicited_registration_events_ready (MMIfaceModem3gpp *self,
EnablingContext *ctx;
g_autoptr(GError) error = NULL;
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_registration_events_finish (self, res, &error);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_registration_events_finish (self, res, &error);
if (error) {
mm_obj_dbg (self, "enabling unsolicited registration events failed: %s", error->message);
/* If error, setup periodic registration checks */
@@ -2891,7 +2892,7 @@ load_initial_eps_bearer_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
+ properties = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
if (!properties)
mm_obj_dbg (self, "couldn't load initial default bearer properties: %s", error->message);
else
@@ -2929,9 +2930,9 @@ interface_enabling_step (GTask *task)
/* fall through */
case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_events (
self,
(GAsyncReadyCallback)setup_unsolicited_events_ready,
task);
@@ -2941,9 +2942,9 @@ interface_enabling_step (GTask *task)
/* fall through */
case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_events (
self,
(GAsyncReadyCallback)enable_unsolicited_events_ready,
task);
@@ -2953,9 +2954,9 @@ interface_enabling_step (GTask *task)
/* fall through */
case ENABLING_STEP_SETUP_UNSOLICITED_REGISTRATION_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_registration_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_registration_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->setup_unsolicited_registration_events (
self,
(GAsyncReadyCallback)setup_unsolicited_registration_events_ready,
task);
@@ -2965,9 +2966,9 @@ interface_enabling_step (GTask *task)
/* fall through */
case ENABLING_STEP_ENABLE_UNSOLICITED_REGISTRATION_EVENTS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_registration_events &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_registration_events_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_registration_events (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_registration_events &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_registration_events_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->enable_unsolicited_registration_events (
self,
get_cs_network_supported (self),
get_ps_network_supported (self),
@@ -2981,9 +2982,9 @@ interface_enabling_step (GTask *task)
case ENABLING_STEP_INITIAL_EPS_BEARER:
if (get_eps_network_supported (self) &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer (
self,
(GAsyncReadyCallback)load_initial_eps_bearer_ready,
task);
@@ -3070,7 +3071,7 @@ sync_eps_bearer_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
+ properties = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
if (!properties)
mm_obj_dbg (self, "couldn't refresh initial EPS bearer status: %s", error->message);
else
@@ -3090,9 +3091,9 @@ sync_eps_bearer (MMIfaceModem3gpp *self,
/* Refresh EPS bearer if supported */
if (get_eps_network_supported (self) &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer (
self,
callback,
task);
@@ -3249,7 +3250,7 @@ load_nr5g_registration_settings_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- settings = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
+ settings = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
if (!settings) {
mm_obj_dbg (self, "couldn't load 5GNR registration settings: %s", error->message);
} else {
@@ -3275,7 +3276,7 @@ load_initial_eps_bearer_settings_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
+ config = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
if (!config)
mm_obj_dbg (self, "couldn't load initial EPS bearer settings: %s", error->message);
else {
@@ -3301,7 +3302,7 @@ load_eps_ue_mode_operation_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- uemode = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
+ uemode = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
mm_gdbus_modem3gpp_set_eps_ue_mode_operation (ctx->skeleton, uemode);
if (error)
@@ -3323,7 +3324,7 @@ load_enabled_facility_locks_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- facilities = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks_finish (self, res, &error);
+ facilities = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_enabled_facility_locks_finish (self, res, &error);
mm_gdbus_modem3gpp_set_enabled_facility_locks (ctx->skeleton, facilities);
if (error)
@@ -3360,7 +3361,7 @@ load_imei_ready (MMIfaceModem3gpp *self,
ctx = g_task_get_task_data (task);
- imei = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_imei_finish (self, res, &error);
+ imei = MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_imei_finish (self, res, &error);
mm_gdbus_modem3gpp_set_imei (ctx->skeleton, imei);
if (error)
@@ -3397,7 +3398,7 @@ handle_set_carrier_lock_ready (MMIfaceModem3gpp *self,
{
GError *error = NULL;
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_carrier_lock_finish (self, res, &error))
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_carrier_lock_finish (self, res, &error))
mm_dbus_method_invocation_take_error (ctx->invocation, error);
else
mm_gdbus_modem3gpp_complete_set_carrier_lock (ctx->skeleton, ctx->invocation);
@@ -3420,8 +3421,8 @@ handle_set_carrier_lock_auth_ready (MMBaseModem *self,
}
/* If carrier lock is not implemented, report an error */
- if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_carrier_lock ||
- !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_carrier_lock_finish) {
+ if (!MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_carrier_lock ||
+ !MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_carrier_lock_finish) {
mm_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Cannot send set carrier lock request to modem: "
"operation not supported");
@@ -3430,11 +3431,12 @@ handle_set_carrier_lock_auth_ready (MMBaseModem *self,
}
data = (const guint8 *) g_variant_get_fixed_array (ctx->data, &data_size, sizeof (guint8));
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_carrier_lock (ctx->self,
- data,
- data_size,
- (GAsyncReadyCallback)handle_set_carrier_lock_ready,
- ctx);
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->set_carrier_lock (
+ ctx->self,
+ data,
+ data_size,
+ (GAsyncReadyCallback)handle_set_carrier_lock_ready,
+ ctx);
}
static gboolean
@@ -3483,9 +3485,9 @@ interface_initialization_step (GTask *task)
/* fall through */
case INITIALIZATION_STEP_ENABLED_FACILITY_LOCKS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_enabled_facility_locks &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_enabled_facility_locks_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_enabled_facility_locks (
self,
(GAsyncReadyCallback)load_enabled_facility_locks_ready,
task);
@@ -3499,9 +3501,9 @@ interface_initialization_step (GTask *task)
* lifetime of the modem. Therefore, if we already have it loaded,
* don't try to load it again. */
if (!mm_gdbus_modem3gpp_get_imei (ctx->skeleton) &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_imei &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_imei_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_imei (
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_imei &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_imei_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_imei (
self,
(GAsyncReadyCallback)load_imei_ready,
task);
@@ -3526,9 +3528,9 @@ interface_initialization_step (GTask *task)
/* fall through */
case INITIALIZATION_STEP_EPS_UE_MODE_OPERATION:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_eps_ue_mode_operation (
self,
(GAsyncReadyCallback)load_eps_ue_mode_operation_ready,
task);
@@ -3538,9 +3540,9 @@ interface_initialization_step (GTask *task)
/* fall through */
case INITIALIZATION_STEP_EPS_INITIAL_BEARER_SETTINGS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_initial_eps_bearer_settings (
self,
(GAsyncReadyCallback)load_initial_eps_bearer_settings_ready,
task);
@@ -3550,9 +3552,9 @@ interface_initialization_step (GTask *task)
/* fall through */
case INITIALIZATION_STEP_NR5G_REGISTRATION_SETTINGS:
- if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings &&
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish) {
- MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings (
+ if (MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings &&
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings_finish) {
+ MM_IFACE_MODEM_3GPP_GET_IFACE (self)->load_nr5g_registration_settings (
self,
(GAsyncReadyCallback)load_nr5g_registration_settings_ready,
task);
@@ -3692,111 +3694,88 @@ mm_iface_modem_3gpp_shutdown (MMIfaceModem3gpp *self)
/*****************************************************************************/
static void
-iface_modem_3gpp_init (gpointer g_iface)
+mm_iface_modem_3gpp_default_init (MMIfaceModem3gppInterface *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_3GPP_DBUS_SKELETON,
- "3GPP DBus skeleton",
- "DBus skeleton for the 3GPP interface",
- MM_GDBUS_TYPE_MODEM3GPP_SKELETON,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_enum (MM_IFACE_MODEM_3GPP_REGISTRATION_STATE,
- "RegistrationState",
- "Registration state of the modem",
- MM_TYPE_MODEM_3GPP_REGISTRATION_STATE,
- MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boolean (MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED,
- "CS network supported",
- "Whether the modem works in the CS network",
- TRUE,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boolean (MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED,
- "PS network supported",
- "Whether the modem works in the PS network",
- TRUE,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boolean (MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED,
- "EPS network supported",
- "Whether the modem works in the EPS network",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boolean (MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED,
- "5GS network supported",
- "Whether the modem works in the 5GS network",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_flags (MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS,
- "Ignored locks",
- "Ignored facility locks",
- MM_TYPE_MODEM_3GPP_FACILITY,
- MM_MODEM_3GPP_FACILITY_NONE,
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_object (MM_IFACE_MODEM_3GPP_DBUS_SKELETON,
+ "3GPP DBus skeleton",
+ "DBus skeleton for the 3GPP interface",
+ MM_GDBUS_TYPE_MODEM3GPP_SKELETON,
G_PARAM_READWRITE));
- g_object_interface_install_property
- (g_iface,
- g_param_spec_object (MM_IFACE_MODEM_3GPP_INITIAL_EPS_BEARER,
- "Initial EPS bearer",
- "Initial EPS bearer setup during registration",
- MM_TYPE_BASE_BEARER,
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_enum (MM_IFACE_MODEM_3GPP_REGISTRATION_STATE,
+ "RegistrationState",
+ "Registration state of the modem",
+ MM_TYPE_MODEM_3GPP_REGISTRATION_STATE,
+ MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,
+ G_PARAM_READWRITE));
+
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_boolean (MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED,
+ "CS network supported",
+ "Whether the modem works in the CS network",
+ TRUE,
G_PARAM_READWRITE));
- g_object_interface_install_property
- (g_iface,
- g_param_spec_enum (MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE,
- "PacketServiceState",
- "Packet service state of the modem",
- MM_TYPE_MODEM_3GPP_PACKET_SERVICE_STATE,
- MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN,
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_boolean (MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED,
+ "PS network supported",
+ "Whether the modem works in the PS network",
+ TRUE,
G_PARAM_READWRITE));
- initialized = TRUE;
-}
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_boolean (MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED,
+ "EPS network supported",
+ "Whether the modem works in the EPS network",
+ FALSE,
+ G_PARAM_READWRITE));
-GType
-mm_iface_modem_3gpp_get_type (void)
-{
- static GType iface_modem_3gpp_type = 0;
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_boolean (MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED,
+ "5GS network supported",
+ "Whether the modem works in the 5GS network",
+ FALSE,
+ G_PARAM_READWRITE));
- if (!G_UNLIKELY (iface_modem_3gpp_type)) {
- static const GTypeInfo info = {
- sizeof (MMIfaceModem3gpp), /* class_size */
- iface_modem_3gpp_init, /* base_init */
- NULL, /* base_finalize */
- };
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_flags (MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS,
+ "Ignored locks",
+ "Ignored facility locks",
+ MM_TYPE_MODEM_3GPP_FACILITY,
+ MM_MODEM_3GPP_FACILITY_NONE,
+ G_PARAM_READWRITE));
- iface_modem_3gpp_type = g_type_register_static (G_TYPE_INTERFACE,
- "MMIfaceModem3gpp",
- &info,
- 0);
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_object (MM_IFACE_MODEM_3GPP_INITIAL_EPS_BEARER,
+ "Initial EPS bearer",
+ "Initial EPS bearer setup during registration",
+ MM_TYPE_BASE_BEARER,
+ G_PARAM_READWRITE));
- g_type_interface_add_prerequisite (iface_modem_3gpp_type, MM_TYPE_IFACE_MODEM);
- }
+ g_object_interface_install_property (
+ iface,
+ g_param_spec_enum (MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE,
+ "PacketServiceState",
+ "Packet service state of the modem",
+ MM_TYPE_MODEM_3GPP_PACKET_SERVICE_STATE,
+ MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN,
+ G_PARAM_READWRITE));
- return iface_modem_3gpp_type;
+ g_once_init_leave (&initialized, 1);
}