aboutsummaryrefslogtreecommitdiff
path: root/src/mm-bearer-list.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-01-21 18:24:06 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:55 +0100
commit77999f3bcec7753bdcc5a51da4c271c78157f051 (patch)
treecda2bd2261f90ddf86b9c027bf7e5e3d96a94af0 /src/mm-bearer-list.c
parent718093dc59f2cce7556d28efa4a26866b39e4c2e (diff)
bearer-list: new method to look for a bearer using its properties
Diffstat (limited to 'src/mm-bearer-list.c')
-rw-r--r--src/mm-bearer-list.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-bearer-list.c b/src/mm-bearer-list.c
index 37069acc..a7f6abf0 100644
--- a/src/mm-bearer-list.c
+++ b/src/mm-bearer-list.c
@@ -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 {