diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2022-09-13 13:52:02 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2022-11-04 13:12:56 +0000 |
commit | 5bfa677bbc470c14a82c6377c3c6056a74d170cc (patch) | |
tree | 6d3504391893071d143e78cd501b5b5034a232a3 /libmm-glib | |
parent | 46af452487b00766563ba1f8942e18caefa26cc5 (diff) |
libmm-glib,simple-connect-properties: new print() method
Diffstat (limited to 'libmm-glib')
-rw-r--r-- | libmm-glib/mm-simple-connect-properties.c | 23 | ||||
-rw-r--r-- | libmm-glib/mm-simple-connect-properties.h | 7 |
2 files changed, 28 insertions, 2 deletions
diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c index b560939f..c2f75aa7 100644 --- a/libmm-glib/mm-simple-connect-properties.c +++ b/libmm-glib/mm-simple-connect-properties.c @@ -17,7 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2011 Aleksander Morgado <aleksander@gnu.org> + * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es> + * Copyright (C) 2022 Google, Inc. */ #include <string.h> @@ -731,6 +732,26 @@ mm_simple_connect_properties_new_from_dictionary (GVariant *dictionary, /*****************************************************************************/ /** + * mm_simple_connect_properties_print: (skip) + */ +GPtrArray * +mm_simple_connect_properties_print (MMSimpleConnectProperties *self, + gboolean show_personal_info) +{ + GPtrArray *array; + + array = mm_bearer_properties_print (self->priv->bearer_properties, show_personal_info); + if (self->priv->pin) + g_ptr_array_add (array, g_strdup_printf (PROPERTY_PIN ": %s", mm_common_str_personal_info (self->priv->pin, show_personal_info))); + if (self->priv->operator_id) + g_ptr_array_add (array, g_strdup_printf (PROPERTY_OPERATOR_ID ": %s", self->priv->operator_id)); + + return array; +} + +/*****************************************************************************/ + +/** * mm_simple_connect_properties_new: * * Creates a new empty #MMSimpleConnectProperties. diff --git a/libmm-glib/mm-simple-connect-properties.h b/libmm-glib/mm-simple-connect-properties.h index 0ee4125f..196dec73 100644 --- a/libmm-glib/mm-simple-connect-properties.h +++ b/libmm-glib/mm-simple-connect-properties.h @@ -17,7 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2011 Aleksander Morgado <aleksander@gnu.org> + * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es> + * Copyright (C) 2022 Google, Inc. */ #ifndef MM_SIMPLE_CONNECT_PROPERTIES_H @@ -120,6 +121,10 @@ MMSimpleConnectProperties *mm_simple_connect_properties_new_from_dictionary (GVa MMBearerProperties *mm_simple_connect_properties_get_bearer_properties (MMSimpleConnectProperties *self); GVariant *mm_simple_connect_properties_get_dictionary (MMSimpleConnectProperties *self); + +GPtrArray *mm_simple_connect_properties_print (MMSimpleConnectProperties *self, + gboolean show_personal_info); + #endif |