On Fri, 2008-08-01 at 16:14 +0200, Sven Pfaller wrote:
> libsoylent uses libebook extensively, so I am working longer than a 
> month with libebook and libebook-data now. Some questions queued up, and 
> I would also be thankful for some help as I am stuck with some bugs (?) 
> at the moment.

I have used some parts of libebook in SyncEvolution and can try to
answer some questions, but probably not all.

> Okay, here are my points:
>   * attribute-value-lists:
> When I call e_vcard_attribute_get_values, I get a list of values. For 
> example if I call it on the ADDR attribute, I get a list like:
> "foo-street", "foo-city", "foo-region" ...
> If two addresses exist, the list looks like this:
> "foo-street", "foo-city", "foo-region", "bar-street", "bar-city", 
> "bar-region" ...
> Is there a way to retrieve the raw vCard strings as a list?

I don't think so. You can get the complete vCard or none, but not parts
of it.

>   * creating a system-addressbook
> On a fresh system, where Evolution hasn't been run yet, there exists no 
> system-addressbook. libsoylent relies on a system-addressbook, so it has 
> to create it if it doesn't exist yet. I didn't find anything about that 
> in the documentation or in the Evolution source. Could you please give 
> me a hint or point me to the right location in the Evolution source?

You can create a new address book with e_book_new_from_uri() and a
"file://" URI. However, this address book is not visible in Evolution.
Some special sauce is necessary to make the recipe complete. For
example, adding entries to the gconf database. I don't know where
Evolution does that work.

>   * adding contacts to an addressbook
> libsoylent creates addressbooks with calls to e_source_new, 
> e_source_group_add, e_sourc_list_sync.
> However, if I try to add contacts to an addressbook created this way, 
> E-D-S will just hang forever.
> Detailed source-code is attached. Help would be highly appreciated :) . 
> Should I file a bug for this?

Before you do that you'll need to figure out what happens in EDS. Run it
in a shell window by starting evolution-data-server manually before
Evolution does it automatically. Also install the debug information for
it and if it crashes, use a debugger to find out where and why.

I suspect that you are doing something that crashes it, in which case
clients using the synchronous API hang forever. This is a known problem
that was discussed on this list a while ago; there's no good solution.
The workaround that I tried (running the necessary event loops in a
second thread) caused crashes, so I removed it again from SyncEvolution.

>   * deleting an addressbook
> This one seems related to the "adding contacts" problem. Trying to 
> delete addressbooks that were created like described above will result 
> in e_book_remove throwing an "EDS-Status returned 20" error.

No idea. Again, tracking the call in EDS with a debugger will tell you

> Okay, that's it. If you could help me, that would make me ueber-happy ;) 
> . Just tell me if you need more information.

Giving the version of your Evolution and (presumably) Linux distribution
would be a start...

Bye, Patrick Ohly

Evolution-hackers mailing list

Reply via email to