Re: [Evolution-hackers] Description of addressbook.db structure



On Thu, 2003-04-10 at 15:15, Roland Moriz wrote:
> Hi Hackers,
> 
> I would like to create a perl-module that is able to write and create
> Evolution addressbook.db entries (contacts, contact-lists etc).
> 
> Is there a file structure definition available?
> What's the calculation of the "UID" field?

The db file is nothing more than a hash of vcards where the UID field is
used as the db key (although that's not important, since no searching is
done via the key).

the UID field is ("pas-id-%08lX%08X", time(NULL), static_counter++).

All the above information aside, I suggest you don't create/modify
addressbook.db entries using straight perl modifying the file's
internals.  Going through the wombat is really the better way to do
this, since you'll get notification if things have changed (if that's
important), and also evolution will get notified of things that you
change/create/delete.  Also, the wombat doesn't watch the file
modification times of the .db and summary to determine when to update
the summary.  This means the newly added cards won't be reflected
properly in the summary and so won't be available in the entries where
we complete, at least until you restart evo.

Chris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]