diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-02 14:13:55 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-02 14:13:55 +0300 |
commit | b5875caa0d77c181352ba7b6d65bc6e9091d01f2 (patch) | |
tree | 20db5fc2914599341799df218938d45cb60020ab /audio/headset.c | |
parent | 9cf2ac6ea41b7b3b54411c5efda1750711efeb06 (diff) |
Add support for current call list query
Support for the AT+CLCC command and the +CLCC:... unsolicited result
code.
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index 40cd23f5..2fce7b8c 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -848,6 +848,18 @@ static int subscriber_number(struct audio_device *device, const char *buf) return 0; } +int telephony_list_current_calls_rsp(void *telephony_device, cme_error_t err) +{ + return telephony_generic_rsp(telephony_device, err); +} + +static int list_current_calls(struct audio_device *device, const char *buf) +{ + telephony_list_current_calls_req(device); + + return 0; +} + static struct event event_callbacks[] = { { "ATA", answer_call }, { "ATD", dial_number }, @@ -863,6 +875,7 @@ static struct event event_callbacks[] = { { "AT+BLDN", last_dialed_number }, { "AT+VTS", dtmf_tone }, { "AT+CNUM", subscriber_number }, + { "AT+CLCC", list_current_calls }, { 0 } }; @@ -2175,3 +2188,23 @@ int telephony_ready_ind(uint32_t features, return 0; } + +int telephony_list_current_call_ind(int idx, int dir, int status, int mode, + int mprty, const char *number, + int type) +{ + if (!active_devices) + return -ENODEV; + + if (number) + send_foreach_headset(active_devices, + "\r\n+CLCC:%d,%d,%d,%d,%d,%s,%d\r\n", + idx, dir, status, mode, mprty, + number, type); + else + send_foreach_headset(active_devices, + "\r\n+CLCC:%d,%d,%d,%d,%d\r\n", + idx, dir, status, mode, mprty); + + return 0; +} |