port-probe: new method to check if there is an AT port in a list of probes
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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 */
|
||||
|
Reference in New Issue
Block a user