diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-11-26 15:26:05 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-12-24 14:03:15 +0100 |
commit | f6a91b2250203e0f11f1d9dde9e8f9963e5c62a4 (patch) | |
tree | 479e867aad27f42a8c08ae953490508eb7c80a27 /libmm-glib/mm-bearer-properties.c | |
parent | 24e634229d27cd9743c5c5cfa3e6cedd98bf1379 (diff) |
libmm-glib: new 'roaming-allowance' in 3GPP profile and bearer properties
Diffstat (limited to 'libmm-glib/mm-bearer-properties.c')
-rw-r--r-- | libmm-glib/mm-bearer-properties.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c index c880803b..dad93de9 100644 --- a/libmm-glib/mm-bearer-properties.c +++ b/libmm-glib/mm-bearer-properties.c @@ -411,6 +411,44 @@ mm_bearer_properties_get_access_type_preference (MMBearerProperties *self) /*****************************************************************************/ /** + * mm_bearer_properties_set_roaming_allowance: + * @self: a #MMBearerProperties. + * @roaming_allowance: a mask of #MMBearerRoamingAllowance values + * + * Sets the roaming allowance rules. + * + * Since: 1.20 + */ +void +mm_bearer_properties_set_roaming_allowance (MMBearerProperties *self, + MMBearerRoamingAllowance roaming_allowance) +{ + g_return_if_fail (MM_IS_BEARER_PROPERTIES (self)); + + mm_3gpp_profile_set_roaming_allowance (self->priv->profile, roaming_allowance); +} + +/** + * mm_bearer_properties_get_roaming_allowance: + * @self: a #MMBearerProperties. + * + * Gets the roaming allowance rules. + * + * Returns: a mask of #MMBearerRoamingAllowance values. + * + * Since: 1.20 + */ +MMBearerRoamingAllowance +mm_bearer_properties_get_roaming_allowance (MMBearerProperties *self) +{ + g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), MM_BEARER_ROAMING_ALLOWANCE_NONE); + + return mm_3gpp_profile_get_roaming_allowance (self->priv->profile); +} + +/*****************************************************************************/ + +/** * mm_bearer_properties_set_allow_roaming: * @self: a #MMBearerProperties. * @allow_roaming: boolean value. @@ -873,6 +911,9 @@ mm_bearer_properties_cmp (MMBearerProperties *a, 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_ROAMING_ALLOWANCE) && + (mm_3gpp_profile_get_roaming_allowance (a->priv->profile) != mm_3gpp_profile_get_roaming_allowance (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; |