diff options
author | Denis Kenzior <denkenz@gmail.com> | 2014-02-01 09:04:52 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2014-10-20 13:40:28 -0500 |
commit | f9d5ee5fa9d0fffbe588eaac6771804a3d297674 (patch) | |
tree | 9e202ae4e083f6846b80f2e3c7e07bb3d316f7f7 | |
parent | e2785b1865e5ca414218841e337804b288a10b38 (diff) | |
download | ofono-f9d5ee5fa9d0fffbe588eaac6771804a3d297674.tar.bz2 |
emulator: Implement new API
-rw-r--r-- | src/emulator.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/emulator.c b/src/emulator.c index 725a5d01..cab509c9 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -1431,3 +1431,22 @@ void __ofono_emulator_slc_condition(struct ofono_emulator *em, break; } } + +void ofono_emulator_set_hf_indicator_active(struct ofono_emulator *em, + int indicator, + ofono_bool_t active) +{ + char buf[64]; + + if (!(em->l_features & HFP_HF_FEATURE_HF_INDICATORS)) + return; + + if (!(em->r_features & HFP_HF_FEATURE_HF_INDICATORS)) + return; + + if (indicator != HFP_HF_INDICATOR_ENHANCED_SAFETY) + return; + + sprintf(buf, "+BIND: %d,%d", HFP_HF_INDICATOR_ENHANCED_SAFETY, active); + g_at_server_send_unsolicited(em->server, buf); +} |