aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libmm-glib')
-rw-r--r--libmm-glib/mm-modem-3gpp.c86
-rw-r--r--libmm-glib/mm-modem-3gpp.h13
2 files changed, 99 insertions, 0 deletions
diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c
index 9be4cece..7e99da85 100644
--- a/libmm-glib/mm-modem-3gpp.c
+++ b/libmm-glib/mm-modem-3gpp.c
@@ -1029,6 +1029,92 @@ mm_modem_3gpp_get_initial_eps_bearer_sync (MMModem3gpp *self,
/*****************************************************************************/
+/**
+ * mm_modem_3gpp_set_initial_eps_bearer_settings_finish:
+ * @self: A #MMModem3gpp.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_modem_3gpp_set_initial_eps_bearer_settings().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with mm_modem_3gpp_set_initial_eps_bearer_settings().
+ *
+ * Returns: %TRUE if the operation was successful, %FALSE if @error is set.
+ */
+gboolean
+mm_modem_3gpp_set_initial_eps_bearer_settings_finish (MMModem3gpp *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ return mm_gdbus_modem3gpp_call_set_initial_eps_bearer_settings_finish (MM_GDBUS_MODEM3GPP (self), res, error);
+}
+
+/**
+ * mm_modem_3gpp_set_initial_eps_bearer_settings:
+ * @self: A #MMModem3gpp.
+ * @config: A #MMBearerProperties object with the properties to use.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
+ * @user_data: User data to pass to @callback.
+ *
+ * Asynchronously configures the settings for the initial LTE default bearer.
+ *
+ * When the operation is finished, @callback will be invoked in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from. You can then call
+ * mm_modem_3gpp_set_initial_eps_bearer_settings_finish() to get the result of the operation.
+ */
+void
+mm_modem_3gpp_set_initial_eps_bearer_settings (MMModem3gpp *self,
+ MMBearerProperties *config,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GVariant *dictionary;
+
+ dictionary = mm_bearer_properties_get_dictionary (config);
+ mm_gdbus_modem3gpp_call_set_initial_eps_bearer_settings (MM_GDBUS_MODEM3GPP (self),
+ dictionary,
+ cancellable,
+ callback,
+ user_data);
+ g_variant_unref (dictionary);
+}
+
+/**
+ * mm_modem_3gpp_set_initial_eps_bearer_settings_sync:
+ * @self: A #MMModem3gpp.
+ * @config: A #MMBearerProperties object with the properties to use.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously configures the settings for the initial LTE default bearer.
+ *
+ * The calling thread is blocked until a reply is received. See
+ * mm_modem_3gpp_set_initial_eps_bearer_settings() for the asynchronous
+ * version of this method.
+ *
+ * Returns: %TRUE if the operation was successful, %FALSE if @error is set.
+ */
+gboolean
+mm_modem_3gpp_set_initial_eps_bearer_settings_sync (MMModem3gpp *self,
+ MMBearerProperties *config,
+ GCancellable *cancellable,
+ GError **error)
+{
+ gboolean result;
+ GVariant *dictionary;
+
+ dictionary = mm_bearer_properties_get_dictionary (config);
+ result = mm_gdbus_modem3gpp_call_set_initial_eps_bearer_settings_sync (MM_GDBUS_MODEM3GPP (self),
+ dictionary,
+ cancellable,
+ error);
+ g_variant_unref (dictionary);
+ return result;
+}
+
+/*****************************************************************************/
+
static void
mm_modem_3gpp_init (MMModem3gpp *self)
{
diff --git a/libmm-glib/mm-modem-3gpp.h b/libmm-glib/mm-modem-3gpp.h
index ce7df740..916a58de 100644
--- a/libmm-glib/mm-modem-3gpp.h
+++ b/libmm-glib/mm-modem-3gpp.h
@@ -154,6 +154,19 @@ MMBearer *mm_modem_3gpp_get_initial_eps_bearer_sync (MMModem3gpp *sel
GCancellable *cancellable,
GError **error);
+void mm_modem_3gpp_set_initial_eps_bearer_settings (MMModem3gpp *self,
+ MMBearerProperties *config,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_modem_3gpp_set_initial_eps_bearer_settings_finish (MMModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
+gboolean mm_modem_3gpp_set_initial_eps_bearer_settings_sync (MMModem3gpp *self,
+ MMBearerProperties *config,
+ GCancellable *cancellable,
+ GError **error);
+
/* Deprecated APIs */
G_DEPRECATED
MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state (MMModem3gpp *self);