From cb8bc13982c25f0def7df007e686368d76e0f187 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 23 Mar 2010 17:47:03 -0300 Subject: [PATCH] obexd: Change PullPhoneBook to return the vcards in the requested format --- obexd/plugins/phonebook-ebook.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index 997e1b2ae..647aee7d7 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -67,6 +67,8 @@ static void ebookpull_cb(EBook *book, EBookStatus status, GList *contacts, GString *string = g_string_new(""); GList *l = g_list_nth(contacts, data->params->liststartoffset); guint count = 0, maxcount = data->params->maxlistcount; + guint format = (data->params->format ? + EVC_FORMAT_VCARD_30 : EVC_FORMAT_VCARD_21); /* FIXME: Missing 0.vcf */ @@ -81,7 +83,7 @@ static void ebookpull_cb(EBook *book, EBookStatus status, GList *contacts, contact = E_CONTACT(contacts->data); evcard = E_VCARD(contact); - vcard = e_vcard_to_string(evcard, EVC_FORMAT_VCARD_30); + vcard = e_vcard_to_string(evcard, format); string = g_string_append(string, vcard); g_free(vcard); } -- 2.47.3