evolution-data-server r8983 - branches/camel-db-summary/camel/providers/groupwise
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8983 - branches/camel-db-summary/camel/providers/groupwise
- Date: Mon, 16 Jun 2008 08:33:42 +0000 (UTC)
Author: psankar
Date: Mon Jun 16 08:33:41 2008
New Revision: 8983
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8983&view=rev
Log:
GroupWise initial support.
Folder changes fail to sync up changes yet.
Modified:
branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-folder.c
branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-store.c
branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-summary.c
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 Mon Jun 16 08:33:41 2008
@@ -590,7 +590,7 @@
static void
groupwise_sync_summary (CamelFolder *folder, CamelException *ex)
{
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
camel_store_summary_touch ((CamelStoreSummary *)((CamelGroupwiseStore *)folder->parent_store)->summary);
camel_store_summary_save ((CamelStoreSummary *)((CamelGroupwiseStore *)folder->parent_store)->summary);
}
@@ -1004,7 +1004,7 @@
}
camel_store_summary_info_free ((CamelStoreSummary *)((CamelGroupwiseStore *)folder->parent_store)->summary, si);
}
- camel_folder_summary_save (folder->summary);
+ //camel_folder_summary_save_to_db (folder->summary, ex);
camel_store_summary_save ((CamelStoreSummary *)((CamelGroupwiseStore *)folder->parent_store)->summary);
} else {
/* We probably could not get the messages the first time. (get_folder) failed???!
@@ -1036,7 +1036,7 @@
/* Sync-up the (un)read changes before getting updates,
so that the getFolderList will reflect the most recent changes too */
- groupwise_sync (folder, FALSE, ex);
+ //groupwise_sync (folder, FALSE, ex);
if (((CamelOfflineStore *) gw_store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
g_warning ("In offline mode. Cannot refresh!!!\n");
Modified: branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-store.c
==============================================================================
--- branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-store.c (original)
+++ branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-store.c Mon Jun 16 08:33:41 2008
@@ -634,7 +634,7 @@
CAMEL_SERVICE_REC_UNLOCK (gw_store, connect_lock);
e_gw_connection_destroy_cursor (priv->cnc, container_id, cursor);
//camel_folder_summary_clear (folder->summary);
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
camel_operation_end (NULL);
camel_object_unref (folder);
@@ -666,7 +666,7 @@
summary->time_string = g_strdup (e_gw_connection_get_server_time (priv->cnc));
}
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
gw_store->current_folder = folder;
camel_object_ref (folder);
@@ -717,7 +717,7 @@
summary = (CamelGroupwiseSummary *) folder->summary;
camel_folder_summary_clear (folder->summary);
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
summary_count = camel_folder_summary_count (folder->summary);
if(!summary_count || !summary->time_string) {
@@ -742,7 +742,7 @@
if (status != E_GW_CONNECTION_STATUS_OK) {
CAMEL_SERVICE_REC_UNLOCK (gw_store, connect_lock);
e_gw_connection_destroy_cursor (priv->cnc, container_id, cursor);
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
camel_operation_end (NULL);
g_free (container_id);
@@ -774,7 +774,7 @@
summary->time_string = g_strdup (e_gw_connection_get_server_time (priv->cnc));
}
- camel_folder_summary_save (folder->summary);
+ camel_folder_summary_save_to_db (folder->summary, ex);
gw_store->current_folder = folder;
Modified: branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-summary.c
==============================================================================
--- branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-summary.c (original)
+++ branches/camel-db-summary/camel/providers/groupwise/camel-groupwise-summary.c Mon Jun 16 08:33:41 2008
@@ -42,8 +42,8 @@
#define CAMEL_GW_SUMMARY_VERSION (1)
-#define EXTRACT_FIRST_DIGIT(val) val=strtoul (part, &part, 10);
-#define EXTRACT_DIGIT(val) part++; val=strtoul (part, &part, 10);
+#define EXTRACT_FIRST_DIGIT(val) part ? val=strtoul (part, &part, 10) : 0;
+#define EXTRACT_DIGIT(val) part++; part ? val=strtoul (part, &part, 10) : 0;
/*Prototypes*/
static int gw_summary_header_load (CamelFolderSummary *, FILE *);
@@ -160,16 +160,16 @@
CamelFolderSummary *
camel_groupwise_summary_new (struct _CamelFolder *folder, const char *filename)
{
+ CamelException ex;
CamelFolderSummary *summary = CAMEL_FOLDER_SUMMARY (
camel_object_new (camel_groupwise_summary_get_type ()));
summary->folder = folder ;
camel_folder_summary_set_build_content (summary, TRUE);
- camel_folder_summary_set_filename (summary, filename);
- if (camel_folder_summary_load (summary) == -1) {
+ camel_exception_init (&ex);
+ if (camel_folder_summary_load_from_db (summary, &ex) == -1) {
camel_folder_summary_clear (summary);
- camel_folder_summary_touch (summary);
}
return summary;
@@ -469,7 +469,7 @@
}
camel_folder_summary_clear (summary);
- camel_folder_summary_save (summary);
+ //camel_folder_summary_save (summary);
if (uncache)
camel_data_cache_clear (((CamelGroupwiseFolder *) summary->folder)->cache, "cache", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]