[RFC BlueZ v2 21/27] audio/telephony: Add call line identication property support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 profiles/audio/telephony.c | 16 ++++++++++++++++
 profiles/audio/telephony.h |  1 +
 2 files changed, 17 insertions(+)

diff --git a/profiles/audio/telephony.c b/profiles/audio/telephony.c
index 5e88240e6..a5dace7c3 100644
--- a/profiles/audio/telephony.c
+++ b/profiles/audio/telephony.c
@@ -775,3 +775,19 @@ void telephony_call_set_state(struct call *call, enum call_state state)
 			call->path, TELEPHONY_CALL_INTERFACE,
 			"State");
 }
+
+void telephony_call_set_line_id(struct call *call, const char *line_id)
+{
+	if (call->line_id && g_str_equal(call->line_id, line_id))
+		return;
+
+	DBG("device %s call id %s -> %s", call->path, call->line_id, line_id);
+
+	if (call->line_id)
+		g_free(call->line_id);
+	call->line_id = g_strdup(line_id);
+
+	g_dbus_emit_property_changed(btd_get_dbus_connection(),
+			call->path, TELEPHONY_CALL_INTERFACE,
+			"LineIdentification");
+}
diff --git a/profiles/audio/telephony.h b/profiles/audio/telephony.h
index 3f7580e80..5f2a4ae4c 100644
--- a/profiles/audio/telephony.h
+++ b/profiles/audio/telephony.h
@@ -114,3 +114,4 @@ int telephony_call_register_interface(struct call *call);
 void telephony_call_unregister_interface(struct call *call);
 
 void telephony_call_set_state(struct call *call, enum call_state state);
+void telephony_call_set_line_id(struct call *call, const char *line_id);
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux