summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-16 18:20:13 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-08 16:10:55 +0200
commit3330b71328a13747171a35737b026c762e3808a9 (patch)
treef4dd90368360ba3e690fbb41ac250f38fee3ec14
parent170d5a7c22f717f85abe8844be870c71b52b8ccf (diff)
Implement telephony_transmit_dtmf_req
-rw-r--r--audio/telephony-maemo.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c
index 28f10b26..c27c6cf9 100644
--- a/audio/telephony-maemo.c
+++ b/audio/telephony-maemo.c
@@ -257,7 +257,36 @@ void telephony_dial_number_req(void *telephony_device, const char *number)
void telephony_transmit_dtmf_req(void *telephony_device, char tone)
{
+ DBusMessage *msg;
+
debug("telephony-maemo: transmit dtmf: %c", tone);
+
+ msg = dbus_message_new_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH,
+ CSD_CALL_INTERFACE, "StartDTMF");
+ if (!msg) {
+ error("Unable to allocate new D-Bus message");
+ telephony_transmit_dtmf_rsp(telephony_device,
+ CME_ERROR_AG_FAILURE);
+ return;
+ }
+
+ dbus_message_append_args(msg, DBUS_TYPE_BYTE, &tone);
+
+ g_dbus_send_message(connection, msg);
+
+ msg = dbus_message_new_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH,
+ CSD_CALL_INTERFACE, "StopDTMF");
+ if (!msg) {
+ error("Unable to allocate new D-Bus message");
+ telephony_transmit_dtmf_rsp(telephony_device,
+ CME_ERROR_AG_FAILURE);
+ return;
+ }
+
+ dbus_message_append_args(msg, DBUS_TYPE_BYTE, &tone);
+
+ g_dbus_send_message(connection, msg);
+
telephony_transmit_dtmf_rsp(telephony_device, CME_ERROR_NONE);
}