port-probe: new method to check if there is an AT port in a list of probes

This commit is contained in:
Aleksander Morgado
2012-07-10 12:39:43 +02:00
parent b791e87b23
commit 87c2c8632e
2 changed files with 16 additions and 0 deletions

View File

@@ -899,6 +899,19 @@ mm_port_probe_is_at (MMPortProbe *self)
return self->priv->is_at;
}
gboolean
mm_port_probe_list_has_at_port (GList *list)
{
GList *l;
for (l = list; l; l = g_list_next (l)){
if (mm_port_probe_is_at (MM_PORT_PROBE (l->data)))
return TRUE;
}
return FALSE;
}
gboolean
mm_port_probe_is_qcdm (MMPortProbe *self)
{

View File

@@ -96,4 +96,7 @@ gboolean mm_port_probe_is_qcdm (MMPortProbe *self);
const gchar *mm_port_probe_get_vendor (MMPortProbe *self);
const gchar *mm_port_probe_get_product (MMPortProbe *self);
/* Additional helpers */
gboolean mm_port_probe_list_has_at_port (GList *list);
#endif /* MM_PORT_PROBE_H */