From 9d7e3de4cd7d607dc797b8b6adf93eb75a018b6e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 26 Dec 2011 18:50:16 +0100 Subject: api: MMModemBand is now an enum, not flags We don't want to handle bands as flags, in order to avoid the need of 64-bits for the enum. This change implies that setting allowed bands will be done by giving an array of uint32 values, signature "au". --- cli/mmcli-modem-simple.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/mmcli-modem-simple.c') diff --git a/cli/mmcli-modem-simple.c b/cli/mmcli-modem-simple.c index fcae2b14..4ebf4abe 100644 --- a/cli/mmcli-modem-simple.c +++ b/cli/mmcli-modem-simple.c @@ -147,7 +147,7 @@ connect_ready (MMModemSimple *modem_simple, typedef struct { gchar *pin; gchar *operator_id; - MMModemBand allowed_bands; + GArray *allowed_bands; MMModemMode allowed_modes; MMModemMode preferred_mode; gchar *apn; @@ -171,6 +171,7 @@ string_get_boolean (const gchar *value) static void simple_connect_properties_shutdown (SimpleConnectProperties *properties) { + g_array_unref (properties->allowed_bands); g_free (properties->pin); g_free (properties->operator_id); g_free (properties->apn); @@ -190,9 +191,10 @@ simple_connect_properties_init (const gchar *input, /* Some defaults... */ memset (properties, 0, sizeof (*properties)); properties->allow_roaming = TRUE; - properties->allowed_bands = MM_MODEM_BAND_ANY; properties->allowed_modes = MM_MODEM_MODE_ANY; properties->preferred_mode = MM_MODEM_MODE_NONE; + properties->allowed_bands = g_array_sized_new (FALSE, FALSE, sizeof (MMModemBand), 1); + ((MMModemBand *)properties->allowed_bands)[0] = MM_MODEM_BAND_ANY; /* Expecting input as: * key1=string,key2=true,key3=false... -- cgit v1.2.3-70-g09d2