diff options
author | Dmitriy Paliy <dmitriy.paliy@nokia.com> | 2011-03-15 14:55:53 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2011-03-15 19:35:40 +0200 |
commit | fcd1ac9c72f229485342d8105c0ccdd4a0c07aa1 (patch) | |
tree | eb322d34d955e0791493ef4f8424bcf10a842633 | |
parent | cef5610236c8f62bf8f5152614720a3358b77bbb (diff) | |
download | bluez-fcd1ac9c72f229485342d8105c0ccdd4a0c07aa1.tar.gz |
Change dial and re-dial in maemo6 telephony
Dial and re-dial to last number functions are changed in maemo6
telephony driver accordingly to updated API in csd back-end. CreateWith
method call is replaced by Create and CreateFromLast.
After such modification callerid and last dialed number are not used
and hence removed in sucessive patch.
-rw-r--r-- | audio/telephony-maemo6.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c index 04c69c64b..311b5ede8 100644 --- a/audio/telephony-maemo6.c +++ b/audio/telephony-maemo6.c @@ -579,14 +579,19 @@ static int send_method_call(const char *dest, const char *path, void telephony_last_dialed_number_req(void *telephony_device) { + int ret; + DBG("telephony-maemo6: last dialed number request"); - if (last_dialed_number) - telephony_dial_number_req(telephony_device, - last_dialed_number); + ret = send_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH, + CSD_CALL_INTERFACE, "CreateFromLast", + NULL, NULL, + DBUS_TYPE_INVALID); + if (ret < 0) + telephony_dial_number_rsp(telephony_device, + CME_ERROR_AG_FAILURE); else - telephony_last_dialed_number_rsp(telephony_device, - CME_ERROR_NOT_ALLOWED); + telephony_dial_number_rsp(telephony_device, CME_ERROR_NONE); } static const char *memory_dial_lookup(int location) @@ -599,18 +604,15 @@ static const char *memory_dial_lookup(int location) void telephony_dial_number_req(void *telephony_device, const char *number) { - uint32_t flags = callerid; int ret; DBG("telephony-maemo6: dial request to %s", number); - if (strncmp(number, "*31#", 4) == 0) { + if (strncmp(number, "*31#", 4) == 0) number += 4; - flags = CALL_FLAG_PRESENTATION_ALLOWED; - } else if (strncmp(number, "#31#", 4) == 0) { + else if (strncmp(number, "#31#", 4) == 0) number += 4; - flags = CALL_FLAG_PRESENTATION_RESTRICTED; - } else if (number[0] == '>') { + else if (number[0] == '>') { const char *location = &number[1]; number = memory_dial_lookup(strtol(&number[1], NULL, 0)); @@ -623,10 +625,9 @@ void telephony_dial_number_req(void *telephony_device, const char *number) } ret = send_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH, - CSD_CALL_INTERFACE, "CreateWith", + CSD_CALL_INTERFACE, "Create", NULL, NULL, DBUS_TYPE_STRING, &number, - DBUS_TYPE_UINT32, &flags, DBUS_TYPE_INVALID); if (ret < 0) { telephony_dial_number_rsp(telephony_device, |