From ac9e1157ab9a29e61b8b3eb4c5a64fc94b61f772 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 15 Sep 2010 11:36:26 -0500 Subject: [PATCH] test: Update monitor-ofono with USSD support --- test/monitor-ofono | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/monitor-ofono b/test/monitor-ofono index e4375b89..f7d1a173 100755 --- a/test/monitor-ofono +++ b/test/monitor-ofono @@ -71,6 +71,10 @@ def message(msg, args, member, path, interface): print "{%s} [%s] %s %s (%s)" % (iface, path, member, str(msg), pretty(args)) +def ussd(msg, member, path, interface): + iface = interface[interface.rfind(".") + 1:] + print "{%s} [%s] %s %s" % (iface, path, member, str(msg)) + if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) @@ -142,5 +146,13 @@ if __name__ == '__main__': path_keyword="path", interface_keyword="interface") + for member in ["NotificationReceived", "RequestReceived"]: + bus.add_signal_receiver(ussd, + bus_name="org.ofono", + signal_name = member, + member_keyword="member", + path_keyword="path", + interface_keyword="interface") + mainloop = gobject.MainLoop() mainloop.run()