evolution-data-server r8717 - in branches/camel-db-summary: . addressbook addressbook/backends/file addressbook/backends/groupwise addressbook/backends/ldap addressbook/backends/vcf addressbook/libedata-book calendar calendar/backends/caldav calendar/backends/contacts calendar/backends/groupwise calendar/backends/http calendar/libecal calendar/libedata-cal calendar/tests/ecal camel/providers/groupwise docs/reference docs/reference/calendar/libedata-cal docs/reference/libebackend docs/reference/libedataserver libebackend libedataserver po servers/exchange servers/exchange/storage servers/groupwise src
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8717 - in branches/camel-db-summary: . addressbook addressbook/backends/file addressbook/backends/groupwise addressbook/backends/ldap addressbook/backends/vcf addressbook/libedata-book calendar calendar/backends/caldav calendar/backends/contacts calendar/backends/groupwise calendar/backends/http calendar/libecal calendar/libedata-cal calendar/tests/ecal camel/providers/groupwise docs/reference docs/reference/calendar/libedata-cal docs/reference/libebackend docs/reference/libedataserver libebackend libedataserver po servers/exchange servers/exchange/storage servers/groupwise src
- Date: Wed, 30 Apr 2008 10:39:09 +0100 (BST)
Author: sragavan
Date: Wed Apr 30 09:39:08 2008
New Revision: 8717
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8717&view=rev
Log:
Merge branch 'disk-summary' into new_summary
Added:
branches/camel-db-summary/docs/reference/libebackend/
branches/camel-db-summary/docs/reference/libebackend/Makefile.am
- copied, changed from r8712, /branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am
branches/camel-db-summary/docs/reference/libebackend/libebackend-docs.xml
branches/camel-db-summary/docs/reference/libebackend/libebackend-sections.txt
branches/camel-db-summary/docs/reference/libebackend/libebackend.types
branches/camel-db-summary/libebackend/
branches/camel-db-summary/libebackend/Makefile.am
branches/camel-db-summary/libebackend/e-data-server-module.c
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-data-server-module.c
branches/camel-db-summary/libebackend/e-data-server-module.h
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-data-server-module.h
branches/camel-db-summary/libebackend/e-db3-utils.c
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-db3-utils.c
branches/camel-db-summary/libebackend/e-db3-utils.h
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-db3-utils.h
branches/camel-db-summary/libebackend/e-dbhash.c
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-dbhash.c
branches/camel-db-summary/libebackend/e-dbhash.h
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-dbhash.h
branches/camel-db-summary/libebackend/e-file-cache.c
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-file-cache.c
branches/camel-db-summary/libebackend/e-file-cache.h
- copied, changed from r8712, /branches/camel-db-summary/libedataserver/e-file-cache.h
branches/camel-db-summary/libebackend/libebackend.pc.in
Removed:
branches/camel-db-summary/libedataserver/e-data-server-module.c
branches/camel-db-summary/libedataserver/e-data-server-module.h
branches/camel-db-summary/libedataserver/e-db3-utils.c
branches/camel-db-summary/libedataserver/e-db3-utils.h
branches/camel-db-summary/libedataserver/e-dbhash.c
branches/camel-db-summary/libedataserver/e-dbhash.h
branches/camel-db-summary/libedataserver/e-file-cache.c
branches/camel-db-summary/libedataserver/e-file-cache.h
Modified:
branches/camel-db-summary/ChangeLog
branches/camel-db-summary/Makefile.am
branches/camel-db-summary/addressbook/ChangeLog
branches/camel-db-summary/addressbook/backends/file/Makefile.am
branches/camel-db-summary/addressbook/backends/file/e-book-backend-file-factory.c
branches/camel-db-summary/addressbook/backends/file/e-book-backend-file.c
branches/camel-db-summary/addressbook/backends/groupwise/Makefile.am
branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise-factory.c
branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise.c
branches/camel-db-summary/addressbook/backends/ldap/e-book-backend-ldap-factory.c
branches/camel-db-summary/addressbook/backends/vcf/Makefile.am
branches/camel-db-summary/addressbook/backends/vcf/e-book-backend-vcf-factory.c
branches/camel-db-summary/addressbook/libedata-book/Makefile.am
branches/camel-db-summary/addressbook/libedata-book/e-book-backend-cache.h
branches/camel-db-summary/addressbook/libedata-book/e-book-backend-db-cache.c
branches/camel-db-summary/addressbook/libedata-book/e-book-backend-summary.c
branches/camel-db-summary/addressbook/libedata-book/e-data-book-factory.c
branches/camel-db-summary/calendar/ChangeLog
branches/camel-db-summary/calendar/backends/caldav/e-cal-backend-caldav.c
branches/camel-db-summary/calendar/backends/contacts/e-cal-backend-contacts.c
branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise.c
branches/camel-db-summary/calendar/backends/http/e-cal-backend-http.c
branches/camel-db-summary/calendar/libecal/e-cal-component.c
branches/camel-db-summary/calendar/libedata-cal/e-cal-backend-cache.h
branches/camel-db-summary/calendar/libedata-cal/e-data-cal-factory.c
branches/camel-db-summary/calendar/tests/ecal/test-ecal.c
branches/camel-db-summary/camel/providers/groupwise/ChangeLog
branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-folder.c
branches/camel-db-summary/configure.in
branches/camel-db-summary/docs/reference/Makefile.am
branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am
branches/camel-db-summary/docs/reference/libedataserver/libedataserver.types
branches/camel-db-summary/libedataserver/Makefile.am
branches/camel-db-summary/po/ChangeLog
branches/camel-db-summary/po/gl.po
branches/camel-db-summary/po/nb.po
branches/camel-db-summary/po/sl.po
branches/camel-db-summary/servers/exchange/ChangeLog
branches/camel-db-summary/servers/exchange/storage/exchange-account.c
branches/camel-db-summary/servers/groupwise/ChangeLog
branches/camel-db-summary/servers/groupwise/e-gw-container.c
branches/camel-db-summary/servers/groupwise/e-gw-item.c
branches/camel-db-summary/servers/groupwise/e-gw-item.h
branches/camel-db-summary/src/Makefile.am
branches/camel-db-summary/src/server.c
Modified: branches/camel-db-summary/Makefile.am
==============================================================================
--- branches/camel-db-summary/Makefile.am (original)
+++ branches/camel-db-summary/Makefile.am Wed Apr 30 09:39:08 2008
@@ -9,8 +9,7 @@
CALENDAR_DIR = calendar
endif
-SUBDIRS = $(LIBDB) win32 libedataserver servers camel addressbook $(CALENDAR_DIR) libedataserverui src docs art po
-DIST_SUBDIRS= win32 libedataserver servers camel addressbook calendar libedataserverui src docs art po
+SUBDIRS = $(LIBDB) win32 libedataserver libebackend servers camel addressbook $(CALENDAR_DIR) libedataserverui src docs art po
changelogs = \
ChangeLog
Modified: branches/camel-db-summary/addressbook/backends/file/Makefile.am
==============================================================================
--- branches/camel-db-summary/addressbook/backends/file/Makefile.am (original)
+++ branches/camel-db-summary/addressbook/backends/file/Makefile.am Wed Apr 30 09:39:08 2008
@@ -18,6 +18,7 @@
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
$(top_builddir)/libedataserver/libedataserver-1.2.la \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(DB_LIBS) \
$(EVOLUTION_ADDRESSBOOK_LIBS)
Modified: branches/camel-db-summary/addressbook/backends/file/e-book-backend-file-factory.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/file/e-book-backend-file-factory.c (original)
+++ branches/camel-db-summary/addressbook/backends/file/e-book-backend-file-factory.c Wed Apr 30 09:39:08 2008
@@ -27,7 +27,7 @@
#include <string.h>
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "libedata-book/e-book-backend-factory.h"
#include "e-book-backend-file.h"
Modified: branches/camel-db-summary/addressbook/backends/file/e-book-backend-file.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/file/e-book-backend-file.c (original)
+++ branches/camel-db-summary/addressbook/backends/file/e-book-backend-file.c Wed Apr 30 09:39:08 2008
@@ -40,8 +40,9 @@
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
-#include "libedataserver/e-dbhash.h"
-#include "libedataserver/e-db3-utils.h"
+#include "libebackend/e-dbhash.h"
+#include "libebackend/e-db3-utils.h"
+
#include "libedataserver/e-data-server-util.h"
#include "libedataserver/e-flag.h"
Modified: branches/camel-db-summary/addressbook/backends/groupwise/Makefile.am
==============================================================================
--- branches/camel-db-summary/addressbook/backends/groupwise/Makefile.am (original)
+++ branches/camel-db-summary/addressbook/backends/groupwise/Makefile.am Wed Apr 30 09:39:08 2008
@@ -20,6 +20,7 @@
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
$(top_builddir)/libedataserver/libedataserver-1.2.la \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(DB_LIBS) \
$(EVOLUTION_ADDRESSBOOK_LIBS) \
$(SOUP_LIBS)
Modified: branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise-factory.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise-factory.c (original)
+++ branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise-factory.c Wed Apr 30 09:39:08 2008
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "libedata-book/e-book-backend-factory.h"
#include "e-book-backend-groupwise.h"
Modified: branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise.c (original)
+++ branches/camel-db-summary/addressbook/backends/groupwise/e-book-backend-groupwise.c Wed Apr 30 09:39:08 2008
@@ -37,9 +37,10 @@
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
+#include "libebackend/e-db3-utils.h"
+
#include "libedataserver/e-sexp.h"
#include "libedataserver/e-data-server-util.h"
-#include "libedataserver/e-db3-utils.h"
#include "libedataserver/e-flag.h"
#include "libedataserver/e-url.h"
#include "libebook/e-contact.h"
@@ -2241,6 +2242,9 @@
view = "name email";
if (search_string) {
+ if (filter)
+ g_object_unref (filter);
+
/* groupwise server supports only name, rebuild the filter */
filter = e_gw_filter_new ();
e_gw_filter_add_filter_component (filter, E_GW_FILTER_OP_BEGINS,
@@ -2297,6 +2301,8 @@
printf("reading contacts from cache took %ld.%03ld seconds\n",
diff/1000,diff%1000);
}
+ if (filter)
+ g_object_unref (filter);
return NULL;
}
else {
@@ -2337,9 +2343,12 @@
if (temp_list)
g_list_free (temp_list);
bonobo_object_unref (book_view);
-
+
+ if (filter)
+ g_object_unref (filter);
+
return NULL;
- }
+ }
/* no summary information found, read from server */
if (enable_debug)
@@ -2362,6 +2371,8 @@
if (status != E_GW_CONNECTION_STATUS_OK) {
e_data_book_view_notify_complete (book_view, GNOME_Evolution_Addressbook_OtherError);
bonobo_object_unref (book_view);
+ if (filter)
+ g_object_unref (filter);
return NULL;
}
@@ -2692,6 +2703,9 @@
printf("e_gw_connection_read_cursor took %ld.%03ld seconds for %d contacts\n", diff / 1000, diff % 1000, CURSOR_ITEM_LIMIT);
}
+ if (status != E_GW_CONNECTION_STATUS_OK)
+ break;
+
for (l = gw_items; l != NULL; l = g_list_next (l)) {
contact_num++;
@@ -2831,12 +2845,6 @@
tm = gmtime (&mod_time);
strftime (cache_time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
- if (e_book_backend_summary_load (ebgw->priv->summary) == FALSE ||
- e_book_backend_summary_is_up_to_date (ebgw->priv->summary, mod_time) == FALSE) {
- /* build summary */
- build_summary (ebgw);
- }
-
filter = e_gw_filter_new ();
e_gw_filter_add_filter_component (filter, E_GW_FILTER_OP_GREATERTHAN,
"modified", cache_time_string);
@@ -3000,11 +3008,6 @@
g_stat (cache_file_name, &buf);
g_free (cache_file_name);
mod_time = buf.st_mtime;
- if (e_book_backend_summary_load (ebgw->priv->summary) == FALSE ||
- e_book_backend_summary_is_up_to_date (ebgw->priv->summary, mod_time) == FALSE) {
- /* build summary */
- build_summary (ebgw);
- }
if (cache_last_sequence != server_last_sequence) {
@@ -3331,6 +3334,13 @@
if (e_book_backend_db_cache_is_populated (ebgw->priv->file_db)) {
if (enable_debug)
printf("cache is populated\n");
+
+ if (!e_book_backend_summary_load (priv->summary))
+ build_summary (ebgw);
+
+ ebgw->priv->is_cache_ready = TRUE;
+ ebgw->priv->is_summary_ready = TRUE;
+
if (priv->is_writable){
if (enable_debug) {
printf("is writable\n");
Modified: branches/camel-db-summary/addressbook/backends/ldap/e-book-backend-ldap-factory.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/ldap/e-book-backend-ldap-factory.c (original)
+++ branches/camel-db-summary/addressbook/backends/ldap/e-book-backend-ldap-factory.c Wed Apr 30 09:39:08 2008
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "libedata-book/e-book-backend-factory.h"
#include "e-book-backend-ldap.h"
Modified: branches/camel-db-summary/addressbook/backends/vcf/Makefile.am
==============================================================================
--- branches/camel-db-summary/addressbook/backends/vcf/Makefile.am (original)
+++ branches/camel-db-summary/addressbook/backends/vcf/Makefile.am Wed Apr 30 09:39:08 2008
@@ -17,6 +17,7 @@
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
$(top_builddir)/libedataserver/libedataserver-1.2.la \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(EVOLUTION_ADDRESSBOOK_LIBS)
libebookbackendvcf_la_LDFLAGS = \
Modified: branches/camel-db-summary/addressbook/backends/vcf/e-book-backend-vcf-factory.c
==============================================================================
--- branches/camel-db-summary/addressbook/backends/vcf/e-book-backend-vcf-factory.c (original)
+++ branches/camel-db-summary/addressbook/backends/vcf/e-book-backend-vcf-factory.c Wed Apr 30 09:39:08 2008
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "libedata-book/e-book-backend-factory.h"
#include "e-book-backend-vcf.h"
Modified: branches/camel-db-summary/addressbook/libedata-book/Makefile.am
==============================================================================
--- branches/camel-db-summary/addressbook/libedata-book/Makefile.am (original)
+++ branches/camel-db-summary/addressbook/libedata-book/Makefile.am Wed Apr 30 09:39:08 2008
@@ -47,6 +47,7 @@
$(EVOLUTION_ADDRESSBOOK_LIBS) \
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(top_builddir)/libedataserver/libedataserver-1.2.la \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(DB_LIBS)
libedata_book_1_2_la_LDFLAGS = \
Modified: branches/camel-db-summary/addressbook/libedata-book/e-book-backend-cache.h
==============================================================================
--- branches/camel-db-summary/addressbook/libedata-book/e-book-backend-cache.h (original)
+++ branches/camel-db-summary/addressbook/libedata-book/e-book-backend-cache.h Wed Apr 30 09:39:08 2008
@@ -23,7 +23,7 @@
#ifndef E_BOOK_BACKEND_CACHE_H
#define E_BOOK_BACKEND_CACHE_H
-#include "libedataserver/e-file-cache.h"
+#include "libebackend/e-file-cache.h"
#include <libebook/e-contact.h>
G_BEGIN_DECLS
Modified: branches/camel-db-summary/addressbook/libedata-book/e-book-backend-db-cache.c
==============================================================================
--- branches/camel-db-summary/addressbook/libedata-book/e-book-backend-db-cache.c (original)
+++ branches/camel-db-summary/addressbook/libedata-book/e-book-backend-db-cache.c Wed Apr 30 09:39:08 2008
@@ -287,6 +287,8 @@
db_error = db->cursor (db, NULL, &dbc, 0);
if (db_error != 0) {
g_warning ("db->cursor failed with %d", db_error);
+ if (sexp)
+ g_object_unref (sexp);
return NULL;
}
Modified: branches/camel-db-summary/addressbook/libedata-book/e-book-backend-summary.c
==============================================================================
--- branches/camel-db-summary/addressbook/libedata-book/e-book-backend-summary.c (original)
+++ branches/camel-db-summary/addressbook/libedata-book/e-book-backend-summary.c Wed Apr 30 09:39:08 2008
@@ -771,6 +771,10 @@
return;
}
+ /* Ensure the duplicate contacts are not added */
+ if (e_book_backend_summary_check_contact (summary, id))
+ e_book_backend_summary_remove_contact (summary, id);
+
new_item = g_new0 (EBookBackendSummaryItem, 1);
new_item->id = id;
Modified: branches/camel-db-summary/addressbook/libedata-book/e-data-book-factory.c
==============================================================================
--- branches/camel-db-summary/addressbook/libedata-book/e-data-book-factory.c (original)
+++ branches/camel-db-summary/addressbook/libedata-book/e-data-book-factory.c Wed Apr 30 09:39:08 2008
@@ -16,7 +16,7 @@
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-arg.h>
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "e-data-book-factory.h"
#include <backends/groupwise/e-book-backend-groupwise.h>
Modified: branches/camel-db-summary/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- branches/camel-db-summary/calendar/backends/caldav/e-cal-backend-caldav.c (original)
+++ branches/camel-db-summary/calendar/backends/caldav/e-cal-backend-caldav.c Wed Apr 30 09:39:08 2008
@@ -1834,11 +1834,22 @@
}
cache_comp = e_cal_backend_cache_get_component (priv->cache, uid, rid);
+
+ if (cache_comp == NULL && rid && *rid) {
+ /* we do not have this instance in cache directly, thus try to get master object */
+ cache_comp = e_cal_backend_cache_get_component (priv->cache, uid, "");
+ }
+
if (cache_comp == NULL) {
g_mutex_unlock (priv->lock);
return GNOME_Evolution_Calendar_ObjectNotFound;
}
+ *old_object = e_cal_component_get_as_string (cache_comp);
+
+ if (mod == CALOBJ_MOD_THIS)
+ e_cal_util_remove_instances (e_cal_component_get_icalcomponent (cache_comp), icaltime_from_string (rid), mod);
+
if (online) {
CalDAVObject caldav_object;
@@ -1846,14 +1857,20 @@
caldav_object.etag = e_cal_component_get_etag (cache_comp);
caldav_object.cdata = NULL;
- status = caldav_server_delete_object (cbdav, &caldav_object);
+ if (mod == CALOBJ_MOD_THIS) {
+ caldav_object.cdata = pack_cobj (cbdav, cache_comp);
- caldav_object_free (&caldav_object, FALSE);
+ status = caldav_server_put_object (cbdav, &caldav_object);
+ } else
+ status = caldav_server_delete_object (cbdav, &caldav_object);
+ caldav_object_free (&caldav_object, FALSE);
} else {
/* mark component as out of synch */
- e_cal_component_set_synch_state (cache_comp,
- E_CAL_COMPONENT_LOCALLY_DELETED);
+ if (mod == CALOBJ_MOD_THIS)
+ e_cal_component_set_synch_state (cache_comp, E_CAL_COMPONENT_LOCALLY_MODIFIED);
+ else
+ e_cal_component_set_synch_state (cache_comp, E_CAL_COMPONENT_LOCALLY_DELETED);
}
if (status != GNOME_Evolution_Calendar_Success) {
@@ -1861,13 +1878,13 @@
return status;
}
- *old_object = e_cal_component_get_as_string (cache_comp);
-
/* We should prolly check for cache errors
* but when that happens we are kinda hosed anyway */
- e_cal_backend_cache_remove_component (priv->cache, uid, rid);
-
- /* FIXME: set new_object when removing instances of a recurring appointment */
+ if (mod == CALOBJ_MOD_THIS) {
+ e_cal_backend_cache_put_component (priv->cache, cache_comp);
+ *object = e_cal_component_get_as_string (cache_comp);
+ } else
+ e_cal_backend_cache_remove_component (priv->cache, uid, rid);
g_mutex_unlock (priv->lock);
Modified: branches/camel-db-summary/calendar/backends/contacts/e-cal-backend-contacts.c
==============================================================================
--- branches/camel-db-summary/calendar/backends/contacts/e-cal-backend-contacts.c (original)
+++ branches/camel-db-summary/calendar/backends/contacts/e-cal-backend-contacts.c Wed Apr 30 09:39:08 2008
@@ -102,7 +102,6 @@
query = e_book_query_any_field_contains ("");
if (!e_book_get_book_view (book, query, fields, -1, &book_view, NULL)) {
- g_list_free (fields);
e_book_query_unref (query);
g_object_unref (book);
g_list_free (fields);
Modified: branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
==============================================================================
--- branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (original)
+++ branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c Wed Apr 30 09:39:08 2008
@@ -1099,7 +1099,6 @@
e_cal_component_set_dtstamp (comp, &itt_utc);
}
}
- g_free (t);
/* categories */
category_ids = e_gw_item_get_categories (item);
@@ -1120,7 +1119,6 @@
is_allday = e_gw_item_get_is_allday_event (item);
/* start date */
- /* should i duplicate here ? */
t = e_gw_item_get_start_date (item);
if (t) {
itt_utc = icaltime_from_string (t);
@@ -1173,8 +1171,6 @@
}
}
- g_free (t);
-
/* classification */
description = e_gw_item_get_classification (item);
if (description) {
@@ -1310,6 +1306,7 @@
trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration);
e_cal_component_alarm_set_trigger (alarm, trigger);
e_cal_component_add_alarm (comp, alarm);
+ e_cal_component_alarm_free (alarm);
} else
set_default_alarms (comp);
@@ -1706,7 +1703,7 @@
SoupSoapResponse *response;
EGwConnectionStatus status;
SoupSoapParameter *param, *subparam, *param_outstanding;
- const char *session;
+ char *session;
char *outstanding = NULL;
gboolean resend_request = TRUE;
int request_iteration = 0;
@@ -1734,6 +1731,7 @@
response = e_gw_connection_send_message (cnc, msg);
if (!response) {
g_object_unref (msg);
+ g_free (session);
return E_GW_CONNECTION_STATUS_NO_RESPONSE;
}
@@ -1741,6 +1739,7 @@
if (status != E_GW_CONNECTION_STATUS_OK) {
g_object_unref (msg);
g_object_unref (response);
+ g_free (session);
return status;
}
@@ -1748,6 +1747,7 @@
if (!param) {
g_object_unref (response);
g_object_unref (msg);
+ g_free (session);
return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
}
@@ -1888,7 +1888,10 @@
} /* end of while loop */
/* closeFreeBusySession*/
- return close_freebusy_session (cnc, session);
+ status = close_freebusy_session (cnc, session);
+ g_free (session);
+
+ return status;
}
#define SET_DELTA(fieldname) G_STMT_START{ \
Modified: branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise.c
==============================================================================
--- branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise.c (original)
+++ branches/camel-db-summary/calendar/backends/groupwise/e-cal-backend-groupwise.c Wed Apr 30 09:39:08 2008
@@ -112,7 +112,7 @@
#define CURSOR_ITEM_LIMIT 100
#define CURSOR_ICALID_LIMIT 500
-static guint get_cache_refresh_interval (void);
+static guint get_cache_refresh_interval (ECalBackendGroupwise *cbgw);
EGwConnection *
e_cal_backend_groupwise_get_connection (ECalBackendGroupwise *cbgw) {
@@ -297,7 +297,7 @@
e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor);
g_object_unref (filter[i]);
}
- e_cal_backend_notify_view_done (E_CAL_BACKEND (cbgw), GNOME_Evolution_Calendar_Success);
+ e_cal_backend_notify_view_progress (E_CAL_BACKEND (cbgw), "", 100);
g_mutex_unlock (mutex);
return E_GW_CONNECTION_STATUS_OK;
@@ -454,7 +454,7 @@
current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ());
gmtime_r (¤t_time, &tm);
- time_interval = get_cache_refresh_interval () / 60000;
+ time_interval = get_cache_refresh_interval (cbgw) / 60000;
if (attempts) {
tm.tm_min += (time_interval * g_ascii_strtod (attempts, NULL));
@@ -650,17 +650,28 @@
}
static guint
-get_cache_refresh_interval (void)
+get_cache_refresh_interval (ECalBackendGroupwise *cbgw)
{
guint time_interval;
const char *time_interval_string = NULL;
+ char *temp = NULL;
+ ECalBackend *backend = E_CAL_BACKEND (cbgw);
+ ESource *source;
time_interval = CACHE_REFRESH_INTERVAL;
+ source = e_cal_backend_get_source (backend);
+
time_interval_string = g_getenv ("GETQM_TIME_INTERVAL");
+
+ if (!time_interval_string)
+ time_interval_string = temp = e_source_get_duped_property (source, "refresh");
+
if (time_interval_string) {
time_interval = g_ascii_strtod (time_interval_string, NULL);
time_interval *= (60*1000);
}
+
+ g_free (temp);
return time_interval;
}
@@ -684,7 +695,7 @@
break;
g_get_current_time (&timeout);
- g_time_val_add (&timeout, get_cache_refresh_interval () * 1000);
+ g_time_val_add (&timeout, get_cache_refresh_interval (cbgw) * 1000);
g_cond_timed_wait (priv->dlock->cond, priv->dlock->mutex, &timeout);
if (priv->dlock->exit)
@@ -836,7 +847,7 @@
int time_interval;
char *utc_str;
- time_interval = get_cache_refresh_interval ();
+ time_interval = get_cache_refresh_interval (cbgw);
utc_str = (char *) e_gw_connection_get_server_time (priv->cnc);
e_cal_backend_cache_set_marker (priv->cache);
e_cal_backend_cache_put_server_utc_time (priv->cache, utc_str);
@@ -1365,6 +1376,9 @@
mangled_uri,
NULL);
g_free (mangled_uri);
+ if (priv->local_attachments_store)
+ g_free (priv->local_attachments_store);
+
priv->local_attachments_store =
g_filename_to_uri (filename, NULL, NULL);
g_free (filename);
Modified: branches/camel-db-summary/calendar/backends/http/e-cal-backend-http.c
==============================================================================
--- branches/camel-db-summary/calendar/backends/http/e-cal-backend-http.c (original)
+++ branches/camel-db-summary/calendar/backends/http/e-cal-backend-http.c Wed Apr 30 09:39:08 2008
@@ -323,9 +323,9 @@
subcomp_kind = icalcomponent_isa (subcomp);
prop = icalcomponent_get_first_property (subcomp, ICAL_UID_PROPERTY);
- if (!prop) {
+ if (!prop && subcomp_kind == kind) {
g_warning (" The component does not have the mandatory property UID \n");
- subcomp = icalcomponent_get_next_component (icalcomp, kind);
+ subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
continue;
}
@@ -365,7 +365,7 @@
icaltimezone_free (zone, 1);
}
- subcomp = icalcomponent_get_next_component (icalcomp, kind);
+ subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
}
e_file_cache_thaw_changes (E_FILE_CACHE (priv->cache));
Modified: branches/camel-db-summary/calendar/libecal/e-cal-component.c
==============================================================================
--- branches/camel-db-summary/calendar/libecal/e-cal-component.c (original)
+++ branches/camel-db-summary/calendar/libecal/e-cal-component.c Wed Apr 30 09:39:08 2008
@@ -1546,6 +1546,7 @@
icalcomponent_remove_property (icalcomp, attachment->prop);
icalproperty_free (attachment->prop);
+ icalattach_unref (attachment->attach);
g_free (attachment);
}
Modified: branches/camel-db-summary/calendar/libedata-cal/e-cal-backend-cache.h
==============================================================================
--- branches/camel-db-summary/calendar/libedata-cal/e-cal-backend-cache.h (original)
+++ branches/camel-db-summary/calendar/libedata-cal/e-cal-backend-cache.h Wed Apr 30 09:39:08 2008
@@ -22,7 +22,7 @@
#ifndef E_CAL_BACKEND_CACHE_H
#define E_CAL_BACKEND_CACHE_H
-#include "libedataserver/e-file-cache.h"
+#include "libebackend/e-file-cache.h"
#include <libecal/e-cal-component.h>
#include <libecal/e-cal.h>
Modified: branches/camel-db-summary/calendar/libedata-cal/e-data-cal-factory.c
==============================================================================
--- branches/camel-db-summary/calendar/libedata-cal/e-data-cal-factory.c (original)
+++ branches/camel-db-summary/calendar/libedata-cal/e-data-cal-factory.c Wed Apr 30 09:39:08 2008
@@ -25,7 +25,7 @@
#include <bonobo/bonobo-main.h>
#include "libedataserver/e-url.h"
#include "libedataserver/e-source.h"
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
#include "e-cal-backend.h"
#include "e-data-cal.h"
#include "e-data-cal-factory.h"
Modified: branches/camel-db-summary/calendar/tests/ecal/test-ecal.c
==============================================================================
--- branches/camel-db-summary/calendar/tests/ecal/test-ecal.c (original)
+++ branches/camel-db-summary/calendar/tests/ecal/test-ecal.c Wed Apr 30 09:39:08 2008
@@ -137,8 +137,6 @@
client1 = NULL;
else if (E_CAL (object) == client2)
client2 = NULL;
- else
- g_assert_not_reached ();
if (!client1 && !client2)
g_main_loop_quit (loop);
Modified: branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-folder.c
==============================================================================
--- branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-folder.c (original)
+++ branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-folder.c Wed Apr 30 09:39:08 2008
@@ -1667,7 +1667,7 @@
int body_len = 0;
const char *uid = NULL;
gboolean is_text_html = FALSE;
- gboolean has_mime_822 = FALSE;
+ gboolean has_mime_822 = FALSE, ignore_mime_822 = FALSE;
gboolean is_text_html_embed = FALSE;
gboolean is_base64_encoded = FALSE;
CamelStream *temp_stream;
@@ -1676,6 +1676,11 @@
cnc = cnc_lookup (priv);
container_id = camel_groupwise_store_container_id_lookup (gw_store, folder->full_name);
+ /* The item is already in calendar. We need to ignore the mime 822 since it would not have the item id of the appointmnet
+ in calendar */
+ if (e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_APPOINTMENT && e_gw_item_is_from_internet (item))
+ ignore_mime_822 = TRUE;
+
attach_list = e_gw_item_get_attach_id_list (item);
if (attach_list) {
//int attach_count = g_slist_length (attach_list);
@@ -1704,52 +1709,54 @@
}//if attachment and len
} // if Mime.822 or TEXT.htm
- for (al = attach_list ; al != NULL ; al = al->next) {
- EGwItemAttachment *attach = (EGwItemAttachment *)al->data;
- if (!g_ascii_strcasecmp (attach->name, "Mime.822")) {
- if (attach->size > MAX_ATTACHMENT_SIZE) {
- int t_len , offset = 0, t_offset = 0;
- char *t_attach = NULL;
- GString *gstr = g_string_new (NULL);
-
- len = 0;
- do {
- status = e_gw_connection_get_attachment_base64 (cnc,
- attach->id, t_offset, MAX_ATTACHMENT_SIZE,
- (const char **)&t_attach, &t_len, &offset);
- if (status == E_GW_CONNECTION_STATUS_OK) {
-
- if (t_len) {
- gsize len_iter = 0;
- char *temp = NULL;
-
- temp = g_base64_decode(t_attach, &len_iter);
- gstr = g_string_append_len (gstr, temp, len_iter);
- g_free (temp);
- len += len_iter;
- g_free (t_attach);
- t_attach = NULL;
+ if (!ignore_mime_822) {
+ for (al = attach_list ; al != NULL ; al = al->next) {
+ EGwItemAttachment *attach = (EGwItemAttachment *)al->data;
+ if (!g_ascii_strcasecmp (attach->name, "Mime.822")) {
+ if (attach->size > MAX_ATTACHMENT_SIZE) {
+ int t_len , offset = 0, t_offset = 0;
+ char *t_attach = NULL;
+ GString *gstr = g_string_new (NULL);
+
+ len = 0;
+ do {
+ status = e_gw_connection_get_attachment_base64 (cnc,
+ attach->id, t_offset, MAX_ATTACHMENT_SIZE,
+ (const char **)&t_attach, &t_len, &offset);
+ if (status == E_GW_CONNECTION_STATUS_OK) {
+
+ if (t_len) {
+ gsize len_iter = 0;
+ char *temp = NULL;
+
+ temp = g_base64_decode(t_attach, &len_iter);
+ gstr = g_string_append_len (gstr, temp, len_iter);
+ g_free (temp);
+ len += len_iter;
+ g_free (t_attach);
+ t_attach = NULL;
+ }
+ t_offset = offset;
}
- t_offset = offset;
+ } while (t_offset);
+ body = gstr->str;
+ body_len = len;
+ g_string_free (gstr, FALSE);
+ } else {
+ status = e_gw_connection_get_attachment (cnc,
+ attach->id, 0, -1,
+ (const char **)&attachment, &len);
+ if (status != E_GW_CONNECTION_STATUS_OK) {
+ g_warning ("Could not get attachment\n");
+ camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get message"));
+ return NULL;
}
- } while (t_offset);
- body = gstr->str;
- body_len = len;
- g_string_free (gstr, FALSE);
- } else {
- status = e_gw_connection_get_attachment (cnc,
- attach->id, 0, -1,
- (const char **)&attachment, &len);
- if (status != E_GW_CONNECTION_STATUS_OK) {
- g_warning ("Could not get attachment\n");
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get message"));
- return NULL;
+ body = g_strdup (attachment);
+ body_len = len;
+ g_free (attachment);
}
- body = g_strdup (attachment);
- body_len = len;
- g_free (attachment);
+ has_mime_822 = TRUE;
}
- has_mime_822 = TRUE;
}
}
@@ -1822,9 +1829,11 @@
if (attach->contentid && (is_text_html_embed != TRUE))
is_text_html_embed = TRUE;
- if ( !g_ascii_strcasecmp (attach->name, "TEXT.htm") ||
+
+ if ( (!g_ascii_strcasecmp (attach->name, "TEXT.htm") ||
!g_ascii_strcasecmp (attach->name, "Mime.822") ||
- !g_ascii_strcasecmp (attach->name, "Header"))
+ !g_ascii_strcasecmp (attach->name, "Header") ||
+ !g_ascii_strcasecmp (attach->name, "meeting.ics")) && (attach->hidden == TRUE))
continue;
if ( (attach->item_reference) && (!g_ascii_strcasecmp (attach->item_reference, "1")) ) {
@@ -1934,6 +1943,12 @@
}/* if attach_list */
/********************/
+ if (e_gw_item_get_priority (item))
+ camel_medium_add_header ( CAMEL_MEDIUM (msg), "Priority", e_gw_item_get_priority(item));
+
+ if (e_gw_item_get_security (item))
+ camel_medium_add_header ( CAMEL_MEDIUM (msg), "Security", e_gw_item_get_security(item));
+
camel_medium_set_content_object(CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER(multipart));
camel_object_unref (multipart);
Modified: branches/camel-db-summary/configure.in
==============================================================================
--- branches/camel-db-summary/configure.in (original)
+++ branches/camel-db-summary/configure.in Wed Apr 30 09:39:08 2008
@@ -38,9 +38,9 @@
AC_DEFINE_UNQUOTED(API_VERSION, "$API_VERSION", [Api version (Major.Minor)])
# Libtool versioning
-LIBEDATASERVER_CURRENT=10
+LIBEDATASERVER_CURRENT=11
LIBEDATASERVER_REVISION=0
-LIBEDATASERVER_AGE=1
+LIBEDATASERVER_AGE=0
LIBEDATASERVERUI_CURRENT=9
LIBEDATASERVERUI_REVISION=0
@@ -82,6 +82,10 @@
LIBGDATA_GOOGLE_REVISION=0
LIBGDATA_GOOGLE_AGE=0
+LIBEBACKEND_CURRENT=0
+LIBEBACKEND_REVISION=0
+LIBEBACKEND_AGE=0
+
AC_SUBST(LIBEDATASERVER_CURRENT)
AC_SUBST(LIBEDATASERVER_REVISION)
AC_SUBST(LIBEDATASERVER_AGE)
@@ -115,6 +119,9 @@
AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
AC_SUBST(LIBGDATA_GOOGLE_REVISION)
AC_SUBST(LIBGDATA_GOOGLE_AGE)
+AC_SUBST(LIBEBACKEND_CURRENT)
+AC_SUBST(LIBEBACKEND_REVISION)
+AC_SUBST(LIBEBACKEND_AGE)
dnl Put the ACLOCAL flags in the Makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -1397,7 +1404,7 @@
dnl Flags for the various libraries we build
dnl ****************************************
-dnl --- libedataserver and libedataserverui flags
+dnl --- libedataserver, libedataserverui, libebackend flags
E_DATA_SERVER_DEPS="libxml-2.0 libbonobo-2.0 gconf-2.0 $mozilla_nspr"
@@ -1411,6 +1418,12 @@
AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
AC_SUBST(E_DATA_SERVER_UI_LIBS)
+E_BACKEND_DEPS="gobject-2.0 libxml-2.0"
+
+EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
+AC_SUBST(E_BACKEND_CFLAGS)
+AC_SUBST(E_BACKEND_LIBS)
+
dnl --- evolution-addressbook flags
EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 libgnome-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
@@ -1657,6 +1670,8 @@
camel/camel.pc
camel/camel-provider.pc
libdb/Makefile
+libebackend/Makefile
+libebackend/libebackend.pc
libedataserver/Makefile
libedataserver/libedataserver.pc
libedataserverui/Makefile
@@ -1687,6 +1702,7 @@
docs/reference/camel/Makefile
docs/reference/libedataserver/Makefile
docs/reference/libedataserverui/Makefile
+docs/reference/libebackend/Makefile
po/Makefile.in
])
Modified: branches/camel-db-summary/docs/reference/Makefile.am
==============================================================================
--- branches/camel-db-summary/docs/reference/Makefile.am (original)
+++ branches/camel-db-summary/docs/reference/Makefile.am Wed Apr 30 09:39:08 2008
@@ -1,3 +1,3 @@
-SUBDIRS = addressbook calendar camel libedataserver libedataserverui
+SUBDIRS = addressbook calendar camel libedataserver libedataserverui libebackend
MKDB_OPTIONS=--output-format=xml
Modified: branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am
==============================================================================
--- branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am (original)
+++ branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am Wed Apr 30 09:39:08 2008
@@ -31,6 +31,7 @@
GTKDOC_LIBS = \
$(top_builddir)/calendar/libedata-cal/libedata-cal-1.2.la \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(EVOLUTION_CALENDAR_LIBS)
####################################
Copied: branches/camel-db-summary/docs/reference/libebackend/Makefile.am (from r8712, /branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am)
==============================================================================
--- /branches/camel-db-summary/docs/reference/calendar/libedata-cal/Makefile.am (original)
+++ branches/camel-db-summary/docs/reference/libebackend/Makefile.am Wed Apr 30 09:39:08 2008
@@ -1,37 +1,29 @@
## Process this file with automake to produce Makefile.in
# The name of the module.
-DOC_MODULE = libedata-cal
+DOC_MODULE = libebackend
content_files=
HTML_IMAGES=
# The top-level SGML file.
-DOC_MAIN_SGML_FILE = libedata-cal-docs.sgml
+DOC_MAIN_SGML_FILE = libebackend-docs.xml
#SCANGOBJ_OPTIONS =
SCAN_OPTIONS = --deprecated-guards="EDS_DISABLE_DEPRECATED"
-DOC_SOURCE_DIR = $(top_srcdir)/calendar/libedata-cal
-HFILE_GLOB = $(top_srcdir)/calendar/libedata-cal/*.h
-CFILE_GLOB = $(top_srcdir)/calendar/libedata-cal/*.c
+DOC_SOURCE_DIR = $(top_srcdir)/libebackend
+HFILE_GLOB = $(top_srcdir)/libebackend/*.h
+CFILE_GLOB = $(top_srcdir)/libebackend/*.c
+IGNORE_HFILES =
-IGNORE_HFILES = \
- Evolution-DataServer-Calendar.h
-
-GTKDOC_CFLAGS = \
+GTKDOC_CFLAGS = \
+ -I$(top_srcdir)/libebackend \
-I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/libical/src \
- -I$(top_srcdir)/calendar/libical/src/libical \
-I$(top_builddir) \
- -I$(top_builddir)/calendar \
- -I$(top_builddir)/calendar/libical/src \
- -I$(top_builddir)/calendar/libical/src/libical \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-GTKDOC_LIBS = \
- $(top_builddir)/calendar/libedata-cal/libedata-cal-1.2.la \
- $(EVOLUTION_CALENDAR_LIBS)
+ $(E_BACKEND_CFLAGS)
+GTKDOC_LIBS = $(top_builddir)/libebackend/libebackend-1.2.la \
+ $(top_builddir)/libedataserver/libedataserver-1.2.la \
+ $(E_BACKEND_LIBS)
####################################
# Everything below here is generic #
Added: branches/camel-db-summary/docs/reference/libebackend/libebackend-docs.xml
==============================================================================
--- (empty file)
+++ branches/camel-db-summary/docs/reference/libebackend/libebackend-docs.xml Wed Apr 30 09:39:08 2008
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>Evolution API Reference: libebackend, backend utility library</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Evolution API Reference: libebackend, backend utility library</title>
+ <xi:include href="xml/e-file-cache.xml"/>
+ <xi:include href="xml/e-dbhash.xml"/>
+ <xi:include href="xml/e-data-server-module.xml"/>
+ <xi:include href="xml/e-db3-utils.xml"/>
+ </chapter>
+</book>
Added: branches/camel-db-summary/docs/reference/libebackend/libebackend-sections.txt
==============================================================================
--- (empty file)
+++ branches/camel-db-summary/docs/reference/libebackend/libebackend-sections.txt Wed Apr 30 09:39:08 2008
@@ -0,0 +1,59 @@
+<SECTION>
+<FILE>e-file-cache</FILE>
+EFileCachePrivate
+<TITLE>EFileCache</TITLE>
+EFileCache
+e_file_cache_new
+e_file_cache_remove
+e_file_cache_clean
+e_file_cache_get_object
+e_file_cache_get_objects
+e_file_cache_get_keys
+e_file_cache_add_object
+e_file_cache_replace_object
+e_file_cache_remove_object
+e_file_cache_freeze_changes
+e_file_cache_thaw_changes
+e_file_cache_get_filename
+<SUBSECTION Standard>
+E_FILE_CACHE
+E_IS_FILE_CACHE
+E_TYPE_FILE_CACHE
+e_file_cache_get_type
+E_FILE_CACHE_CLASS
+E_IS_FILE_CACHE_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>e-dbhash</FILE>
+EDbHashStatus
+EDbHash
+EDbHashPrivate
+EDbHashFunc
+e_dbhash_new
+e_dbhash_add
+e_dbhash_remove
+e_dbhash_compare
+e_dbhash_foreach_key
+e_dbhash_write
+e_dbhash_destroy
+</SECTION>
+
+<SECTION>
+<FILE>e-data-server-module</FILE>
+e_data_server_module_init
+e_data_server_get_extensions_for_type
+e_data_server_extension_list_free
+e_data_server_module_remove_unused
+e_data_server_module_add_type
+eds_module_initialize
+eds_module_shutdown
+eds_module_list_types
+</SECTION>
+
+<SECTION>
+<FILE>e-db3-utils</FILE>
+e_db3_utils_maybe_recover
+e_db3_utils_upgrade_format
+</SECTION>
+
Added: branches/camel-db-summary/docs/reference/libebackend/libebackend.types
==============================================================================
--- (empty file)
+++ branches/camel-db-summary/docs/reference/libebackend/libebackend.types Wed Apr 30 09:39:08 2008
@@ -0,0 +1,3 @@
+#include <libebackend/e-file-cache.h>
+
+e_file_cache_get_type
Modified: branches/camel-db-summary/docs/reference/libedataserver/libedataserver.types
==============================================================================
--- branches/camel-db-summary/docs/reference/libedataserver/libedataserver.types (original)
+++ branches/camel-db-summary/docs/reference/libedataserver/libedataserver.types Wed Apr 30 09:39:08 2008
@@ -1,7 +1,6 @@
#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
#include <libedataserver/e-component-listener.h>
-#include <libedataserver/e-file-cache.h>
#include <libedataserver/e-iterator.h>
#include <libedataserver/e-list.h>
#include <libedataserver/e-list-iterator.h>
@@ -12,7 +11,6 @@
e_account_get_type
e_account_list_get_type
e_component_listener_get_type
-e_file_cache_get_type
e_iterator_get_type
e_list_get_type
e_list_iterator_get_type
Added: branches/camel-db-summary/libebackend/Makefile.am
==============================================================================
--- (empty file)
+++ branches/camel-db-summary/libebackend/Makefile.am Wed Apr 30 09:39:08 2008
@@ -0,0 +1,40 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"e-data-server\" \
+ -DE_DATA_SERVER_EXTENSIONDIR=\"$(extensiondir)\" \
+ $(DB_CFLAGS) \
+ $(E_BACKEND_CFLAGS)
+
+lib_LTLIBRARIES = libebackend-1.2.la
+
+libebackend_1_2_la_SOURCES = \
+ e-data-server-module.c \
+ e-dbhash.c \
+ e-db3-utils.c \
+ e-file-cache.c
+
+libebackend_1_2_la_LIBADD = \
+ $(E_BACKEND_LIBS) \
+ $(DB_LIBS)
+
+libebackend_1_2_la_LDFLAGS = \
+ -version-info $(LIBEBACKEND_CURRENT):$(LIBEBACKEND_REVISION):$(LIBEBACKEND_AGE) $(NO_UNDEFINED)
+
+libebackendincludedir = $(privincludedir)/libebackend
+
+libebackendinclude_HEADERS = \
+ e-data-server-module.h \
+ e-db3-utils.h \
+ e-dbhash.h \
+ e-file-cache.h
+
+%-$(API_VERSION).pc: %.pc
+ cp $< $@
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libebackend-$(API_VERSION).pc
+
+EXTRA_DIST = \
+ $(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in)
+
+DISTCLEANFILES = $(pkgconfig_DATA)
Copied: branches/camel-db-summary/libebackend/e-data-server-module.c (from r8712, /branches/camel-db-summary/libedataserver/e-data-server-module.c)
==============================================================================
--- /branches/camel-db-summary/libedataserver/e-data-server-module.c (original)
+++ branches/camel-db-summary/libebackend/e-data-server-module.c Wed Apr 30 09:39:08 2008
@@ -28,7 +28,7 @@
#include <gmodule.h>
-#include "libedataserver-private.h"
+#include "libedataserver/libedataserver-private.h"
#define E_DATA_SERVER_TYPE_MODULE (e_data_server_module_get_type ())
#define E_DATA_SERVER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
@@ -263,7 +263,7 @@
module_objects = g_list_prepend (module_objects, object);
}
-/**
+/*
* Unref all loaded modules, so that unused modules are unloaded from the
* system.
*/
Copied: branches/camel-db-summary/libebackend/e-data-server-module.h (from r8712, /branches/camel-db-summary/libedataserver/e-data-server-module.h)
==============================================================================
Copied: branches/camel-db-summary/libebackend/e-db3-utils.c (from r8712, /branches/camel-db-summary/libedataserver/e-db3-utils.c)
==============================================================================
Copied: branches/camel-db-summary/libebackend/e-db3-utils.h (from r8712, /branches/camel-db-summary/libedataserver/e-db3-utils.h)
==============================================================================
Copied: branches/camel-db-summary/libebackend/e-dbhash.c (from r8712, /branches/camel-db-summary/libedataserver/e-dbhash.c)
==============================================================================
Copied: branches/camel-db-summary/libebackend/e-dbhash.h (from r8712, /branches/camel-db-summary/libedataserver/e-dbhash.h)
==============================================================================
Copied: branches/camel-db-summary/libebackend/e-file-cache.c (from r8712, /branches/camel-db-summary/libedataserver/e-file-cache.c)
==============================================================================
--- /branches/camel-db-summary/libedataserver/e-file-cache.c (original)
+++ branches/camel-db-summary/libebackend/e-file-cache.c Wed Apr 30 09:39:08 2008
@@ -27,8 +27,8 @@
#include <glib/gstdio.h>
#include "e-file-cache.h"
-#include "e-data-server-util.h"
-#include "e-xml-hash-utils.h"
+#include "libedataserver/e-data-server-util.h"
+#include "libedataserver/e-xml-hash-utils.h"
struct _EFileCachePrivate {
char *filename;
Copied: branches/camel-db-summary/libebackend/e-file-cache.h (from r8712, /branches/camel-db-summary/libedataserver/e-file-cache.h)
==============================================================================
Added: branches/camel-db-summary/libebackend/libebackend.pc.in
==============================================================================
--- (empty file)
+++ branches/camel-db-summary/libebackend/libebackend.pc.in Wed Apr 30 09:39:08 2008
@@ -0,0 +1,15 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+datarootdir= datarootdir@
+datadir= datadir@
+
+privincludedir= privincludedir@
+
+Name: libebackend
+Description: Utility library for Evolution Data Server Backends
+Version: @VERSION@
+Requires: glib-2.0
+Libs: -L${libdir} -lbackend- API_VERSION@
+Cflags: -I${privincludedir}
Modified: branches/camel-db-summary/libedataserver/Makefile.am
==============================================================================
--- branches/camel-db-summary/libedataserver/Makefile.am (original)
+++ branches/camel-db-summary/libedataserver/Makefile.am Wed Apr 30 09:39:08 2008
@@ -1,7 +1,6 @@
INCLUDES = \
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"e-data-server\" \
- $(DB_CFLAGS) \
-DE_DATA_SERVER_PREFIX=\"$(prefix)\" \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
-DE_DATA_SERVER_EXTENSIONDIR=\"$(extensiondir)\" \
@@ -18,10 +17,6 @@
e-account.c \
e-categories.c \
e-component-listener.c \
- e-data-server-module.c \
- e-dbhash.c \
- e-db3-utils.c \
- e-file-cache.c \
e-flag.c \
e-iconv.c \
e-iterator.c \
@@ -47,7 +42,6 @@
libedataserver_1_2_la_LIBADD = \
$(E_DATA_SERVER_LIBS) \
$(ICONV_LIBS) \
- $(DB_LIBS) \
$(SOCKET_LIBS) \
$(SOUP_LIBS)
@@ -61,10 +55,6 @@
e-account.h \
e-categories.h \
e-component-listener.h \
- e-data-server-module.h \
- e-db3-utils.h \
- e-dbhash.h \
- e-file-cache.h \
e-flag.h \
e-iconv.h \
e-iterator.h \
Modified: branches/camel-db-summary/servers/exchange/storage/exchange-account.c
==============================================================================
--- branches/camel-db-summary/servers/exchange/storage/exchange-account.c (original)
+++ branches/camel-db-summary/servers/exchange/storage/exchange-account.c Wed Apr 30 09:39:08 2008
@@ -71,6 +71,7 @@
GHashTable *hierarchies_by_folder, *foreign_hierarchies;
ExchangeHierarchy *favorites_hierarchy;
GHashTable *folders, *fresh_folders;
+ GStaticRecMutex folders_lock;
char *uri_authority, *http_uri_schema;
gboolean uris_use_email, offline_sync;
@@ -154,6 +155,7 @@
account->priv->foreign_hierarchies = g_hash_table_new (g_str_hash, g_str_equal);
account->priv->folders = g_hash_table_new (g_str_hash, g_str_equal);
account->priv->fresh_folders = NULL;
+ g_static_rec_mutex_init (&account->priv->folders_lock);
account->priv->discover_data_lock = g_mutex_new ();
account->priv->account_online = UNSUPPORTED_MODE;
account->priv->nt_domain = NULL;
@@ -205,17 +207,19 @@
account->priv->hierarchies = NULL;
}
- if (account->priv->hierarchies_by_folder) {
- g_hash_table_destroy (account->priv->hierarchies_by_folder);
- account->priv->hierarchies_by_folder = NULL;
- }
-
if (account->priv->foreign_hierarchies) {
g_hash_table_foreach (account->priv->foreign_hierarchies, free_name, NULL);
g_hash_table_destroy (account->priv->foreign_hierarchies);
account->priv->foreign_hierarchies = NULL;
}
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
+
+ if (account->priv->hierarchies_by_folder) {
+ g_hash_table_destroy (account->priv->hierarchies_by_folder);
+ account->priv->hierarchies_by_folder = NULL;
+ }
+
if (account->priv->folders) {
g_hash_table_foreach (account->priv->folders, free_folder, NULL);
g_hash_table_destroy (account->priv->folders);
@@ -228,6 +232,8 @@
account->priv->fresh_folders = NULL;
}
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
+
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -303,6 +309,8 @@
if (account->priv->discover_data_lock)
g_mutex_free (account->priv->discover_data_lock);
+ g_static_rec_mutex_free (&account->priv->folders_lock);
+
g_free (account->priv);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -320,6 +328,7 @@
g_return_if_fail (EXCHANGE_IS_ACCOUNT (account));
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
if (account->priv->fresh_folders) {
g_hash_table_foreach (account->priv->fresh_folders, free_folder, NULL);
g_hash_table_destroy (account->priv->fresh_folders);
@@ -339,6 +348,7 @@
toplevel, account->priv->account_online);
exchange_hierarchy_rescan (account->priv->hierarchies->pdata[i]);
}
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
}
/*
@@ -354,6 +364,8 @@
e_folder_exchange_get_permanent_uri (folder);
char *key;
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
+
/* This makes the cleanup easier. We just unref it each time
* we find it in account->priv->folders.
*/
@@ -411,8 +423,11 @@
{
g_hash_table_insert (account->priv->hierarchies_by_folder,
folder, hier);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
g_signal_emit (account, signals[NEW_FOLDER], 0, folder);
+ } else {
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
}
}
@@ -420,9 +435,12 @@
hierarchy_removed_folder (ExchangeHierarchy *hier, EFolder *folder,
ExchangeAccount *account)
{
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
if (!g_hash_table_lookup (account->priv->folders,
- e_folder_exchange_get_path (folder)))
+ e_folder_exchange_get_path (folder))) {
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
return;
+ }
g_hash_table_remove (account->priv->folders,
e_folder_exchange_get_path (folder));
@@ -435,6 +453,7 @@
e_folder_exchange_get_internal_uri (folder));
}
g_hash_table_remove (account->priv->hierarchies_by_folder, folder);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
g_signal_emit (account, signals[REMOVED_FOLDER], 0, folder);
if (folder == hier->toplevel)
@@ -451,11 +470,15 @@
get_folder (ExchangeAccount *account, const char *path,
EFolder **folder, ExchangeHierarchy **hier)
{
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
*folder = g_hash_table_lookup (account->priv->folders, path);
- if (!*folder)
+ if (!*folder) {
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
return FALSE;
+ }
*hier = g_hash_table_lookup (account->priv->hierarchies_by_folder,
*folder);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
if (!*hier)
return FALSE;
return TRUE;
@@ -471,15 +494,19 @@
if (!name)
return FALSE;
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
parent_path = g_strndup (*path, name - *path);
*parent = g_hash_table_lookup (account->priv->folders, parent_path);
g_free (parent_path);
- if (!*parent)
+ if (!*parent) {
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
return FALSE;
+ }
*hier = g_hash_table_lookup (account->priv->hierarchies_by_folder,
*parent);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
if (!*hier)
return FALSE;
@@ -845,15 +872,20 @@
{
EFolder *folder;
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
folder = g_hash_table_lookup (account->priv->folders, old_uri);
- if (!folder)
+ if (!folder) {
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
return;
+ }
g_hash_table_remove (account->priv->folders, old_uri);
e_folder_exchange_set_internal_uri (folder, new_uri);
g_hash_table_insert (account->priv->folders,
(char *)e_folder_exchange_get_internal_uri (folder),
folder);
+
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
}
static void
@@ -1858,11 +1890,17 @@
exchange_account_get_folder (ExchangeAccount *account,
const char *path_or_uri)
{
+ EFolder *folder;
+
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL);
if (!path_or_uri)
return NULL;
- return g_hash_table_lookup (account->priv->folders, path_or_uri);
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
+ folder = g_hash_table_lookup (account->priv->folders, path_or_uri);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
+
+ return folder;
}
static int
@@ -1930,11 +1968,13 @@
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL);
folders = g_ptr_array_new ();
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
/* if (account->priv->fresh_folders)
g_hash_table_foreach (account->priv->fresh_folders, add_folder, folders);
else
*/
g_hash_table_foreach (account->priv->folders, add_folder, folders);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
qsort (folders->pdata, folders->len,
sizeof (EFolder *), folder_comparator);
@@ -1975,11 +2015,13 @@
fld_tree->path = path;
fld_tree->folders = folders;
+ g_static_rec_mutex_lock (&account->priv->folders_lock);
/* if (account->priv->fresh_folders)
g_hash_table_foreach (account->priv->fresh_folders, add_folder, folders);
else
*/
g_hash_table_foreach (account->priv->folders, add_folder_tree, fld_tree);
+ g_static_rec_mutex_unlock (&account->priv->folders_lock);
qsort (folders->pdata, folders->len,
sizeof (EFolder *), folder_comparator);
Modified: branches/camel-db-summary/servers/groupwise/e-gw-container.c
==============================================================================
--- branches/camel-db-summary/servers/groupwise/e-gw-container.c (original)
+++ branches/camel-db-summary/servers/groupwise/e-gw-container.c Wed Apr 30 09:39:08 2008
@@ -60,7 +60,7 @@
{
if(user){
g_free(user->email);
- user->email = NULL;
+ g_free (user);
}
g_free (user);
return ;
Modified: branches/camel-db-summary/servers/groupwise/e-gw-item.c
==============================================================================
--- branches/camel-db-summary/servers/groupwise/e-gw-item.c (original)
+++ branches/camel-db-summary/servers/groupwise/e-gw-item.c Wed Apr 30 09:39:08 2008
@@ -124,6 +124,9 @@
GHashTable *additions;
GHashTable *updates;
GHashTable *deletions;
+
+ gboolean internet;
+
/*padding*/
unsigned int padding[10];
};
@@ -453,6 +456,21 @@
priv->end_date = NULL;
}
+ if (priv->delivered_date) {
+ g_free (priv->delivered_date);
+ priv->delivered_date = NULL;
+ }
+
+ if (priv->start_date) {
+ g_free (priv->start_date);
+ priv->start_date = NULL;
+ }
+
+ if (priv->creation_date) {
+ g_free (priv->creation_date);
+ priv->creation_date = NULL;
+ }
+
free_changes (priv->additions);
free_changes (priv->deletions);
free_changes (priv->updates);
@@ -525,7 +543,7 @@
priv->attach_list = NULL ;
priv->simple_fields = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
priv->full_name = g_new0(FullName, 1);
- priv->addresses = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, free_postal_address);
+ priv->addresses = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_postal_address);
priv->additions = g_hash_table_new(g_str_hash, g_str_equal);
priv->updates = g_hash_table_new (g_str_hash, g_str_equal);
priv->deletions = g_hash_table_new (g_str_hash, g_str_equal);
@@ -533,6 +551,7 @@
priv->link_info = NULL;
priv->msg_body_id = NULL;
priv->has_attachment = FALSE;
+ priv->internet = FALSE;
item->priv = priv;
@@ -1392,7 +1411,7 @@
if (subparam) {
address = g_new0 (PostalAddress, 1);
set_postal_address_from_soap_parameter (address, subparam);
- g_hash_table_insert (item->priv->addresses, "Office", address);
+ g_hash_table_insert (item->priv->addresses, g_strdup ("Office"), address);
}
@@ -1657,7 +1676,7 @@
e_gw_item_new_from_soap_parameter (const char *email, const char *container, SoupSoapParameter *param)
{
EGwItem *item;
- char *item_type;
+ char *item_type, *internet_prop;
SoupSoapParameter *subparameter, *child, *category_param, *attachment_param;
gboolean is_group_item = TRUE;
GList *user_email = NULL;
@@ -1671,6 +1690,13 @@
item = g_object_new (E_TYPE_GW_ITEM, NULL);
item_type = soup_soap_parameter_get_property (param, "type");
+
+ internet_prop = soup_soap_parameter_get_property (param, "internet");
+
+ if (internet_prop && !g_ascii_strcasecmp (internet_prop, "1"))
+ item->priv->internet = TRUE;
+ g_free (internet_prop);
+
if (!g_ascii_strcasecmp (item_type, "Mail"))
item->priv->item_type = E_GW_ITEM_TYPE_MAIL ;
else if (!g_ascii_strcasecmp (item_type, "Appointment"))
@@ -1963,13 +1989,20 @@
attach->contentType = soup_soap_parameter_get_string_value (temp) ;
temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "size") ;
- if (temp)
- attach->size = atoi (soup_soap_parameter_get_string_value (temp)) ;
+ if (temp) {
+ value = soup_soap_parameter_get_string_value (temp);
+ attach->size = atoi (value);
+ g_free (value);
+ }
temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "date") ;
if (temp)
attach->date = soup_soap_parameter_get_string_value (temp) ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "hidden") ;
+ if (temp)
+ if (soup_soap_parameter_get_int_value (temp) == 1)
+ attach->hidden = TRUE;
item->priv->attach_list = g_slist_append (item->priv->attach_list, attach) ;
}
@@ -2124,6 +2157,14 @@
return item->priv->has_attachment;
}
+gboolean
+e_gw_item_is_from_internet (EGwItem *item)
+{
+ g_return_val_if_fail (E_IS_GW_ITEM (item), 0);
+
+ return item->priv->internet;
+}
+
char *
e_gw_item_get_creation_date (EGwItem *item)
{
@@ -2304,6 +2345,14 @@
item->priv->classification = g_strdup (new_class);
}
+const char *
+e_gw_item_get_security (EGwItem *item)
+{
+ g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
+
+ return (const char *) item->priv->security;
+}
+
void
e_gw_item_set_security (EGwItem *item, const char *new_class)
{
Modified: branches/camel-db-summary/servers/groupwise/e-gw-item.h
==============================================================================
--- branches/camel-db-summary/servers/groupwise/e-gw-item.h (original)
+++ branches/camel-db-summary/servers/groupwise/e-gw-item.h Wed Apr 30 09:39:08 2008
@@ -130,6 +130,7 @@
int size ;
char *date ;
char *data ;
+ gboolean hidden;
} EGwItemAttachment ;
typedef enum {
@@ -186,6 +187,7 @@
void e_gw_item_set_message (EGwItem *item, const char *new_message);
const char *e_gw_item_get_place (EGwItem *item);
void e_gw_item_set_place (EGwItem *item, const char *new_place);
+const char *e_gw_item_get_security (EGwItem *item);
void e_gw_item_set_security (EGwItem *item, const char *new_class);
gboolean e_gw_item_get_completed (EGwItem *item);
void e_gw_item_set_completed (EGwItem *item, gboolean new_completed);
@@ -301,6 +303,8 @@
gboolean e_gw_item_has_attachment (EGwItem *item);
+gboolean e_gw_item_is_from_internet (EGwItem *item);
+
typedef struct {
char *email;
char *display_name;
Modified: branches/camel-db-summary/src/Makefile.am
==============================================================================
--- branches/camel-db-summary/src/Makefile.am (original)
+++ branches/camel-db-summary/src/Makefile.am Wed Apr 30 09:39:08 2008
@@ -57,6 +57,7 @@
endif
evolution_data_server_LDADD = \
+ $(top_builddir)/libebackend/libebackend-1.2.la \
$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
$(E_DATA_CAL_LIBS) \
$(E_FACTORY_LIBS) \
Modified: branches/camel-db-summary/src/server.c
==============================================================================
--- branches/camel-db-summary/src/server.c (original)
+++ branches/camel-db-summary/src/server.c Wed Apr 30 09:39:08 2008
@@ -42,7 +42,7 @@
#include <bonobo/bonobo-generic-factory.h>
#include <gconf/gconf-client.h>
-#include <libedataserver/e-data-server-module.h>
+#include <libebackend/e-data-server-module.h>
#include <libedata-book/e-data-book-factory.h>
#if ENABLE_CALENDAR
#include <libedata-cal/e-data-cal-factory.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]