From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis <frederic.danis@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v3 2/6] voicecall: add API to find call by status
Date: Wed, 13 Apr 2011 18:05:30 +0200 [thread overview]
Message-ID: <1302710734-6103-3-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1302710734-6103-1-git-send-email-frederic.danis@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
---
src/ofono.h | 3 +++
src/voicecall.c | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/ofono.h b/src/ofono.h
index 156bc40..82d7e34 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -270,6 +270,9 @@ int __ofono_voicecall_tone_send(struct ofono_voicecall *vc,
ofono_voicecall_tone_cb_t cb, void *user_data);
void __ofono_voicecall_tone_cancel(struct ofono_voicecall *vc, int id);
+struct ofono_call *__ofono_voicecall_find_call_with_status(
+ struct ofono_voicecall *vc, int status);
+
#include <ofono/sms.h>
struct sms;
diff --git a/src/voicecall.c b/src/voicecall.c
index 9878050..f2e03e5 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;
--
1.7.1
next prev parent reply other threads:[~2011-04-13 16:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 16:05 [PATCH v3 0/6] emulator: add simple incoming call support =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-13 16:05 ` [PATCH v3 1/6] emulator: add RING for HFP AG =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-19 18:57 ` Denis Kenzior
2011-04-13 16:05 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis [this message]
2011-04-19 18:58 ` [PATCH v3 2/6] voicecall: add API to find call by status Denis Kenzior
2011-04-13 16:05 ` [PATCH v3 3/6] emulator: add +CLIP support for HFP AG =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-19 19:00 ` Denis Kenzior
2011-04-13 16:05 ` [PATCH v3 4/6] emulator: add +CCWA " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-19 19:01 ` Denis Kenzior
2011-04-13 16:05 ` [PATCH v3 5/6] voicecall: add ATA support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-19 19:01 ` Denis Kenzior
2011-04-13 16:05 ` [PATCH v3 6/6] voicecall: add +CHUP " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-14 12:27 ` [PATCH v4] " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-04-21 21:24 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302710734-6103-3-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.