evolution-data-server r9580 - in trunk/camel: . providers/groupwise providers/imap providers/local



Author: mbarnes
Date: Mon Sep 22 11:20:51 2008
New Revision: 9580
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9580&view=rev

Log:
2008-09-22  Matthew Barnes  <mbarnes redhat com>

	** Convert all #warning messages from the disk-summary effort
	   to comments with a greppable FIXME[disk-summary] prefix.



Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-db.c
   trunk/camel/camel-folder-summary.c
   trunk/camel/camel-folder.c
   trunk/camel/camel-vee-folder.c
   trunk/camel/camel-vee-store.c
   trunk/camel/camel-vee-summary.c
   trunk/camel/camel-vtrash-folder.c
   trunk/camel/providers/groupwise/camel-groupwise-summary.c
   trunk/camel/providers/imap/camel-imap-folder.c
   trunk/camel/providers/imap/camel-imap-wrapper.c
   trunk/camel/providers/local/camel-maildir-summary.c
   trunk/camel/providers/local/camel-mbox-store.c

Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c	(original)
+++ trunk/camel/camel-db.c	Mon Sep 22 11:20:51 2008
@@ -670,8 +670,9 @@
 
 	 if (cond)
 		  sqlite3_free (cond);
-	 #warning "handle return values"
-	 #warning "No The caller should parse the ex in case of NULL returns" 
+	 /* FIXME[disk-summary] handle return values */
+	 /* FIXME[disk-summary] No The caller should parse the ex in case
+	 *                      of NULL returns */
 	 array = g_ptr_array_new ();
 	 camel_db_select (db, sel_query, read_vuids_callback, array, ex);
 	 sqlite3_free (sel_query);

Modified: trunk/camel/camel-folder-summary.c
==============================================================================
--- trunk/camel/camel-folder-summary.c	(original)
+++ trunk/camel/camel-folder-summary.c	Mon Sep 22 11:20:51 2008
@@ -403,7 +403,8 @@
 	return info;
 }
 
-#warning "Implement - camel_folder_summary_uid_exist - directly through db than manual strcmp"
+/* FIXME[disk-summary] Implement - camel_folder_summary_uid_exist -
+ * directly through db than manual strcmp */
 
 /**
  * camel_folder_summary_uid_from_index:
@@ -716,7 +717,8 @@
 		g_ptr_array_add (array, (gpointer)camel_pstring_strdup((camel_message_info_uid(info))));
 }
 
-#warning "sucks, this function returns from memory. We need to have collate or something to get the modified ones from DB and merge"
+/* FIXME[disk-summary] sucks, this function returns from memory. We need to
+ * have collate or something to get the modified ones from DB and merge */
 GPtrArray *
 camel_folder_summary_get_changed (CamelFolderSummary *s)
 {
@@ -748,7 +750,7 @@
 	return count;
 }
 
