diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-04-20 20:07:53 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-04-20 20:07:53 +0200 |
commit | 49a43c942e32ae6733c3b15b4e6d02cf9bfdd6ff (patch) | |
tree | 3010319acc2a7286b6c8b63820a824a7ce2e10a4 /test/publish-record | |
parent | 61f701d7456a74073de039a6f3f80112978b4b50 (diff) | |
download | neard-49a43c942e32ae6733c3b15b4e6d02cf9bfdd6ff.tar.gz neard-49a43c942e32ae6733c3b15b4e6d02cf9bfdd6ff.tar.bz2 neard-49a43c942e32ae6733c3b15b4e6d02cf9bfdd6ff.zip |
adapter: Remove the Publish method
NDEF queueing should be done by upper layers with a more accurate
application status knowledge.
NDEF are now written to tags with the Tag.Write method. A Device.Push
one will also be implemented.
Diffstat (limited to 'test/publish-record')
-rwxr-xr-x | test/publish-record | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/publish-record b/test/publish-record deleted file mode 100755 index 97641e6..0000000 --- a/test/publish-record +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python - -import sys -import dbus - -def help_text(): - print "Usage: %s <adapter-path> <record-type> <...>" % (sys.argv[0]) - print " If type is Text, parameters are <encoding> <language> <representation>" - print " If type is URI, parameters are <uri>" - print " If type is SmartPoster, parameters are <uri>" - print "e.g. < %s /org/neard/nfc0 Text UTF-8 en-US hello,Type2! >" % (sys.argv[0]) - print "e.g. < %s /org/neard/nfc0 URI http://www.nfc-forum.com >" % (sys.argv[0]) - print "e.g. < %s /org/neard/nfc0 SmartPoster http://www.nfc-forum.com >" % (sys.argv[0]) - sys.exit(1) - -if len(sys.argv) < 2: - help_text() - -bus = dbus.SystemBus() - -adapter = dbus.Interface(bus.get_object("org.neard", sys.argv[1]), - "org.neard.Adapter") - -if len(sys.argv) == 6: - if sys.argv[2] in ["Text"]: - adapter.Publish(({ "Type" : "Text", - "Encoding" : sys.argv[3], - "Language" : sys.argv[4], - "Representation" : sys.argv[5] })) - else: - help_text() - -elif len(sys.argv) == 4: - if sys.argv[2] in ["URI"]: - adapter.Publish(({ "Type" : "URI", - "URI" : sys.argv[3] })) - elif sys.argv[2] in ["SmartPoster"]: - adapter.Publish(({ "Type" : "SmartPoster", - "URI" : sys.argv[3] })) - else: - help_text() -else: - help_text() |