From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis <frederic.danis@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v2 2/3] emulator: Force indicator event implementation
Date: Wed, 14 Mar 2012 17:00:52 +0100 [thread overview]
Message-ID: <1331740853-3994-2-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1331740853-3994-1-git-send-email-frederic.danis@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
---
src/emulator.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 0f1ceca..8df721c 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -1245,3 +1245,26 @@ start_ring:
em->callsetup_source = g_timeout_add_seconds(RING_TIMEOUT,
notify_ring, em);
}
+
+void ofono_emulator_set_indicator_forced(struct ofono_emulator *em,
+ const char *name, int value)
+{
+ int i;
+ struct indicator *ind;
+ char buf[20];
+
+ ind = find_indicator(em, name, &i);
+
+ if (ind == NULL || value < ind->min || value > ind->max)
+ return;
+
+ ind->value = value;
+
+ if (em->events_mode == 3 && em->events_ind && em->slc && ind->active) {
+ if (!g_at_server_command_pending(em->server)) {
+ sprintf(buf, "+CIEV: %d,%d", i, ind->value);
+ g_at_server_send_unsolicited(em->server, buf);
+ } else
+ ind->deferred = TRUE;
+ }
+}
--
1.7.1
next prev parent reply other threads:[~2012-03-14 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 16:00 [PATCH v2 1/3] emulator: Add API to force indicator event =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-03-14 16:00 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis [this message]
2012-03-21 0:22 ` [PATCH v2 2/3] emulator: Force indicator event implementation Denis Kenzior
2012-03-14 16:00 ` [PATCH v2 3/3] voicecall: Force callheld update after calls swap =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-03-21 0:27 ` 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=1331740853-3994-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox