From 05b9ab7c25bf252e43037ed0ea002b0aed6f051b Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 25 Feb 2021 15:42:35 +0100 Subject: 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. --- libmm-glib/mm-modem.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'libmm-glib/mm-modem.c') 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 */ @@ -456,6 +458,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. -- cgit v1.2.3-70-g09d2