aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-bearer-properties.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-11-30 21:51:32 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-12-21 12:05:57 +0000
commit5629f47a59b48f2604fd8e9e4af7209b138aef21 (patch)
treebf3d42242e591cb70fe3dcbf0b7bb7851cd7ebc4 /libmm-glib/mm-bearer-properties.h
parentc99cc9210e7a93be1b572d686f5acdeb0160dd3f (diff)
libmm-glib,bearer-properties: allow loose comparisons
When comparing bearer properties provided by the user versus loaded from the modem, we shouldn't be very strict, e.g.: * Password or other fields may not be readable from the device. * Some fields may not apply at all (e.g. RM protocol for EPS bearers) * NULL strings could be assumed equal to empty strings. * If no explicit IP type specified, an IPv4 default may be assumed. * If no explicit allowed auth specified, 'none' default may be assumed. These loose comparisons are applied when managing the initial EPS bearer settings and status, and we keep the strict comparison only during the connection attempt lookup of a bearer with certain settings, as those bearer objects are all created in the same place with the same rules.
Diffstat (limited to 'libmm-glib/mm-bearer-properties.h')
-rw-r--r--libmm-glib/mm-bearer-properties.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/libmm-glib/mm-bearer-properties.h b/libmm-glib/mm-bearer-properties.h
index 751185d9..340d9bf1 100644
--- a/libmm-glib/mm-bearer-properties.h
+++ b/libmm-glib/mm-bearer-properties.h
@@ -113,8 +113,17 @@ gboolean mm_bearer_properties_consume_variant (MMBearerProperties *properties,
GVariant *mm_bearer_properties_get_dictionary (MMBearerProperties *self);
-gboolean mm_bearer_properties_cmp (MMBearerProperties *a,
- MMBearerProperties *b);
+typedef enum {
+ MM_BEARER_PROPERTIES_CMP_FLAGS_NONE = 0,
+ MM_BEARER_PROPERTIES_CMP_FLAGS_LOOSE = 1 << 0,
+ MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PASSWORD = 1 << 1,
+ MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING = 1 << 2,
+ MM_BEARER_PROPERTIES_CMP_FLAGS_NO_RM_PROTOCOL = 1 << 3,
+} MMBearerPropertiesCmpFlags;
+
+gboolean mm_bearer_properties_cmp (MMBearerProperties *a,
+ MMBearerProperties *b,
+ MMBearerPropertiesCmpFlags flags);
#endif