aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-modem-3gpp.c
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2020-12-11 14:15:11 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-04-30 18:40:29 +0000
commit25ffe4211afa37a68274535d64a12670fd5ceebc (patch)
treef2e0dbefefdf8979137c40ca5fa39d725f5063ba /libmm-glib/mm-modem-3gpp.c
parentb1dde0aec39089161268452b54ea92737ae00aa5 (diff)
api,libmm-glib,cli: add command to disable facility lock
Diffstat (limited to 'libmm-glib/mm-modem-3gpp.c')
-rw-r--r--libmm-glib/mm-modem-3gpp.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c
index 1cfb419d..a559ca2a 100644
--- a/libmm-glib/mm-modem-3gpp.c
+++ b/libmm-glib/mm-modem-3gpp.c
@@ -1260,6 +1260,56 @@ mm_modem_3gpp_set_initial_eps_bearer_settings_sync (MMModem3gpp *self,
/*****************************************************************************/
+void
+mm_modem_3gpp_disable_facility_lock (MMModem3gpp *self,
+ MMModem3gppFacility facility,
+ const gchar *control_key,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GVariant *properties;
+
+ properties = g_variant_ref_sink (g_variant_new ("(us)", (guint)facility, control_key));
+ mm_gdbus_modem3gpp_call_disable_facility_lock (MM_GDBUS_MODEM3GPP (self),
+ properties,
+ cancellable,
+ callback,
+ user_data);
+ g_variant_unref (properties);
+}
+
+gboolean
+mm_modem_3gpp_disable_facility_lock_finish (MMModem3gpp *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ return mm_gdbus_modem3gpp_call_disable_facility_lock_finish (MM_GDBUS_MODEM3GPP (self),
+ res,
+ error);
+}
+
+gboolean
+mm_modem_3gpp_disable_facility_lock_sync (MMModem3gpp *self,
+ MMModem3gppFacility facility,
+ const gchar *control_key,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *properties;
+ gboolean result;
+
+ properties = g_variant_ref_sink (g_variant_new ("(us)", (guint)facility, control_key));
+ result = mm_gdbus_modem3gpp_call_disable_facility_lock_sync (MM_GDBUS_MODEM3GPP (self),
+ properties,
+ cancellable,
+ error);
+ g_variant_unref (properties);
+ return result;
+}
+
+/*****************************************************************************/
+
static void
mm_modem_3gpp_init (MMModem3gpp *self)
{