diff options
author | Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com> | 2010-06-18 16:16:01 +0300 |
---|---|---|
committer | Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com> | 2010-06-18 19:03:01 +0300 |
commit | 927d9abd5afa244975695dffca7875dba378c712 (patch) | |
tree | 78f0493d341fd23fd4927f237daa5ec4c601a462 /test | |
parent | 068aba45d4e28abd306efe3457f1ffafeed3d1d1 (diff) | |
download | obexd-927d9abd5afa244975695dffca7875dba378c712.tar.gz |
Improve pbap-client logic
Diffstat (limited to 'test')
-rwxr-xr-x | test/pbap-client | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/test/pbap-client b/test/pbap-client index 1e32697..9d73c6e 100755 --- a/test/pbap-client +++ b/test/pbap-client @@ -18,12 +18,6 @@ session = dbus.Interface(bus.get_object("org.openobex.client", session_path), print "\n--- Select Phonebook internal:pb ---\n" pbap.Select("int", "pb") -print "\n--- PullAll ---\n" -pbap.SetFormat("vcard30") -pbap.SetFilter(["VERSION", "FN", "TEL"]); -ret = pbap.PullAll() -print "%s" % (ret) - print "\n--- GetSize ---\n" ret = pbap.GetSize() print "Size = %d\n" % (ret) @@ -32,15 +26,13 @@ print "\n--- List vCard ---\n" ret = pbap.List() for item in ret: print "%s : %s" % (item[0], item[1]) - -if len(ret) > 0: - print "\n--- Pull First Available vCard ---\n" pbap.SetFormat("vcard30") pbap.SetFilter(["VERSION", "FN", "TEL"]); - ret = pbap.Pull(ret[0][0]) + ret = pbap.Pull(item[0]) print "%s" % (ret) -print "\n--- List All Available Filter Fields ---\n" -ret = pbap.ListFilterFields() -for item in ret: - print "%s" % (item) +print "\n--- PullAll ---\n" +pbap.SetFormat("vcard30") +pbap.SetFilter(["VERSION", "FN", "TEL"]); +ret = pbap.PullAll() +print "%s" % (ret) |