diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-25 07:06:56 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-25 07:06:56 +0200 |
commit | c22cf5e14a2ac7aee21efba748221985291a2cb7 (patch) | |
tree | c8fd8a76c1886e7b317a4cb7364cbd1f1c262f7a /test | |
parent | 3676095363b6881cda7334f566f1ca0bf7d052c0 (diff) | |
download | obexd-c22cf5e14a2ac7aee21efba748221985291a2cb7.tar.gz |
Add script for testing ExchangeBusinessCards method
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rwxr-xr-x | test/exchange-business-cards | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 79ada83..815c392 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,6 +7,7 @@ obex_test_LDADD = @GWOBEX_LIBS@ @OPENOBEX_LIBS@ @BLUEZ_LIBS@ @GLIB_LIBS@ AM_CFLAGS = @GLIB_CFLAGS@ @BLUEZ_CFLAGS@ @OPENOBEX_CFLAGS@ @GWOBEX_CFLAGS@ -EXTRA_DIST = send-files simple-agent +EXTRA_DIST = send-files pull-business-card exchange-business-cards \ + simple-agent MAINTAINERCLEANFILES = Makefile.in diff --git a/test/exchange-business-cards b/test/exchange-business-cards new file mode 100755 index 0000000..4b0c7ed --- /dev/null +++ b/test/exchange-business-cards @@ -0,0 +1,15 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SessionBus() +client = dbus.Interface(bus.get_object("org.openobex.client", "/"), + "org.openobex.Client") + +if (len(sys.argv) < 4): + print "Usage: %s <device> <clientfile> <file>" % (sys.argv[0]) + sys.exit(1) + +client.ExchangeBusinessCards({ "Destination": sys.argv[1] }, + sys.argv[2], sys.argv[3]) |