KolabUtilCalendarCache

KolabUtilCalendarCache — Utility methods for Evolution-Kolab calendar backend implementation with ECalBackendCache side effects.

Synopsis

                    KolabUtilCalendarCacheClass;
                    KolabUtilCalendarCache;
ECalComponent *     kolab_util_calendar_cache_get_tz    (ECalBackendCache *cache,
                                                         ECalComponent *comp);
ECalComponent *     kolab_util_calendar_cache_get_object
                                                        (ECalBackendCache *cal_cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         const gchar *uid,
                                                         gboolean bulk,
                                                         GError **error);
ECalComponent *     kolab_util_calendar_cache_remove_instance
                                                        (ECalBackendCache *cal_cache,
                                                         CalObjModType mod,
                                                         ECalComponent *ecalcomp,
                                                         const gchar *uid,
                                                         const gchar *rid);
gboolean            kolab_util_calendar_cache_assure_uid_on_ecalcomponent
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         ECalComponent *ecalcomp,
                                                         gboolean bulk,
                                                         GError **error);
void                kolab_util_calendar_cache_update_on_query
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *query,
                                                         const gchar *uri);
void                kolab_util_calendar_cache_update_object
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         const gchar *uid,
                                                         gboolean bulk,
                                                         GError **error);

Object Hierarchy

  GObject
   +----KolabUtilCalendarCache

Description

The methods in KolabUtilCalendarCache are supposed to update the ECalBackendCache as a side effect to their primary task or retrieve data from the cache to fulfill its task.

Details

KolabUtilCalendarCacheClass

typedef struct {
	GObjectClass parent_class;
} KolabUtilCalendarCacheClass;

KolabUtilCalendarCache

typedef struct _KolabUtilCalendarCache KolabUtilCalendarCache;

kolab_util_calendar_cache_get_tz ()

ECalComponent *     kolab_util_calendar_cache_get_tz    (ECalBackendCache *cache,
                                                         ECalComponent *comp);

comp :

An ECalComponent (Some calendar entry).

cache :

An Cache.

Returns :

An ECalComponent containing a timezone or NULL if none is found. . The tzid of the ECalComponent DTSTART property is used to extract timezone information from the supplied backend cache. The ECalComponent returned should be freed, using g_object_unref(), once no longer needed. Note: Events may not provide a timezone/TZID (like UTC)!

kolab_util_calendar_cache_get_object ()

ECalComponent *     kolab_util_calendar_cache_get_object
                                                        (ECalBackendCache *cal_cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         const gchar *uid,
                                                         gboolean bulk,
                                                         GError **error);

Retrieves the the object referenced by uid from the given cal_cache. If none is found, NULL is returned.

cal_cache :

An Cache.

koma :

A KolabMailAccess object.

uri :

An ECalComponent uri string.

uid :

The uid to search for.

bulk :

Whether or not this is a mass operation.

error :

GError placeholder.

Returns :

An ECalComponent containing the object. Unref if no longer needed.

kolab_util_calendar_cache_remove_instance ()

ECalComponent *     kolab_util_calendar_cache_remove_instance
                                                        (ECalBackendCache *cal_cache,
                                                         CalObjModType mod,
                                                         ECalComponent *ecalcomp,
                                                         const gchar *uid,
                                                         const gchar *rid);

Removes an instance of an event with recurrence.

cal_cache :

An ECalBackendCache.

mod :

CalObjModType to apply to the remove request.

oldcomp :

The object before the removal took place.

uid :

The UID of the recurring event.

rid :

The recurrence ID of the recurrence.

Returns :

The modified component.

kolab_util_calendar_cache_assure_uid_on_ecalcomponent ()

gboolean            kolab_util_calendar_cache_assure_uid_on_ecalcomponent
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         ECalComponent *ecalcomp,
                                                         gboolean bulk,
                                                         GError **error);

Sets a new uid to ecalcomp and assures, that it is not used in koma, so far.

cache :

An ECalBackendCache.

koma :

A KolabMailAccess instance.

uri :

An ECalComponent uri string.

ecalcomp :

An ECalComponent.

bulk :

Whether or not this is a mass operation.

error :

GError placeholder.

Returns :

On Success TRUE is returned.

kolab_util_calendar_cache_update_on_query ()

void                kolab_util_calendar_cache_update_on_query
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *query,
                                                         const gchar *uri);

kolab_util_calendar_cache_update_object ()

void                kolab_util_calendar_cache_update_object
                                                        (ECalBackendCache *cache,
                                                         KolabMailAccess *koma,
                                                         const gchar *uri,
                                                         const gchar *uid,
                                                         gboolean bulk,
                                                         GError **error);