test: Add send-vcard script

This commit is contained in:
Denis Kenzior 2010-11-04 10:20:23 -05:00
parent 7ecff9f83b
commit a44bff189c
2 changed files with 22 additions and 1 deletions

View File

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

20
test/send-vcard Executable file
View File

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