diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-12-26 18:50:16 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:37 +0100 |
commit | 9d7e3de4cd7d607dc797b8b6adf93eb75a018b6e (patch) | |
tree | 762a58bcb685515756c1787fd72593eca83c9bad /cli/mmcli-modem-simple.c | |
parent | a142a209eca617cd3cf4edc6436408e1e9c9f878 (diff) |
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".
Diffstat (limited to 'cli/mmcli-modem-simple.c')
-rw-r--r-- | cli/mmcli-modem-simple.c | 6 |
1 files changed, 4 insertions, 2 deletions
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... |