-#warning "FIXME: I should have a better LRU algorithm "
+/* FIXME[disk-summary] I should have a better LRU algorithm  */
 static gboolean
 remove_item (char *key, CamelMessageInfoBase *info, CamelFolderSummary *s)
 {
@@ -786,7 +788,7 @@
 		return;
 	
 	printf("removing cache for  %s %d %p\n", s->folder ? s->folder->full_name : s->summary_path, g_hash_table_size (s->loaded_infos), s->loaded_infos);
-	#warning "hack. fix it"
+	/* FIXME[disk-summary] hack. fix it */
 	CAMEL_SUMMARY_LOCK (s, summary_lock);
 	g_hash_table_foreach_remove  (s->loaded_infos, (GHRFunc) remove_item, s);
 	CAMEL_SUMMARY_UNLOCK (s, summary_lock);
@@ -839,7 +841,7 @@
 int
 camel_folder_summary_cache_size (CamelFolderSummary *s)
 {
-	#warning "this is a timely hack. fix it well"
+	/* FIXME[disk-summary] this is a timely hack. fix it well */
 	if (!CAMEL_IS_VEE_FOLDER(s->folder))
 		return g_hash_table_size (s->loaded_infos);
 	else
@@ -854,7 +856,8 @@
 	int ret = 0;
 	struct _db_pass_data data;
 	
-	#warning "baseclass this, and vfolders we may have to load better."
+	/* FIXME[disk-summary] baseclass this, and vfolders we may have to
+	 * load better. */
 	d(printf ("\ncamel_folder_summary_reload_from_db called \n"));
 
 	folder_name = s->folder->full_name;
@@ -867,7 +870,7 @@
 	ret = camel_db_read_message_info_records (cdb, folder_name, (gpointer)&data, camel_read_mir_callback, NULL);
 
 	s->cache_load_time = time (NULL);
-        #warning "LRU please and not timeouts"
+        /* FIXME[disk-summary] LRU please and not timeouts */
 	if (!g_getenv("CAMEL_FREE_INFOS") && !s->timeout_handle) 
 		s->timeout_handle = g_timeout_add_seconds (SUMMARY_CACHE_DROP, (GSourceFunc) cfs_try_release_memory, s);
 
@@ -1312,7 +1315,8 @@
 	/* Push MessageInfo-es */
 	g_hash_table_foreach (s->loaded_infos, save_to_db_cb, ex);
 	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#warning "make sure we free the message infos that are loaded are freed if not used anymore or should we leave that to the timer? "
+/* FIXME[disk-summary] make sure we free the message infos that are loaded
+ * are freed if not used anymore or should we leave that to the timer? */
 	
 	return 0;
 }
@@ -1687,7 +1691,7 @@
 
 	/* Summary always holds a ref for the loaded infos */
 	//camel_message_info_ref(info); //FIXME: Check how things are loaded.
-	#warning "FIXME: SHould we ref it or redesign it later on"
+	/* FIXME[disk-summary] SHould we ref it or redesign it later on */
 	/* The uid array should have its own memory. We will unload the infos when not reqd.*/
 	g_ptr_array_add (s->uids, (gpointer) camel_pstring_strdup((camel_message_info_uid(info))));
 	
@@ -1715,7 +1719,7 @@
 
 	/* Summary always holds a ref for the loaded infos */
 	//camel_message_info_ref(info); //FIXME: Check how things are loaded.
-	#warning "FIXME: SHould we ref it or redesign it later on"
+	/* FIXME[disk-summary] SHould we ref it or redesign it later on */
 	/* The uid array should have its own memory. We will unload the infos when not reqd.*/
 	if (!load)
 		g_ptr_array_add (s->uids, (char *) camel_pstring_strdup(camel_message_info_uid(info)));
@@ -2297,7 +2301,10 @@
 		folder_name = s->folder->full_name;
 		cdb = s->folder->cdb;
 
-		#warning "lifecycle of infos should be checked. Add should add to db and del should del to db. Sync only the changes at interval and remove those full sync on folder switch"
+		/* FIXME[disk-summary] lifecycle of infos should be checked.
+		 * Add should add to db and del should del to db. Sync only
+		 * the changes at interval and remove those full sync on
+		 * folder switch */
 		camel_db_delete_uids (cdb, folder_name, uids, &ex);
 
 		g_slist_foreach (uids, (GFunc) camel_pstring_free, NULL);
@@ -3346,7 +3353,7 @@
 	}
 	ci->type = ct;
 
-	#warning "move all these to camel pstring"
+	/* FIXME[disk-summary] move all these to camel pstring */
 	EXTRACT_STRING (ci->id);
 	EXTRACT_STRING (ci->description)
 	EXTRACT_STRING (ci->encoding)

Modified: trunk/camel/camel-folder.c
==============================================================================
--- trunk/camel/camel-folder.c	(original)
+++ trunk/camel/camel-folder.c	Mon Sep 22 11:20:51 2008
@@ -394,7 +394,9 @@
 		case CAMEL_FOLDER_ARG_VISIBLE:
 			/* This is so we can get the values atomically, and also so we can calculate them only once */
 
-			#warning "Add a better base class function to get counts specific to normal/vee folder."
+			/* FIXME[disk-summary] Add a better base class
+			 * function to get counts specific to normal/vee
+			 * folder. */
 			if (unread == -1) {
 
 				if (1) {
@@ -424,7 +426,9 @@
 						}
 
 					}*/
