diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-25 15:42:35 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-03-10 10:59:22 +0100 |
commit | 05b9ab7c25bf252e43037ed0ea002b0aed6f051b (patch) | |
tree | 996bf3a13e114298d450ce10136a6838d9f00006 /libmm-glib/mm-modem.c | |
parent | 35e20a48c8b16ae744c4ca3082f70e8aa674c2f4 (diff) |
api,modem: new 'MaxActiveMultiplexedBearers' property
In addition to the amount of bearers a user may connect without
multiplexing enabled (the default until now), we now also expose the
maximum number of bearers a user may connect after enabling
multiplexing over one single network interface (if supported).
The method responsible for creating the MMBearerList is now also
subclassable, so that implementations supporting multiplexing can
provide their own version with their own thresholds.
Diffstat (limited to 'libmm-glib/mm-modem.c')
-rw-r--r-- | libmm-glib/mm-modem.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c index e3b29bb5..02e322dd 100644 --- a/libmm-glib/mm-modem.c +++ b/libmm-glib/mm-modem.c @@ -436,13 +436,15 @@ mm_modem_get_max_bearers (MMModem *self) * mm_modem_get_max_active_bearers: * @self: a #MMModem. * - * Gets the maximum number of active packet data bearers this #MMModem supports. + * Gets the maximum number of active packet data bearers this #MMModem supports + * without enabling multiplexing support. * * POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS - * and LTE-capable devices (including LTE/CDMA devices) typically support - * at least two active bearers. + * and LTE/5GNR capable devices (including 3GPP+3GPP3 multimode devices) may support + * one or more active bearers, depending on the amount of physical ports exposed + * by the device. * - * Returns: the maximum number of defined packet data bearers. + * Returns: the maximum number of active packet data bearers. * * Since: 1.0 */ @@ -457,6 +459,28 @@ mm_modem_get_max_active_bearers (MMModem *self) /*****************************************************************************/ /** + * mm_modem_get_max_active_multiplexed_bearers: + * @self: a #MMModem. + * + * Gets the maximum number of active packet data bearers this #MMModem supports + * after enabling multiplexing support on one single network interface. + * + * Returns: the maximum number of active packet data bearers, or 0 if + * multiplexing is not supported. + * + * Since: 1.18 + */ +guint +mm_modem_get_max_active_multiplexed_bearers (MMModem *self) +{ + g_return_val_if_fail (MM_IS_MODEM (self), 0); + + return mm_gdbus_modem_get_max_active_multiplexed_bearers (MM_GDBUS_MODEM (self)); +} + +/*****************************************************************************/ + +/** * mm_modem_get_bearer_paths: * @self: A #MMModem. * |