[Gpe-list] Progress on gpesyncd -- but problems with libeventdb
g+gpe at cobb.uk.net
Thu Nov 23 01:53:21 CET 2006
I am making progress on changes to gpesyncd to make it compatible with the new
gpe-calendar. I have a new gpesyncd which "sort of" works for contacts and
events (I haven't looked at todos, yet). This uses a copy of the
gpe-calender import/export code -- this should really move into one of the
libraries (libgpevtype?) so it is being fixed and enhanced in one place.
Import of contacts and events mostly works -- I can now receive all my events
and contacts on my Nokia 770 from Outlook. The are, however, significant
bugs (including crashes) in the export code, particularly with recurrences
and alarms. Once I have got gpesyncd itself working better I will start
logging bug reports on the export code.
There are a couple of more serious obstacles in problems with the event DB
1) It is not possible to tell if an event with a particular UID exists or not.
If event_db_find_by_uid is called with any UID an event will be returned even
if there is no such event in the database. This "phantom" event has no
This is not a major problem for gpesyncd as the user should use UIDLIST to see
the list of valid UIDs and only ask for them. But it can cause confusion and
it seems like event_db_find_by_uid should really return a NULL if the UID
does not exist (which is what the comments in the code say).
2) There is no event DB API to return all the event sources in the database.
It is only possible to ask for event instances within a particular time
range. The maximum time can be unspecified but in that case any indefinitely
repeating event causes an infinite loop trying to generate all the instances!
Even if a time range is specified, recurring events are returned multiple
times (corresponding to their instances). There is no API to provide the
event source from the instances and it is up to the caller to de-duplicate
(which I do not do at the moment).
I realise that for calendar purposes event instances are the useful things.
However, for synchronisation purposes, event sources are the interesting
things -- they (along with their recurrence rules and exceptions) are the
objects which get synchronised, not the instances themselves.
It would be useful if the event DB API provided a call to return all the event
sources in the database, without expanding them into their instances.
Any volunteers to sort out these problems with the event DB?
More information about the Gpe-list