From 064e92e9b77b35f83cb522c6ea98b9016ce5db8c Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 17 Feb 2021 15:49:01 +0100 Subject: api,simple: new 'multiplex' setting in bearer properties Both the Simple.Connect() and Modem.CreateBearer() are updated to allow a new 'multiplex' setting in the properties provided by the user in both of these methods. The new setting expects a MMBearerMultiplexSupport enum indicating what kind of multiplex needs the user has: * none: if multiplex must not be used. * requested: if multiplex should be used if available. * required: if multiplex must be used. The underlying implementations will take care of accepting or rejecting the setting depending on the system and modem capabilities. --- libmm-glib/mm-simple-connect-properties.c | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'libmm-glib/mm-simple-connect-properties.c') diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c index fd256513..93006fc4 100644 --- a/libmm-glib/mm-simple-connect-properties.c +++ b/libmm-glib/mm-simple-connect-properties.c @@ -404,6 +404,44 @@ mm_simple_connect_properties_get_rm_protocol (MMSimpleConnectProperties *self) /*****************************************************************************/ +/** + * mm_simple_connect_properties_set_multiplex: + * @self: a #MMSimpleConnectProperties. + * @multiplex: a #MMBearerMultiplexSupport. + * + * Sets the multiplex support requested by the user. + * + * Since: 1.18 + */ +void +mm_simple_connect_properties_set_multiplex (MMSimpleConnectProperties *self, + MMBearerMultiplexSupport multiplex) +{ + g_return_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self)); + + mm_bearer_properties_set_multiplex (self->priv->bearer_properties, multiplex); +} + +/** + * mm_simple_connect_properties_get_multiplex: + * @self: a #MMSimpleConnectProperties. + * + * Get the multiplex support requested by the user. + * + * Returns: a #MMBearerMultiplexSupport. + * + * Since: 1.18 + */ +MMBearerMultiplexSupport +mm_simple_connect_properties_get_multiplex (MMSimpleConnectProperties *self) +{ + g_return_val_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self), MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN); + + return mm_bearer_properties_get_multiplex (self->priv->bearer_properties); +} + +/*****************************************************************************/ + #ifndef MM_DISABLE_DEPRECATED /** -- cgit v1.2.3-70-g09d2