[evolution-data-server] Just add into the interval tree while loading the cache
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Just add into the interval tree while loading the cache
- Date: Tue, 7 Sep 2010 11:39:46 +0000 (UTC)
commit 9b92dadce8a58fd148a0c120fea22abd47ad1171
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Tue Sep 7 17:06:55 2010 +0530
Just add into the interval tree while loading the cache
calendar/libedata-cal/e-cal-backend-file-store.c | 2 +-
calendar/libedata-cal/e-cal-backend-store.c | 17 +++++++++++++++++
calendar/libedata-cal/e-cal-backend-store.h | 5 +++++
3 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/calendar/libedata-cal/e-cal-backend-file-store.c b/calendar/libedata-cal/e-cal-backend-file-store.c
index b8a5f09..5df207a 100644
--- a/calendar/libedata-cal/e-cal-backend-file-store.c
+++ b/calendar/libedata-cal/e-cal-backend-file-store.c
@@ -681,7 +681,7 @@ scan_vcalendar (ECalBackendStore *store, icalcomponent *top_icalcomp)
e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
resolve_tzid, store, dzone, kind);
- e_cal_backend_store_put_component_with_time_range (store, comp, time_start, time_end);
+ e_cal_backend_store_interval_tree_add_comp (store, comp, time_start, time_end);
g_object_unref (comp);
}
diff --git a/calendar/libedata-cal/e-cal-backend-store.c b/calendar/libedata-cal/e-cal-backend-store.c
index dfa2e99..1b4e76d 100644
--- a/calendar/libedata-cal/e-cal-backend-store.c
+++ b/calendar/libedata-cal/e-cal-backend-store.c
@@ -503,3 +503,20 @@ e_cal_backend_store_freeze_changes (ECalBackendStore *store)
(E_CAL_BACKEND_STORE_GET_CLASS (store))->freeze_changes (store);
}
+
+/**
+ * e_cal_backend_store_interval_tree_add_comp:
+ *
+ * Since: 2.28
+ **/
+void
+e_cal_backend_store_interval_tree_add_comp (ECalBackendStore *store, ECalComponent *comp, time_t occurence_start, time_t occurence_end)
+{
+ ECalBackendStorePrivate *priv;
+ g_return_if_fail (E_IS_CAL_BACKEND_STORE (store));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
+
+ priv = E_CAL_BACKEND_STORE_GET_PRIVATE (store);
+
+ e_intervaltree_insert (priv->intervaltree, occurence_start, occurence_end, comp);
+}
diff --git a/calendar/libedata-cal/e-cal-backend-store.h b/calendar/libedata-cal/e-cal-backend-store.h
index c25692b..c823e9d 100644
--- a/calendar/libedata-cal/e-cal-backend-store.h
+++ b/calendar/libedata-cal/e-cal-backend-store.h
@@ -165,6 +165,11 @@ gboolean e_cal_backend_store_put_key_value
void e_cal_backend_store_thaw_changes(ECalBackendStore *store);
void e_cal_backend_store_freeze_changes
(ECalBackendStore *store);
+void e_cal_backend_store_interval_tree_add_comp
+ (ECalBackendStore *store,
+ ECalComponent *comp,
+ time_t start,
+ time_t end);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]