summaryrefslogtreecommitdiff
path: root/test/receive-sms
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-09-25 14:04:43 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-09-25 14:04:43 -0700
commit81f2f74dfdf5842c3c29683b7e21c00429309f97 (patch)
tree64b5412b95e09d6db9aee3422f796ecb6f86e1ca /test/receive-sms
parent6a6213670c0084d1d561a5f7bfad526ad3c60159 (diff)
Add some more test scripts for SMS and voice call testing
Diffstat (limited to 'test/receive-sms')
-rwxr-xr-xtest/receive-sms33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/receive-sms b/test/receive-sms
new file mode 100755
index 00000000..a658c587
--- /dev/null
+++ b/test/receive-sms
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+import gobject
+
+import dbus
+import dbus.mainloop.glib
+
+def incoming_message(message, details, path, interface):
+ print "%s" % (message)
+
+ for key in details:
+ val = details[key]
+ print " %s = %s" % (key, val)
+
+if __name__ == '__main__':
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+ bus = dbus.SystemBus()
+
+ bus.add_signal_receiver(incoming_message,
+ bus_name="org.ofono",
+ signal_name = "ImmediateMessage",
+ path_keyword="path",
+ interface_keyword="interface")
+
+ bus.add_signal_receiver(incoming_message,
+ bus_name="org.ofono",
+ signal_name = "IncomingMessage",
+ path_keyword="path",
+ interface_keyword="interface")
+
+ mainloop = gobject.MainLoop()
+ mainloop.run()