diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-17 14:37:06 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-08 16:10:55 +0200 |
commit | 76c2c41df99a039923c24f4ab3fe13fccc2bf26a (patch) | |
tree | da3bb1e382e425435f6c96dca48b44bd741b29ad | |
parent | 6841e56241fb0d328036b8a9d9bea29fa453bfe8 (diff) |
Implement last number dialed support
-rw-r--r-- | audio/telephony-maemo.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c index 037a39e0..108223ef 100644 --- a/audio/telephony-maemo.c +++ b/audio/telephony-maemo.c @@ -180,16 +180,25 @@ void telephony_response_and_hold_req(void *telephony_device, int rh) void telephony_last_dialed_number_req(void *telephony_device) { - telephony_last_dialed_number_rsp(telephony_device, CME_ERROR_NONE); + DBusMessage *msg; + const char *number = "urn:service:ldn"; - /* Notify outgoing call set-up successfully initiated */ - telephony_update_indicator(maemo_indicators, "callsetup", - EV_CALLSETUP_OUTGOING); - telephony_update_indicator(maemo_indicators, "callsetup", - EV_CALLSETUP_ALERTING); + debug("telephony-maemo: last dialed number request"); + + msg = dbus_message_new_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH, + CSD_CALL_INTERFACE, "Create"); + if (!msg) { + error("Unable to allocate new D-Bus message"); + telephony_dial_number_rsp(telephony_device, + CME_ERROR_AG_FAILURE); + return; + } - active_call_status = CALL_STATUS_ALERTING; - active_call_dir = CALL_DIR_OUTGOING; + dbus_message_append_args(msg, DBUS_TYPE_STRING, &number); + + g_dbus_send_message(connection, msg); + + telephony_last_dialed_number_rsp(telephony_device, CME_ERROR_NONE); } void telephony_terminate_call_req(void *telephony_device) @@ -423,6 +432,8 @@ static void handle_call_status(DBusMessage *msg, const char *call_path) case CSD_CALL_STATUS_IDLE: break; case CSD_CALL_STATUS_CREATE: + telephony_update_indicator(maemo_indicators, "callsetup", + EV_CALLSETUP_OUTGOING); break; case CSD_CALL_STATUS_COMING: break; @@ -431,6 +442,8 @@ static void handle_call_status(DBusMessage *msg, const char *call_path) case CSD_CALL_STATUS_MO_ALERTING: break; case CSD_CALL_STATUS_MT_ALERTING: + telephony_update_indicator(maemo_indicators, "callsetup", + EV_CALLSETUP_ALERTING); break; case CSD_CALL_STATUS_WAITING: break; |