diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-12-28 18:41:50 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-01-20 15:41:07 +0100 |
commit | d4aaa436d9679524f910b13176d4af35bd6b14f8 (patch) | |
tree | 649e8b340e495b18d41afc1887dd10c834100c9b /libmm-glib/mm-modem-3gpp.c | |
parent | c5c9ab279d6362b2090010b4cad9ea49e9559423 (diff) |
modem-3gpp: allow loading and changing EPS UE mode of operation
The UE modes of operation for LTE are defined in 3GPP TS 24.301 (e.g.
section 4.3 in v10.3.0):
* PS mode 1: EPS only, 'voice centric'
* PS mode 2: EPS only, 'data centric'
* CS/PS mode 1: EPS and non-EPS, 'voice centric'
* CS/PS mode 2: EPS and non-EPS, 'data centric'
The mode specifies, among other things, how the UE should behave w.r.t
CS fallback depending on the capabilities reported by the network.
Diffstat (limited to 'libmm-glib/mm-modem-3gpp.c')
-rw-r--r-- | libmm-glib/mm-modem-3gpp.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c index a926acc1..69edc276 100644 --- a/libmm-glib/mm-modem-3gpp.c +++ b/libmm-glib/mm-modem-3gpp.c @@ -280,6 +280,22 @@ mm_modem_3gpp_get_enabled_facility_locks (MMModem3gpp *self) return mm_gdbus_modem3gpp_get_enabled_facility_locks (MM_GDBUS_MODEM3GPP (self)); } +/** + * mm_modem_3gpp_get_eps_ue_mode_operation: + * @self: A #MMModem3gpp. + * + * Get the UE mode of operation for EPS. + * + * Returns: A #MMModem3gppEpsUeModeOperation. + */ +MMModem3gppEpsUeModeOperation +mm_modem_3gpp_get_eps_ue_mode_operation (MMModem3gpp *self) +{ + g_return_val_if_fail (MM_IS_MODEM_3GPP (self), MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_UNKNOWN); + + return mm_gdbus_modem3gpp_get_eps_ue_mode_operation (MM_GDBUS_MODEM3GPP (self)); +} + /*****************************************************************************/ /** @@ -590,6 +606,43 @@ mm_modem_3gpp_scan_sync (MMModem3gpp *self, /*****************************************************************************/ +gboolean +mm_modem_3gpp_set_eps_ue_mode_operation_finish (MMModem3gpp *self, + GAsyncResult *res, + GError **error) +{ + g_return_val_if_fail (MM_IS_MODEM_3GPP (self), FALSE); + + return mm_gdbus_modem3gpp_call_set_eps_ue_mode_operation_finish (MM_GDBUS_MODEM3GPP (self), res, error); +} + +void +mm_modem_3gpp_set_eps_ue_mode_operation (MMModem3gpp *self, + MMModem3gppEpsUeModeOperation mode, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (MM_IS_MODEM_3GPP (self)); + g_return_if_fail (mode != MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_UNKNOWN); + + mm_gdbus_modem3gpp_call_set_eps_ue_mode_operation (MM_GDBUS_MODEM3GPP (self), (guint) mode, cancellable, callback, user_data); +} + +gboolean +mm_modem_3gpp_set_eps_ue_mode_operation_sync (MMModem3gpp *self, + MMModem3gppEpsUeModeOperation mode, + GCancellable *cancellable, + GError **error) +{ + g_return_val_if_fail (MM_IS_MODEM_3GPP (self), FALSE); + g_return_val_if_fail (mode != MM_MODEM_3GPP_EPS_UE_MODE_OPERATION_UNKNOWN, FALSE); + + return mm_gdbus_modem3gpp_call_set_eps_ue_mode_operation_sync (MM_GDBUS_MODEM3GPP (self), (guint) mode, cancellable, error); +} + +/*****************************************************************************/ + static void mm_modem_3gpp_init (MMModem3gpp *self) { |