test: Update monitor-ofono with USSD support

This commit is contained in:
Denis Kenzior 2010-09-15 11:36:26 -05:00
parent 77361655c0
commit ac9e1157ab
1 changed files with 12 additions and 0 deletions

View File

@ -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()