bearer-list: new method to look for a bearer using its properties
This commit is contained in:
@@ -165,6 +165,20 @@ mm_bearer_list_foreach (MMBearerList *self,
|
||||
g_list_foreach (self->priv->bearers, (GFunc)func, user_data);
|
||||
}
|
||||
|
||||
MMBearer *
|
||||
mm_bearer_list_find (MMBearerList *self,
|
||||
MMCommonBearerProperties *properties)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = self->priv->bearers; l; l = g_list_next (l)) {
|
||||
if (mm_bearer_cmp_properties (MM_BEARER (l->data), properties))
|
||||
return g_object_ref (l->data);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -72,6 +72,9 @@ void mm_bearer_list_foreach (MMBearerList *self,
|
||||
MMBearerListForeachFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
MMBearer *mm_bearer_list_find (MMBearerList *self,
|
||||
MMCommonBearerProperties *properties);
|
||||
|
||||
void mm_bearer_list_disconnect_all_bearers (MMBearerList *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
Reference in New Issue
Block a user