aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-broadband-modem.c')
-rw-r--r--src/mm-broadband-modem.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 28a17401..cf7bc83e 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -10497,15 +10497,18 @@ profile_manager_cgdel_set_ready (MMBaseModem *self,
}
static void
-modem_3gpp_profile_manager_delete_profile (MMIfaceModem3gppProfileManager *self,
- MM3gppProfile *profile,
- GAsyncReadyCallback callback,
- gpointer user_data)
+modem_3gpp_profile_manager_delete_profile (MMIfaceModem3gppProfileManager *self,
+ MM3gppProfile *profile,
+ const gchar *index_field,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_autofree gchar *cmd = NULL;
GTask *task;
gint profile_id;
+ g_assert (g_strcmp0 (index_field, "profile-id") == 0);
+
task = g_task_new (self, NULL, callback, user_data);
profile_id = mm_3gpp_profile_get_profile_id (profile);
@@ -10669,15 +10672,21 @@ modem_3gpp_profile_manager_deactivate_profile (MMIfaceModem3gppProfileManager *s
/*****************************************************************************/
/* Store profile (3GPP profile management interface) */
-static gint
+static gboolean
modem_3gpp_profile_manager_store_profile_finish (MMIfaceModem3gppProfileManager *self,
GAsyncResult *res,
+ gint *out_profile_id,
+ MMBearerApnType *out_apn_type,
GError **error)
{
if (!g_task_propagate_boolean (G_TASK (res), error))
- return MM_3GPP_PROFILE_ID_UNKNOWN;
+ return FALSE;
- return GPOINTER_TO_INT (g_task_get_task_data (G_TASK (res)));
+ if (out_profile_id)
+ *out_profile_id = GPOINTER_TO_INT (g_task_get_task_data (G_TASK (res)));
+ if (out_apn_type)
+ *out_apn_type = MM_BEARER_APN_TYPE_NONE;
+ return TRUE;
}
static void
@@ -10697,6 +10706,7 @@ store_profile_cgdcont_set_ready (MMBaseModem *self,
static void
modem_3gpp_profile_manager_store_profile (MMIfaceModem3gppProfileManager *self,
MM3gppProfile *profile,
+ const gchar *index_field,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -10709,6 +10719,8 @@ modem_3gpp_profile_manager_store_profile (MMIfaceModem3gppProfileManager *self,
g_autofree gchar *quoted_apn = NULL;
g_autofree gchar *cmd = NULL;
+ g_assert (g_strcmp0 (index_field, "profile-id") == 0);
+
task = g_task_new (self, NULL, callback, user_data);
profile_id = mm_3gpp_profile_get_profile_id (profile);