Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12899


Change subject: Log signals from VoiceCall dbus objects
......................................................................

Log signals from VoiceCall dbus objects

Change-Id: I0def02b9063f75ec32c8b9382bdb12d65e1fb9eb
---
M src/osmo_gsm_tester/modem.py
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/99/12899/1

diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index 59e2136..efb21c7 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -39,6 +39,7 @@
 I_CALL = 'org.ofono.VoiceCall'
 I_SS = 'org.ofono.SupplementaryServices'
 I_SIMMGR = 'org.ofono.SimManager'
+I_VOICECALL = 'org.ofono.VoiceCall'

 # See https://github.com/intgr/ofono/blob/master/doc/network-api.txt#L78
 NETREG_ST_REGISTERED = 'registered'
@@ -739,8 +740,17 @@
         self.dbg('call state: %s' % state, call_id=call_id)
         return state

+    def on_voicecall_property_change(self, obj_path, name, value):
+        self.dbg('%r:%r.PropertyChanged() -> %s=%s' % (obj_path, I_VOICECALL, 
name, value))
+
+    def on_voicecall_disconnect_reason(self, obj_path, reason):
+        self.dbg('%r:%r.DisconnectReason() -> %s' % (obj_path, I_VOICECALL, 
reason))
+
     def _on_callmgr_call_added(self, obj_path, properties):
         self.dbg('%r.CallAdded() -> %s=%r' % (I_CALLMGR, obj_path, 
repr(properties)))
+        call_dbus_obj = systembus_get(obj_path)
+        dbus_connect(call_dbus_obj.PropertyChanged, lambda name, value: 
self.on_voicecall_property_change(obj_path, name, value))
+        dbus_connect(call_dbus_obj.DisconnectReason, lambda reason: 
self.on_voicecall_disconnect_reason(obj_path, reason))
         if obj_path not in self.call_list:
             self.call_list.append(obj_path)
         else:

--
To view, visit https://gerrit.osmocom.org/12899
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0def02b9063f75ec32c8b9382bdb12d65e1fb9eb
Gerrit-Change-Number: 12899
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>

Reply via email to