8 def extract_ndef(list):
16 def extract_record(key, list):
18 record = dbus.Interface(bus.get_object("org.neard", i),
21 properties = record.GetProperties()
22 print " Record = [ %s ]" % (str(i))
24 for key in properties.keys():
25 val = str(properties[key])
26 print " %s = %s" % (key, val)
28 tag = dbus.Interface(bus.get_object("org.neard", sys.argv[1]),
31 properties = tag.GetProperties()
32 raw_ndef = tag.GetRawNDEF()
34 print "[ %s ]" % (sys.argv[1])
36 print " Raw NDEF = %s" % (extract_ndef(raw_ndef))
38 for key in properties.keys():
40 val = str(properties[key])
41 print " %s = %s" % (key, val)
42 elif key in ["Protocol"]:
43 val = str(properties[key])
44 print " %s = %s" % (key, val)
46 if key in ["Records"]:
47 extract_record(key, properties[key])