diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-04-04 13:31:28 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-04-29 10:13:22 +0000 |
commit | 793370f2f8efc6472d7265892013f6615188344e (patch) | |
tree | 7b6f881bd8517938f2838b11c77e73da077d8793 /libmm-glib/mm-simple-connect-properties.c | |
parent | e2789b18a1847eecd90fe76902300d99c4ebade3 (diff) |
api,bearer: new 'profile-id' setting
We define a new 'profile-id' setting in the bearer properties that
users will use to specify which connection profile of the ones
available in the device should be connected.
When the 'profile-id' is given, the associated bearer object will be
bound to the 'profile-id', and the user is able to provide additional
settings to apply on top (e.g. if the profile storage doesn't allow
some of the settings we support, like 'apn-type', or if the setting is
completely unrelated to profiles, like 'multiplex').
After introducing the 'profile-id' as a valid setting in the bearer
properties, we also reimplement the properties object internals to
make use a 3GPP profile for the subset of common settings between both
objects.
Diffstat (limited to 'libmm-glib/mm-simple-connect-properties.c')
-rw-r--r-- | libmm-glib/mm-simple-connect-properties.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c index d1a83592..a70ce0d5 100644 --- a/libmm-glib/mm-simple-connect-properties.c +++ b/libmm-glib/mm-simple-connect-properties.c @@ -17,6 +17,7 @@ #include "mm-errors-types.h" #include "mm-common-helpers.h" +#include "mm-3gpp-profile.h" #include "mm-simple-connect-properties.h" /** @@ -365,6 +366,44 @@ mm_simple_connect_properties_get_apn_type (MMSimpleConnectProperties *self) /*****************************************************************************/ /** + * mm_simple_connect_properties_set_profile_id: + * @self: a #MMSimpleConnectProperties. + * @profile_id: a profile id. + * + * Sets the profile ID to use. + * + * Since: 1.18 + */ +void +mm_simple_connect_properties_set_profile_id (MMSimpleConnectProperties *self, + gint profile_id) +{ + g_return_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self)); + + mm_bearer_properties_set_profile_id (self->priv->bearer_properties, profile_id); +} + +/** + * mm_simple_connect_properties_get_profile_id: + * @self: a #MMSimpleConnectProperties. + * + * Gets the profile ID to use. + * + * Returns: the profile id. + * + * Since: 1.18 + */ +gint +mm_simple_connect_properties_get_profile_id (MMSimpleConnectProperties *self) +{ + g_return_val_if_fail (MM_IS_SIMPLE_CONNECT_PROPERTIES (self), MM_3GPP_PROFILE_ID_UNKNOWN); + + return mm_bearer_properties_get_profile_id (self->priv->bearer_properties); +} + +/*****************************************************************************/ + +/** * mm_simple_connect_properties_set_allow_roaming: * @self: a #MMSimpleConnectProperties. * @allow_roaming: boolean value. |