From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH obexd 5/7 v2] test: Update pbap-client to work with changes in PhonebookAcess
Date: Tue, 28 Aug 2012 15:31:53 +0300 [thread overview]
Message-ID: <1346157115-23933-5-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1346157115-23933-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
test/pbap-client | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/test/pbap-client b/test/pbap-client
index 498f8a3..7dd54ef 100755
--- a/test/pbap-client
+++ b/test/pbap-client
@@ -70,16 +70,16 @@ class PbapClient:
print "Transfer finished with error %s: %s" % (code, message)
mainloop.quit()
- def pull(self, vcard, func):
+ def pull(self, vcard, params, func):
req = Transfer(func)
- self.pbap.Pull(vcard, "",
+ self.pbap.Pull(vcard, "", params,
reply_handler=lambda r: self.register(r, req),
error_handler=self.error)
self.transfers += 1
- def pull_all(self, func):
+ def pull_all(self, params, func):
req = Transfer(func)
- self.pbap.PullAll("",
+ self.pbap.PullAll("", params,
reply_handler=lambda r: self.register(r, req),
error_handler=self.error)
self.transfers += 1
@@ -135,18 +135,15 @@ if __name__ == '__main__':
print "Size = %d\n" % (ret)
print "\n--- List vCard ---\n"
- ret = pbap_client.interface().List()
+ ret = pbap_client.interface().List(dbus.Dictionary())
+ params = dbus.Dictionary({ "Format" : "vcard30",
+ "Fields" : [ "VERSION", "FN", "TEL"] })
for item in ret:
print "%s : %s" % (item[0], item[1])
- pbap_client.interface().SetFormat("vcard30")
- pbap_client.interface().SetFilter(["VERSION", "FN",
- "TEL"]);
- pbap_client.pull(item[0],
+ pbap_client.pull(item[0], params,
lambda x: process_result(x, None))
- pbap_client.interface().SetFormat("vcard30")
- pbap_client.interface().SetFilter(["VERSION", "FN", "TEL"]);
- pbap_client.pull_all(lambda x: process_result(x,
+ pbap_client.pull_all(params, lambda x: process_result(x,
"\n--- PullAll ---\n"))
pbap_client.flush_transfers(lambda: test_paths(paths[1:]))
--
1.7.11.4
next prev parent reply other threads:[~2012-08-28 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 12:31 [PATCH obexd 1/7 v2] client: Add filters to Phonebook.PullAll Luiz Augusto von Dentz
2012-08-28 12:31 ` [PATCH obexd 2/7 v2] client: Add filters to PhonebookAccess.Pull Luiz Augusto von Dentz
2012-09-05 9:59 ` Johan Hedberg
2012-08-28 12:31 ` [PATCH obexd 3/7 v2] client: Add filters to PhonebookAccess.List and PhonebookAccess.Search Luiz Augusto von Dentz
2012-08-28 12:31 ` [PATCH obexd 4/7 v2] client: Remove deprecated methods from PhonebookAccess Luiz Augusto von Dentz
2012-08-28 12:31 ` Luiz Augusto von Dentz [this message]
2012-08-28 12:31 ` [PATCH obexd 6/7 v2] client: Move common code to pull_phonebook Luiz Augusto von Dentz
2012-08-28 12:31 ` [PATCH obexd 7/7 v2] client-doc: Update documentation of PhonebookAccess interface Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346157115-23933-5-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).