summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-11-04 10:20:23 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-11-04 10:25:42 -0500
commita44bff189cee052b1f87fc43ee1d685073505115 (patch)
tree24f2fefc2ce83eaf3047e93b10c2cb0eac496215
parent7ecff9f83b27664fe71c4e07625ed0e1def8b6c5 (diff)
downloadofono-a44bff189cee052b1f87fc43ee1d685073505115.tar.bz2
test: Add send-vcard script
-rw-r--r--Makefile.am3
-rwxr-xr-xtest/send-vcard20
2 files changed, 22 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 0bf415bf..05082de8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -415,7 +415,8 @@ test_scripts = test/backtrace \
test/get-icon \
test/set-fast-dormancy \
test/test-push-notification \
- test/test-smart-messaging
+ test/test-smart-messaging \
+ test/send-vcard
if TEST
testdir = $(pkglibdir)/test
diff --git a/test/send-vcard b/test/send-vcard
new file mode 100755
index 00000000..d11d5ac4
--- /dev/null
+++ b/test/send-vcard
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+modems = manager.GetModems()
+path = modems[0][0]
+
+manager = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.SmartMessaging')
+
+vcard = file(sys.argv[2]).read()
+path = manager.SendBusinessCard(sys.argv[1], vcard)
+
+print path