aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-common-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-05-29 12:41:49 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-06-05 19:15:14 +0200
commit45ceba76924f184ed9e12ba3d35e00a55ad3a197 (patch)
treec413d3e29a64eb86340e964ec48e67d8a66c6f76 /libmm-glib/mm-common-helpers.h
parent212d00c529ee07131bf3b71a8759dca49292c059 (diff)
api,introspection: 'SupportedModes' is now a list of possible combinations
Instead of just a mask of MMModemMode values, we now provide a list of the allowed and preferred mode combinations supported by the modem. E.g.: $> sudo mmcli -m 0 ------------------------- Modes | supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none | allowed: 2g, 3g; preferred: 2g | allowed: 2g, 3g; preferred: 3g | allowed: 4g; preferred: none | allowed: 2g, 3g, 4g; preferred: none'
Diffstat (limited to 'libmm-glib/mm-common-helpers.h')
-rw-r--r--libmm-glib/mm-common-helpers.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmm-glib/mm-common-helpers.h b/libmm-glib/mm-common-helpers.h
index d23fc73e..45df4f4c 100644
--- a/libmm-glib/mm-common-helpers.h
+++ b/libmm-glib/mm-common-helpers.h
@@ -17,6 +17,7 @@
#include <glib.h>
#include <ModemManager.h>
+#include "mm-helper-types.h"
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
#error "Only <libmm-glib.h> can be included directly."
@@ -31,6 +32,9 @@ gchar *mm_common_build_bands_string (const MMModemBand *bands,
gchar *mm_common_build_sms_storages_string (const MMSmsStorage *storages,
guint n_storages);
+gchar *mm_common_build_mode_combinations_string (const MMModemModeCombination *modes,
+ guint n_modes);
+
MMModemMode mm_common_get_modes_from_string (const gchar *str,
GError **error);
void mm_common_get_bands_from_string (const gchar *str,
@@ -67,6 +71,14 @@ GVariant *mm_common_build_bands_unknown (void);
gboolean mm_common_bands_garray_cmp (GArray *a, GArray *b);
+GArray *mm_common_mode_combinations_variant_to_garray (GVariant *variant);
+MMModemModeCombination *mm_common_mode_combinations_variant_to_array (GVariant *variant,
+ guint *n_modes);
+GVariant *mm_common_mode_combinations_array_to_variant (const MMModemModeCombination *modes,
+ guint n_modes);
+GVariant *mm_common_mode_combinations_garray_to_variant (GArray *array);
+GVariant *mm_common_build_mode_combinations_default (void);
+
typedef gboolean (*MMParseKeyValueForeachFn) (const gchar *key,
const gchar *value,
gpointer user_data);