port-probe: new helper to check if a QMI port was found in a list of probes
This commit is contained in:
@@ -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
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user