[evolution-patches] Patch for getting Modified items [camel/groupwise]
- From: Vivek Jain <jvivek novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] Patch for getting Modified items [camel/groupwise]
- Date: Thu, 10 Feb 2005 13:44:20 +0530
hi,
I am sending a patch. It retrieves modified items, from the server,
while getting folder (camel-groupwise-store.c: groupwise_get_folder)
and while refreshing it.
(camel-groupwise-folder.c : groupwise_refresh_info)
Thanks,
Vivek
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.18
diff -u -p -r1.18 ChangeLog
--- ChangeLog 9 Feb 2005 08:28:26 -0000 1.18
+++ ChangeLog 10 Feb 2005 08:05:15 -0000
@@ -1,3 +1,12 @@
+2005-02-10 Vivek Jain <jvivek novell com>
+
+ * camel-groupwise-store.c:
+ (groupwise_get_folder):
+ * camel-groupwise-folder.c
+ (groupwise_refresh_info):
+ get the "Modified" items in the second_list and
+ append it to the "list"
+
2005-02-09 Vivek Jain <jvivek novell com>
* camel-groupwise-store.c:
Index: camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.28
diff -u -p -r1.28 camel-groupwise-store.c
--- camel-groupwise-store.c 9 Feb 2005 08:24:27 -0000 1.28
+++ camel-groupwise-store.c 10 Feb 2005 08:05:16 -0000
@@ -483,7 +483,7 @@ groupwise_get_folder (CamelStore *store,
const char *temp_name;
EGwConnectionStatus status ;
GList *list = NULL ;
- GSList *slist = NULL, *sl ;
+ GSList *slist = NULL, *sl , *second_list= NULL;
gboolean done = FALSE ;
int count = 0, cursor, summary_count = 0 ;
@@ -553,6 +553,7 @@ groupwise_get_folder (CamelStore *store,
status = e_gw_connection_get_quick_messages (priv->cnc, container_id,
"distribution attachments subject created",
time_string, "New", "Mail", NULL, -1, &slist) ;
+
if (status != E_GW_CONNECTION_STATUS_OK) {
//camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
CAMEL_SERVICE_UNLOCK (gw_store, connect_lock) ;
@@ -565,10 +566,19 @@ groupwise_get_folder (CamelStore *store,
return folder ;
//return NULL ;
}
-
+
for ( sl = slist ; sl != NULL; sl = sl->next) {
list = g_list_append (list, sl->data) ;
}
+
+ if (e_gw_connection_get_quick_messages (priv->cnc, container_id,
+ "distribution attachments subject created",
+ time_string, "Modified", "Mail", NULL, -1, &second_list) == E_GW_CONNECTION_OK)
+
+ for ( sl = second_list ; sl != NULL; sl = sl->next) {
+ list = g_list_append (list, sl->data) ;
+ }
+
gw_update_summary (folder, list, ex) ;
camel_operation_end (NULL);
Index: camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.23
diff -u -p -r1.23 camel-groupwise-folder.c
--- camel-groupwise-folder.c 8 Feb 2005 08:17:26 -0000 1.23
+++ camel-groupwise-folder.c 10 Feb 2005 08:05:16 -0000
@@ -484,7 +484,8 @@ groupwise_sync (CamelFolder *folder, gbo
flags_diff_t diff ;
//EGwConnection *cnc = cnc_lookup (priv) ;
int count, i ;
- g_print ("groupwise sync\n") ;
+ g_print ("groupwise sync\n");
+
if (((CamelOfflineStore *) gw_store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
return ;
@@ -589,7 +590,7 @@ groupwise_refresh_info(CamelFolder *fold
EGwConnection *cnc = cnc_lookup (priv) ;
int status ;
GList *list = NULL;
- GSList *slist = NULL, *sl ;
+ GSList *slist = NULL, *sl, *second_list = NULL ;
char *container_id = NULL ;
char *cache_file_name ;
static time_t mod_time = 0 ;
@@ -638,6 +639,14 @@ groupwise_refresh_info(CamelFolder *fold
list = g_list_append (list, sl->data) ;
}
+ if ( e_gw_connection_get_quick_messages (cnc, container_id,
+ "distribution created attachments subject",
+ time_string, "Modified", "Mail", NULL, -1, &second_list) == E_GW_CONNECTION_OK)
+
+ for ( sl = second_list ; sl != NULL; sl = sl->next) {
+ list = g_list_append (list, sl->data) ;
+ }
+
if (gw_store->current_folder != folder) {
gw_store->current_folder = folder ;
} else if(gw_folder->need_rescan) {
@@ -1136,7 +1145,7 @@ convert_to_calendar (EGwItem *item, char
NULL ) ;
*len = strlen (*str) ;
-
+
if (temp && strlen(temp))
g_free (temp) ;
g_strfreev (tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]