aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-bearer-properties.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-09-13 11:11:40 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2022-11-04 13:12:56 +0000
commit46af452487b00766563ba1f8942e18caefa26cc5 (patch)
tree94f0545a4645ce3ec5189f18886e404998fa8acc /libmm-glib/mm-bearer-properties.c
parenta114e131abefae58379bfb201761debada4ea9fa (diff)
libmm-glib,bearer-properties: new print() method
Diffstat (limited to 'libmm-glib/mm-bearer-properties.c')
-rw-r--r--libmm-glib/mm-bearer-properties.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c
index 0d2d1a75..6d0750bc 100644
--- a/libmm-glib/mm-bearer-properties.c
+++ b/libmm-glib/mm-bearer-properties.c
@@ -17,12 +17,14 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011-2021 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
*/
#include <string.h>
#include "mm-errors-types.h"
+#include "mm-enums-types.h"
#include "mm-common-helpers.h"
#include "mm-bearer-properties.h"
@@ -936,6 +938,34 @@ mm_bearer_properties_cmp (MMBearerProperties *a,
/*****************************************************************************/
/**
+ * mm_bearer_properties_print: (skip)
+ */
+GPtrArray *
+mm_bearer_properties_print (MMBearerProperties *self,
+ gboolean show_personal_info)
+{
+ GPtrArray *array;
+ const gchar *aux;
+
+ array = mm_3gpp_profile_print (self->priv->profile, show_personal_info);
+ if (self->priv->allow_roaming_set) {
+ aux = mm_common_str_boolean (self->priv->allow_roaming);
+ g_ptr_array_add (array, g_strdup_printf (PROPERTY_ALLOW_ROAMING ": %s", aux));
+ }
+ if (self->priv->multiplex != MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) {
+ aux = mm_bearer_multiplex_support_get_string (self->priv->multiplex);
+ g_ptr_array_add (array, g_strdup_printf (PROPERTY_MULTIPLEX ": %s", aux));
+ }
+ if (self->priv->rm_protocol != MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN) {
+ aux = mm_modem_cdma_rm_protocol_get_string (self->priv->rm_protocol);
+ g_ptr_array_add (array, g_strdup_printf (PROPERTY_RM_PROTOCOL ": %s", aux));
+ }
+ return array;
+}
+
+/*****************************************************************************/
+
+/**
* mm_bearer_properties_new_from_profile: (skip)
*/
MMBearerProperties *