[calls] dbus: Add method to silence ringing
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] dbus: Add method to silence ringing
- Date: Tue, 7 Dec 2021 08:28:10 +0000 (UTC)
commit c37e9d8462ede03b171d1df359e43d6d90835c3a
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Tue Oct 19 04:18:28 2021 +0200
dbus: Add method to silence ringing
Fixes #329
src/calls-dbus-manager.c | 16 ++++++++++++++++
src/dbus/org.gnome.Calls.Call.xml | 4 ++++
2 files changed, 20 insertions(+)
---
diff --git a/src/calls-dbus-manager.c b/src/calls-dbus-manager.c
index b1017662..0482f5e0 100644
--- a/src/calls-dbus-manager.c
+++ b/src/calls-dbus-manager.c
@@ -182,6 +182,21 @@ on_handle_call_send_dtmf (CallsDBusCallsCall *skeleton,
}
+static gboolean
+on_handle_call_silence (CallsDBusCallsCall *skeleton,
+ GDBusMethodInvocation *invocation,
+ CallsCall *call)
+{
+ g_return_val_if_fail (CALLS_DBUS_IS_CALLS_CALL (skeleton), FALSE);
+ g_return_val_if_fail (CALLS_IS_CALL (call), FALSE);
+
+ calls_call_silence_ring (call);
+
+ calls_dbus_calls_call_complete_silence (skeleton, invocation);
+ return TRUE;
+}
+
+
static void
call_added_cb (CallsDBusManager *self, CallsCall *call)
{
@@ -203,6 +218,7 @@ call_added_cb (CallsDBusManager *self, CallsCall *call)
"object_signal::handle-accept", G_CALLBACK (on_handle_call_accept), call,
"object_signal::handle-hangup", G_CALLBACK (on_handle_call_hangup), call,
"object-signal::handle-send_dtmf", G_CALLBACK (on_handle_call_send_dtmf), call,
+ "object_signal::handle-silence", G_CALLBACK (on_handle_call_silence), call,
NULL);
g_object_bind_property (call, "state", iface, "state", G_BINDING_SYNC_CREATE);
g_object_bind_property (call, "inbound", iface, "inbound", G_BINDING_SYNC_CREATE);
diff --git a/src/dbus/org.gnome.Calls.Call.xml b/src/dbus/org.gnome.Calls.Call.xml
index 5c7b8bd4..9f6fad3e 100644
--- a/src/dbus/org.gnome.Calls.Call.xml
+++ b/src/dbus/org.gnome.Calls.Call.xml
@@ -31,6 +31,10 @@
</doc:doc>
</arg>
</method>
+ <method name="Silence"/>
+ <doc:doc>
+ <doc:summary>Silence the ringing</doc:summary>
+ </doc:doc>
<property name="Inbound" type="b" access="read"/>
<property name="State" type="u" access="read"/>
<property name="Id" type="s" access="read">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]