6 bus = dbus.SessionBus()
8 client = dbus.Interface(bus.get_object("org.openobex.client", "/"),
11 print "Creating Session"
12 session_path = client.CreateSession({"Destination": sys.argv[1], "Target": "PBAP"})
13 pbap = dbus.Interface(bus.get_object("org.openobex.client", session_path),
14 "org.openobex.PhonebookAccess")
15 session = dbus.Interface(bus.get_object("org.openobex.client", session_path),
16 "org.openobex.Session")
18 paths = ["PB", "ICH", "OCH", "MCH", "CCH"]
21 print "\n--- Select Phonebook %s ---\n" % (path)
22 pbap.Select("int", path)
24 print "\n--- GetSize ---\n"
26 print "Size = %d\n" % (ret)
28 print "\n--- List vCard ---\n"
31 print "%s : %s" % (item[0], item[1])
32 pbap.SetFormat("vcard30")
33 pbap.SetFilter(["VERSION", "FN", "TEL"]);
34 ret = pbap.Pull(item[0])
37 print "\n--- PullAll ---\n"
38 pbap.SetFormat("vcard30")
39 pbap.SetFilter(["VERSION", "FN", "TEL"]);