-                                        #warning "I added it for vfolders summary storage, does it harm ?"
+                                        /* FIXME[disk-summary] I added it for
+					 * vfolders summary storage, does it
+					 * harm ? */
 					if (unread == -1) {
 						//unread = folder->summary->unread_count;
 						/*

Modified: trunk/camel/camel-vee-folder.c
==============================================================================
--- trunk/camel/camel-vee-folder.c	(original)
+++ trunk/camel/camel-vee-folder.c	Mon Sep 22 11:20:51 2008
@@ -1003,8 +1003,9 @@
 
 	if ( (mi = vee_folder_add_uid(u->vf, u->source, uidin, u->hash)) ) {
 		camel_folder_change_info_add_uid(u->vf->changes, camel_message_info_uid(mi));
-		#warning "Handle exceptions"
-		#warning "Make all these as transactions, just testing atm"
+		/* FIXME[disk-summary] Handle exceptions */
+		/* FIXME[disk-summary] Make all these as transactions, just
+		 * testing atm */
 		if (u->rebuilt)
 			camel_db_add_to_vfolder_transaction (((CamelFolder *) u->vf)->parent_store->cdb, ((CamelFolder *) u->vf)->full_name, (char *) camel_message_info_uid(mi), NULL);
 		if (!CAMEL_IS_VEE_FOLDER(u->source) && u->unmatched_uids != NULL) {
@@ -1354,7 +1355,7 @@
 		camel_message_info_free((CamelMessageInfo *)vinfo);
 	}
 	camel_folder_change_info_remove_uid(vf->changes, vuid);
-        #warning "Handle exception"
+        /* FIXME[disk-summary] Handle exception */
 	camel_db_delete_uid_from_vfolder_transaction (folder->parent_store->cdb, folder->full_name, vuid, NULL);
 	camel_folder_summary_remove_uid(folder->summary, vuid);
 
@@ -2193,7 +2194,7 @@
 		for (node = p->folders;node;node = g_list_next(node))
 			camel_object_unref(node->data);
 	} else {
-		#warning "See if it is really reqd"
+		/* FIXME[disk-summary] See if it is really reqd */
 		camel_folder_freeze ((CamelFolder *)vf);
 		while (p->folders) {
 			CamelFolder *f = p->folders->data;

Modified: trunk/camel/camel-vee-store.c
==============================================================================
--- trunk/camel/camel-vee-store.c	(original)
+++ trunk/camel/camel-vee-store.c	Mon Sep 22 11:20:51 2008
@@ -347,7 +347,7 @@
 	g_hash_table_destroy(infos_hash);
 
 	/* and always add UNMATCHED, if scanning from top/etc */
-	#warning "comment it out well"
+	/* FIXME[disk-summary] comment it out well */
 	if (0 && (top == NULL || top[0] == 0 || strncmp(top, CAMEL_UNMATCHED_NAME, strlen(CAMEL_UNMATCHED_NAME)) == 0)) {
 		info = camel_folder_info_new ();
 		url = camel_url_new("vfolder:", NULL);

Modified: trunk/camel/camel-vee-summary.c
==============================================================================
--- trunk/camel/camel-vee-summary.c	(original)
+++ trunk/camel/camel-vee-summary.c	Mon Sep 22 11:20:51 2008
@@ -214,7 +214,8 @@
 {
 	CamelMessageInfo *info;
 
-	#warning "too bad design. Need to peek it from cfs instead of hacking ugly like this"
+	/* FIXME[disk-summary] too bad design. Need to peek it from cfs
+	 * instead of hacking ugly like this */
 	CAMEL_SUMMARY_LOCK(s, summary_lock);
 	CAMEL_SUMMARY_LOCK(s, ref_lock);
 
@@ -329,11 +330,12 @@
 	s->summary.folder = parent;
 	s->force_counts = FALSE;
 
-        #warning "fix exceptions and note return values"
-	#warning "if Evo's junk/trash vfolders make it VJunk VTrash instead of .#evolution/Junk-or-whatever"		
+        /* FIXME[disk-summary] fix exceptions and note return values */
+	/* FIXME[disk-summary] if Evo's junk/trash vfolders make it VJunk
+	 * VTrash instead of .#evolution/Junk-or-whatever */
 	camel_db_create_vfolder (parent->cdb, parent->full_name, NULL);
 
-	#warning "handle excep and ret"
+	/* FIXME[disk-summary] handle excep and ret */
 	camel_folder_summary_header_load_from_db ((CamelFolderSummary *)s, parent->parent_store, parent->full_name, NULL);
 	return &s->summary;
 }
@@ -345,7 +347,7 @@
 	CamelFolderSummary *cfs = (CamelFolderSummary *)summary;
 	GPtrArray *array;
 
-	#warning "fix exception passing"
+	/* FIXME[disk-summary] fix exception passing */
 	array = camel_db_get_vuids_from_vfolder(cfs->folder->cdb, cfs->folder->full_name, shash, NULL);
 	
 	g_free(shash);

Modified: trunk/camel/camel-vtrash-folder.c
==============================================================================
--- trunk/camel/camel-vtrash-folder.c	(original)
+++ trunk/camel/camel-vtrash-folder.c	Mon Sep 22 11:20:51 2008
@@ -298,7 +298,7 @@
 	}
 }
 
-#warning rewrite the same way as camel-vee-summary.c
+/* FIXME[disk-summary] rewrite the same way as camel-vee-summary.c */
 static GPtrArray *
 vtrash_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
 {
@@ -327,7 +327,8 @@
 			camel_message_info_free (vmi);
 		}
 
-                #warning search in the DB of the folder, for the expression, with the vtrash bit (junk/trash)
+                /* FIXME[disk-summary] search in the DB of the folder, for
+		 * the expression, with the vtrash bit (junk/trash) */
 		if (uids->len > 0
 		    && (matches = camel_folder_search_by_uids(f, expression, uids, NULL))) {
 			for (i = 0; i < matches->len; i++) {
@@ -372,7 +373,7 @@
 		camel_vee_folder_hash_folder(f, hash);
 
 		/* map the vfolder uid's to the source folder uid's first */
-		#warning "check this. is it uids od folder_uids"
+		/* FIXME[disk-summary] check this. is it uids od folder_uids */
 		//g_ptr_array_set_size(uids, 0);
 		g_ptr_array_set_size (folder_uids, 0);
 		for (i=0;i<uids->len;i++) {
@@ -381,7 +382,8 @@
 			//if (strlen(uid) >= 8 && strncmp(uid, hash, 8) == 0) {
 			if (strncmp(uid, hash, 8) == 0) {				
 				//CamelMessageInfo *mi;
-				#warning "is it really reqd, if so uncomment it"
+				/* FIXME[disk-summary] is it really reqd, if
+				 * so uncomment it */
 				//mi = camel_folder_get_message_info(f, uid+8);
 				//if (mi) {
 				//	if(camel_message_info_flags(mi) & ((CamelVTrashFolder *)folder)->bit)

Modified: trunk/camel/providers/groupwise/camel-groupwise-summary.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-summary.c	(original)
+++ trunk/camel/providers/groupwise/camel-groupwise-summary.c	Mon Sep 22 11:20:51 2008
@@ -386,7 +386,7 @@
 				if ((flags & CAMEL_MESSAGE_DELETED) && !(old & CAMEL_MESSAGE_DELETED)) {
 						mi->summary->deleted_count ++ ;
 
-						#warning "What to do when the user has set to show-deleted-messages "
+						/* FIXME[disk-summary] What to do when the user has set to show-deleted-messages */
 						mi->summary->visible_count -- ;
 
 						if (!(flags & CAMEL_MESSAGE_SEEN))

Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c	(original)
+++ trunk/camel/providers/imap/camel-imap-folder.c	Mon Sep 22 11:20:51 2008
@@ -3409,7 +3409,7 @@
 		}
 
 		/* FIXME: If it enters if(info) it will always match the exception. So stupid */
-		#warning "Use a db query to see if the DB exists"
+		/* FIXME[disk-summary] Use a db query to see if the DB exists */
 /* 		info = (CamelImapMessageInfo *)camel_folder_summary_uid(folder->summary, uid); */
 /* 		if (info) { */
 /* 			for (seq = 0; seq < camel_folder_summary_count (folder->summary); seq++) { */

Modified: trunk/camel/providers/imap/camel-imap-wrapper.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-wrapper.c	(original)
+++ trunk/camel/providers/imap/camel-imap-wrapper.c	Mon Sep 22 11:20:51 2008
@@ -147,7 +147,7 @@
 #ifdef ENETUNREACH
 			errno = ENETUNREACH;
 #else
-#warning FIXME: what errno to use if no ENETUNREACH
+/* FIXME[disk-summary] what errno to use if no ENETUNREACH */
 			errno = EINVAL;
 #endif
 			return -1;

Modified: trunk/camel/providers/local/camel-maildir-summary.c
==============================================================================
--- trunk/camel/providers/local/camel-maildir-summary.c	(original)
+++ trunk/camel/providers/local/camel-maildir-summary.c	Mon Sep 22 11:20:51 2008
@@ -620,7 +620,8 @@
 			/* TODO: only store the extension in the mdi->filename struct, not the whole lot */
 			if (filename == NULL || strcmp(filename, d->d_name) != 0) {
 #ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
+/* FIXME[disk-summary] cannot modify the estrv after its been setup,
+ * for mt-safe code */
 				CAMEL_SUMMARY_LOCK(s, summary_lock);
 				/* need to update the summary hash ref */
 				g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
@@ -774,7 +775,7 @@
 					   the estrv is being modified.
 					   Sigh, this may mean the maildir name has to be cached another way */
 #ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
+/* FIXME[disk-summary] cannot modify the estrv after its been setup, for mt-safe code */
 					CAMEL_SUMMARY_LOCK(s, summary_lock);
 					/* need to update the summary hash ref */
 					g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));

Modified: trunk/camel/providers/local/camel-mbox-store.c
==============================================================================
--- trunk/camel/providers/local/camel-mbox-store.c	(original)
+++ trunk/camel/providers/local/camel-mbox-store.c	Mon Sep 22 11:20:51 2008
@@ -638,7 +638,7 @@
 		folderpath = camel_local_store_get_full_path(store, fi->full_name);
 		
 		mbs = (CamelMboxSummary *)camel_mbox_summary_new(NULL, path, folderpath, NULL);
-		#warning "track exception"
+		/* FIXME[disk-summary] track exception */
 		if (camel_folder_summary_header_load_from_db ((CamelFolderSummary *)mbs, store, fi->full_name, NULL) != -1) {
 			fi->unread = ((CamelFolderSummary *)mbs)->unread_count;
 			fi->total = ((CamelFolderSummary *)mbs)->saved_count;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]