diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-30 13:57:56 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-30 13:57:56 +0200 |
commit | 1ca46bb4a7e750655f3d066881f4f3823c03f537 (patch) | |
tree | b91bcec76111903dc4276e669502a07ebda57ef8 /src | |
parent | a4e5964506cbb6613421ab44bb43c225eb9d82a3 (diff) |
port-probe: easier check for Icera support over a list of port probes
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-port-probe.c | 13 | ||||
-rw-r--r-- | src/mm-port-probe.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index 04a1bf8b..e0f3788a 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -1309,6 +1309,19 @@ mm_port_probe_is_icera (MMPortProbe *self) FALSE); } +gboolean +mm_port_probe_list_is_icera (GList *probes) +{ + GList *l; + + for (l = probes; l; l = g_list_next (l)) { + if (mm_port_probe_is_icera (MM_PORT_PROBE (l->data))) + return TRUE; + } + + return FALSE; +} + const gchar * mm_port_probe_get_port_name (MMPortProbe *self) { diff --git a/src/mm-port-probe.h b/src/mm-port-probe.h index adff2786..bbafab64 100644 --- a/src/mm-port-probe.h +++ b/src/mm-port-probe.h @@ -126,5 +126,6 @@ gboolean mm_port_probe_is_icera (MMPortProbe *self); /* Additional helpers */ gboolean mm_port_probe_list_has_at_port (GList *list); gboolean mm_port_probe_list_has_qmi_port (GList *list); +gboolean mm_port_probe_list_is_icera (GList *list); #endif /* MM_PORT_PROBE_H */ |