On Wed, 2011-05-04 at 17:31 +0200, Patrick Ohly wrote:
> On Mi, 2011-05-04 at 09:41 +0200, Patrick Ohly wrote:
> > On Mi, 2011-05-04 at 07:50 +0200, Milan Crha wrote:
> > > I would expect that with CALOBJ_MOD_THIS it may remove only exact
> > > component, for uid + NULL-rid the master object (which implies also all
> > > generated instances) and keep all detached instances,
> > 
> > Okay, then we agree on the desired semantic.
> I ran into another oddity: suppose there is a recurring event without
> exceptions and a detached recurrence gets added. The libecal API does
> not support undoing that operation.
> ...

it sounds like you might find useful an addition of a reverse function
    gboolean e_cal_client_get_object_sync (
         ECalClient *client,
         const gchar *uid, const gchar *rid,
         icalcomponent **icalcomp,
         GCancellable *cancellable, GError **error);
which can return either one component, or a VCALENDAR component.

I'm thinking of something like:
   e_cal_client_replace_object (..., const gchar *uid,
         /* const */ icalcomponent *icalcomp, ...);
Note it doesn't take the 'rid' parameter as the get_object function.

Its meaning would be "drop whatever you have stored for the component of
the given uid and use content of given icalcomp instead", which could be
either single component or a VCALENDAR with a list of detached
components. There might be some checking that the uid matches uids
stored in the icalcomp, but that's a minor thing.

Just an idea.

evolution-hackers mailing list
To change your list options or unsubscribe, visit ...

Reply via email to