aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-bearer.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-04-03 21:58:25 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-04-29 10:13:22 +0000
commit9fd5aced67d9a5e548f706e62990fa24abda65d5 (patch)
treea3e914928c729a5042f3838b1d6d2428a412e5d2 /libmm-glib/mm-bearer.c
parent2d43ea48e1d2bae37f9d0594c385451739287bef (diff)
api,bearer: new 'ProfileId' property
To report which is the currently active profile with this bearer, if known. If the modem doesn't support profiles, or if the bearer is disconnected, -1 (MM_3GPP_PROFILE_ID_UNKNOWN) will be reported. It is guaranteed that no two connected bearers will have the same ProfileId property value.
Diffstat (limited to 'libmm-glib/mm-bearer.c')
-rw-r--r--libmm-glib/mm-bearer.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libmm-glib/mm-bearer.c b/libmm-glib/mm-bearer.c
index 31668281..1c6a1cdd 100644
--- a/libmm-glib/mm-bearer.c
+++ b/libmm-glib/mm-bearer.c
@@ -264,6 +264,28 @@ mm_bearer_get_bearer_type (MMBearer *self)
/*****************************************************************************/
+/**
+ * mm_bearer_get_profile_id:
+ * @self: A #MMBearer.
+ *
+ * Gets profile ID associated to the bearer connection, if known.
+ *
+ * If the bearer is disconnected or the modem doesn't support profile management
+ * features, %MM_3GPP_PROFILE_ID_UNKNOWN.
+ *
+ * Returns: a profile id.
+ *
+ * Since: 1.18
+ */
+gint
+mm_bearer_get_profile_id (MMBearer *self)
+{
+ g_return_val_if_fail (MM_IS_BEARER (self), MM_3GPP_PROFILE_ID_UNKNOWN);
+
+ return mm_gdbus_bearer_get_profile_id (MM_GDBUS_BEARER (self));
+}
+/*****************************************************************************/
+
static void
ipv4_config_updated (MMBearer *self,
GParamSpec *pspec)