Re: [Evolution-hackers] EDS addressbook api info

2013-10-22 Thread Timothy Ward
Hi all,

After looking at the latest EDS docs and the info on the latest EDS
addressbook API I wondered if there were and docs related to reading the
address book info in total all fields to another source, the code I am
using is quite old and the addressbook API interface has changed many
times and requires rewritting. Do any reference notes exist that would
help me with this task.  

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] EDS addressbook api info

2013-10-22 Thread Matthew Barnes
On Wed, 2013-10-23 at 00:39 +1100, Timothy Ward wrote:
 After looking at the latest EDS docs and the info on the latest EDS
 addressbook API I wondered if there were and docs related to reading the
 address book info in total all fields to another source, the code I am
 using is quite old and the addressbook API interface has changed many
 times and requires rewritting. Do any reference notes exist that would
 help me with this task.  

Not quite sure what you mean by reading to another source, but you can
obtain all the EContact objects from an address book with
e_book_client_get_contacts().

You'll want to pass an S-expression query that just matches everything.
I believe the way to do so is:

book_query = e_book_query_any_field_contains ();
sexp_string = e_book_query_to_string (book_query);

e_book_client_get_contacts (client, sexp_string, ...);

The query syntax is not very well documented.  I gleaned the example
above from Evolution code.  I can try to elaborate further if needed.

Matthew Barnes

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers