summaryrefslogtreecommitdiffstats
path: root/audio/telephony-maemo.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-16 18:14:53 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-08 16:10:55 +0200
commit4abc4e4cce2d8e70cd0d871cbd7b8e4ee149423c (patch)
tree1a7e9376271f4347bc1a2454778d3a74eb2ea49f /audio/telephony-maemo.c
parentea21ea51a49839e90d113794cd5c013331e1d5c6 (diff)
Implement telephony_dial_number_req
Currently the methor reply isn't taken into account but we solely on the state signals instead.
Diffstat (limited to 'audio/telephony-maemo.c')
-rw-r--r--audio/telephony-maemo.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c
index 891e83dc..1289d6b9 100644
--- a/audio/telephony-maemo.c
+++ b/audio/telephony-maemo.c
@@ -235,21 +235,24 @@ void telephony_answer_call_req(void *telephony_device)
void telephony_dial_number_req(void *telephony_device, const char *number)
{
- g_free(active_call_number);
- active_call_number = g_strdup(number);
+ DBusMessage *msg;
- debug("telephony-maemo: dial request to %s", active_call_number);
+ debug("telephony-maemo: dial request to %s", number);
- telephony_dial_number_rsp(telephony_device, CME_ERROR_NONE);
+ 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_terminate_call_rsp(telephony_device,
+ CME_ERROR_AG_FAILURE);
+ return;
+ }
- /* 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);
+ dbus_message_append_args(msg, DBUS_TYPE_STRING, &number);
- active_call_status = CALL_STATUS_ALERTING;
- active_call_dir = CALL_DIR_OUTGOING;
+ g_dbus_send_message(connection, msg);
+
+ telephony_dial_number_rsp(telephony_device, CME_ERROR_NONE);
}
void telephony_transmit_dtmf_req(void *telephony_device, char tone)