aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-bearer-properties.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-11-26 12:12:46 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-12-24 14:03:13 +0100
commite61fd7ca589110810baec2237d052b564dfe4488 (patch)
treebea09762ba9684d57d0f471ac024b4637e03c9a0 /libmm-glib/mm-bearer-properties.c
parentfc6bc84d226a3cd41c5bfd1c503ea53f7fefa596 (diff)
libmm-glib: new 'access-type-preference' in 3GPP profile and bearer properties
Diffstat (limited to 'libmm-glib/mm-bearer-properties.c')
-rw-r--r--libmm-glib/mm-bearer-properties.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c
index ad7196ec..c880803b 100644
--- a/libmm-glib/mm-bearer-properties.c
+++ b/libmm-glib/mm-bearer-properties.c
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011 Aleksander Morgado <aleksander@gnu.org>
+ * Copyright (C) 2011-2021 Aleksander Morgado <aleksander@aleksander.es>
*/
#include <string.h>
@@ -373,6 +373,44 @@ mm_bearer_properties_get_profile_id (MMBearerProperties *self)
/*****************************************************************************/
/**
+ * mm_bearer_properties_set_access_type_preference:
+ * @self: a #MMBearerProperties.
+ * @access_type_preference: a #MMBearerAccessTypePreference value.
+ *
+ * Sets the 5G network access type preference.
+ *
+ * Since: 1.20
+ */
+void
+mm_bearer_properties_set_access_type_preference (MMBearerProperties *self,
+ MMBearerAccessTypePreference access_type_preference)
+{
+ g_return_if_fail (MM_IS_BEARER_PROPERTIES (self));
+
+ mm_3gpp_profile_set_access_type_preference (self->priv->profile, access_type_preference);
+}
+
+/**
+ * mm_bearer_properties_get_access_type_preference:
+ * @self: a #MMBearerProperties.
+ *
+ * Gets the 5G network access type preference.
+ *
+ * Returns: a #MMBearerAccessTypePreference value.
+ *
+ * Since: 1.20
+ */
+MMBearerAccessTypePreference
+mm_bearer_properties_get_access_type_preference (MMBearerProperties *self)
+{
+ g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE);
+
+ return mm_3gpp_profile_get_access_type_preference (self->priv->profile);
+}
+
+/*****************************************************************************/
+
+/**
* mm_bearer_properties_set_allow_roaming:
* @self: a #MMBearerProperties.
* @allow_roaming: boolean value.
@@ -832,6 +870,9 @@ mm_bearer_properties_cmp (MMBearerProperties *a,
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_NAME) &&
!cmp_str (mm_3gpp_profile_get_profile_name (a->priv->profile), mm_3gpp_profile_get_profile_name (b->priv->profile), flags))
return FALSE;
+ if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ACCESS_TYPE_PREFERENCE) &&
+ (mm_3gpp_profile_get_access_type_preference (a->priv->profile) != mm_3gpp_profile_get_access_type_preference (b->priv->profile)))
+ return FALSE;
if (!(flags & MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING)) {
if (a->priv->allow_roaming != b->priv->allow_roaming)
return FALSE;