port-probe: new helper to check if a QMI port was found in a list of probes

This commit is contained in:
Aleksander Morgado
2012-08-29 17:14:47 +02:00
parent db99f340c8
commit 8ee0e3f30f
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -1181,6 +1181,19 @@ mm_port_probe_is_qmi (MMPortProbe *self)
return self->priv->is_qmi;
}
gboolean
mm_port_probe_list_has_qmi_port (GList *list)
{
GList *l;
for (l = list; l; l = g_list_next (l)) {
if (mm_port_probe_is_qmi (MM_PORT_PROBE (l->data)))
return TRUE;
}
return FALSE;
}
MMPortType
mm_port_probe_get_port_type (MMPortProbe *self)
{
+2 -1
View File
@@ -124,6 +124,7 @@ const gchar *mm_port_probe_get_product (MMPortProbe *self);
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_at_port (GList *list);
gboolean mm_port_probe_list_has_qmi_port (GList *list);
#endif /* MM_PORT_PROBE_H */