aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-bearer-properties.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-04-04 13:31:28 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-04-29 10:13:22 +0000
commit793370f2f8efc6472d7265892013f6615188344e (patch)
tree7b6f881bd8517938f2838b11c77e73da077d8793 /libmm-glib/mm-bearer-properties.h
parente2789b18a1847eecd90fe76902300d99c4ebade3 (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-bearer-properties.h')
-rw-r--r--libmm-glib/mm-bearer-properties.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmm-glib/mm-bearer-properties.h b/libmm-glib/mm-bearer-properties.h
index f0307db3..43975132 100644
--- a/libmm-glib/mm-bearer-properties.h
+++ b/libmm-glib/mm-bearer-properties.h
@@ -18,6 +18,7 @@
#include <ModemManager.h>
#include <glib-object.h>
+#include <mm-3gpp-profile.h>
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
@@ -70,6 +71,8 @@ void mm_bearer_properties_set_ip_type (MMBearerProperties *self,
MMBearerIpFamily ip_type);
void mm_bearer_properties_set_apn_type (MMBearerProperties *self,
MMBearerApnType apn_type);
+void mm_bearer_properties_set_profile_id (MMBearerProperties *self,
+ gint profile_id);
void mm_bearer_properties_set_allow_roaming (MMBearerProperties *self,
gboolean allow_roaming);
void mm_bearer_properties_set_rm_protocol (MMBearerProperties *self,
@@ -83,6 +86,7 @@ const gchar *mm_bearer_properties_get_user (MMBearerProper
const gchar *mm_bearer_properties_get_password (MMBearerProperties *self);
MMBearerIpFamily mm_bearer_properties_get_ip_type (MMBearerProperties *self);
MMBearerApnType mm_bearer_properties_get_apn_type (MMBearerProperties *self);
+gint mm_bearer_properties_get_profile_id (MMBearerProperties *self);
gboolean mm_bearer_properties_get_allow_roaming (MMBearerProperties *self);
MMModemCdmaRmProtocol mm_bearer_properties_get_rm_protocol (MMBearerProperties *self);
MMBearerMultiplexSupport mm_bearer_properties_get_multiplex (MMBearerProperties *self);
@@ -106,6 +110,8 @@ MMBearerProperties *mm_bearer_properties_new_from_string (const gchar *str,
GError **error);
MMBearerProperties *mm_bearer_properties_new_from_dictionary (GVariant *dictionary,
GError **error);
+MMBearerProperties *mm_bearer_properties_new_from_profile (MM3gppProfile *profile,
+ GError **error);
gboolean mm_bearer_properties_consume_string (MMBearerProperties *self,
const gchar *key,
@@ -117,7 +123,8 @@ gboolean mm_bearer_properties_consume_variant (MMBearerProperties *properties,
GVariant *value,
GError **error);
-GVariant *mm_bearer_properties_get_dictionary (MMBearerProperties *self);
+GVariant *mm_bearer_properties_get_dictionary (MMBearerProperties *self);
+MM3gppProfile *mm_bearer_properties_peek_3gpp_profile (MMBearerProperties *self);
typedef enum {
MM_BEARER_PROPERTIES_CMP_FLAGS_NONE = 0,
@@ -126,6 +133,7 @@ typedef enum {
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING = 1 << 2,
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_RM_PROTOCOL = 1 << 3,
MM_BEARER_PROPERTIES_CMP_FLAGS_NO_APN_TYPE = 1 << 4,
+ MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PROFILE_ID = 1 << 5,
} MMBearerPropertiesCmpFlags;
gboolean mm_bearer_properties_cmp (MMBearerProperties *a,