diff options
author | Frédéric Danis <frederic.danis@linux.intel.com> | 2011-04-13 18:05:30 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-04-19 13:53:24 -0500 |
commit | a8acaf59d34f40ae9ba7b83b4bf1ca30f083a0d9 (patch) | |
tree | 17cbfaab2b36c10f21af8715984f3bdde0b2af0f /src/voicecall.c | |
parent | 335ca8fac3067eea35c0e8b6f922659fddb1a426 (diff) | |
download | ofono-a8acaf59d34f40ae9ba7b83b4bf1ca30f083a0d9.tar.bz2 |
voicecall: add API to find call by status
Diffstat (limited to 'src/voicecall.c')
-rw-r--r-- | src/voicecall.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 9878050b..f2e03e5c 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -1098,6 +1098,22 @@ static gboolean voicecalls_have_incoming(struct ofono_voicecall *vc) return voicecalls_have_with_status(vc, CALL_STATUS_INCOMING); } +struct ofono_call *__ofono_voicecall_find_call_with_status( + struct ofono_voicecall *vc, int status) +{ + GSList *l; + struct voicecall *v; + + for (l = vc->call_list; l; l = l->next) { + v = l->data; + + if (v->call->status == status) + return v->call; + } + + return NULL; +} + static void voicecalls_multiparty_changed(GSList *old, GSList *new) { GSList *o, *n; |