diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-05-22 17:43:21 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-06-05 19:15:13 +0200 |
commit | 804642adc234094717158ff09857de1432565dda (patch) | |
tree | fdcf1cd2fc158e2edc6325b7b67095fa4895932d /libmm-glib/mm-bearer-properties.c | |
parent | a42234dd1c680e7604008fc2e66be849c7bf70de (diff) |
api: let MMBearerIpFamily be flags instead of a enumeration
We want to expose in the Modem interface the list of supported IP families, and
the easiest way to do so is to have the IP family as flags, and provide in the
interface a single enum.
Also, a value of 0 for a MMBearerIpFamily specifies that no flags are set, so
just rename it to 'NONE'.
And add a new 'ANY' value which sets all flags to 1.
Diffstat (limited to 'libmm-glib/mm-bearer-properties.c')
-rw-r--r-- | libmm-glib/mm-bearer-properties.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c index 2f59feed..c4f4ba2f 100644 --- a/libmm-glib/mm-bearer-properties.c +++ b/libmm-glib/mm-bearer-properties.c @@ -230,7 +230,7 @@ mm_bearer_properties_set_ip_type (MMBearerProperties *self, MMBearerIpFamily mm_bearer_properties_get_ip_type (MMBearerProperties *self) { - g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), MM_BEARER_IP_FAMILY_UNKNOWN); + g_return_val_if_fail (MM_IS_BEARER_PROPERTIES (self), MM_BEARER_IP_FAMILY_NONE); return self->priv->ip_type; } @@ -379,7 +379,7 @@ mm_bearer_properties_get_dictionary (MMBearerProperties *self) PROPERTY_PASSWORD, g_variant_new_string (self->priv->password)); - if (self->priv->ip_type != MM_BEARER_IP_FAMILY_UNKNOWN) + if (self->priv->ip_type != MM_BEARER_IP_FAMILY_NONE) g_variant_builder_add (&builder, "{sv}", PROPERTY_IP_TYPE, @@ -674,7 +674,7 @@ mm_bearer_properties_init (MMBearerProperties *self) self->priv->allow_roaming = TRUE; self->priv->rm_protocol = MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN; self->priv->allowed_auth = MM_BEARER_ALLOWED_AUTH_UNKNOWN; - self->priv->ip_type = MM_BEARER_IP_FAMILY_UNKNOWN; + self->priv->ip_type = MM_BEARER_IP_FAMILY_NONE; } static void |