evolution-data-server r9106 - branches/camel-db-summary/camel



Author: sragavan
Date: Thu Jul 10 11:53:35 2008
New Revision: 9106
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9106&view=rev

Log:
Fix compiler warnings


Modified:
   branches/camel-db-summary/camel/camel-folder-search.c
   branches/camel-db-summary/camel/camel-folder-summary.c
   branches/camel-db-summary/camel/camel-folder-summary.h
   branches/camel-db-summary/camel/camel-folder-thread.c
   branches/camel-db-summary/camel/camel-folder.c
   branches/camel-db-summary/camel/camel-vee-folder.c
   branches/camel-db-summary/camel/camel-vee-store.c
   branches/camel-db-summary/camel/camel-vee-summary.c
   branches/camel-db-summary/camel/camel-vee-summary.h

Modified: branches/camel-db-summary/camel/camel-folder-search.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-search.c	(original)
+++ branches/camel-db-summary/camel/camel-folder-search.c	Thu Jul 10 11:53:35 2008
@@ -943,7 +943,7 @@
 	if (strlen (argv [1]->value.string) > 1) {
 
 		char *value;
-		char *temp;
+		char *temp=NULL;
 		char *column;
 
 		column = camel_db_get_column_name (argv [0]->value.string);

Modified: branches/camel-db-summary/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.c	(original)
+++ branches/camel-db-summary/camel/camel-folder-summary.c	Thu Jul 10 11:53:35 2008
@@ -200,7 +200,7 @@
 	if (s->timeout_handle)
 		g_source_remove (s->timeout_handle);
 	//camel_folder_summary_clear(s);
-	g_ptr_array_foreach (s->uids, camel_pstring_free, NULL);
+	g_ptr_array_foreach (s->uids, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (s->uids, TRUE);
 	g_hash_table_destroy (s->loaded_infos);
 
@@ -452,7 +452,7 @@
 
 	g_ptr_array_set_size(res, s->uids->len);
 	for (i=0;i<s->uids->len;i++)
-		res->pdata[i] = camel_pstring_strdup (g_ptr_array_index(s->uids, i));
+		res->pdata[i] = (gpointer) camel_pstring_strdup ((char *)g_ptr_array_index(s->uids, i));
 	
 
 	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
@@ -678,7 +678,7 @@
 append_changed_uids (char *key, CamelMessageInfoBase *info, GPtrArray *array)
 {
 	if (info->dirty || info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)
-		g_ptr_array_add (array, camel_pstring_strdup((camel_message_info_uid(info))));
+		g_ptr_array_add (array, (gpointer)camel_pstring_strdup((camel_message_info_uid(info))));
 }
 
 GPtrArray *
@@ -687,7 +687,7 @@
 	GPtrArray *res = g_ptr_array_new();
 	
 	CAMEL_SUMMARY_LOCK (s, summary_lock);
-	g_hash_table_foreach (s->loaded_infos, append_changed_uids, res);
+	g_hash_table_foreach (s->loaded_infos, (GHFunc) append_changed_uids, res);
 	CAMEL_SUMMARY_UNLOCK (s, summary_lock);
 
 	return res;
@@ -714,8 +714,6 @@
 static gboolean      
 remove_cache (CamelFolderSummary *s)
 {
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-	
 	/* Attempt to release 2MB*/
         sqlite3_release_memory(CAMEL_DB_FREE_CACHE_SIZE); 
 	
@@ -725,7 +723,7 @@
 	printf("removing cache for  %s %d\n", s->folder->full_name, g_hash_table_size (s->loaded_infos));
 	#warning "hack. fix it"
 	CAMEL_SUMMARY_LOCK (s, summary_lock);
-	g_hash_table_foreach_remove  (s->loaded_infos, remove_item, s);
+	g_hash_table_foreach_remove  (s->loaded_infos, (GHRFunc) remove_item, s);
 	CAMEL_SUMMARY_UNLOCK (s, summary_lock);
 	printf("done .. now %d\n",g_hash_table_size (s->loaded_infos));
 
@@ -769,14 +767,13 @@
 	return ret == 0 ? 0 : -1;
 }
 
-
 int
 camel_folder_summary_load_from_db (CamelFolderSummary *s, CamelException *ex)
 {
 	CamelDB *cdb;
 	char *folder_name;
 	int ret = 0;
-	struct _db_pass_data data;
+//	struct _db_pass_data data;
 	
 	d(printf ("\ncamel_folder_summary_load_from_db called \n"));
 	s->flags &= ~CAMEL_SUMMARY_DIRTY;
@@ -797,7 +794,7 @@
 #endif	
 	s->cache_load_time = time (NULL);
 	#warning "LRU please and not timeouts"
-	s->timeout_handle = g_timeout_add_seconds (SUMMARY_CACHE_DROP, remove_cache, s);
+	s->timeout_handle = g_timeout_add_seconds (SUMMARY_CACHE_DROP, (GSourceFunc) remove_cache, s);
 
 	return ret == 0 ? 0 : -1;
 }
@@ -810,7 +807,7 @@
 	for (i = 0; i < ncol; ++i) {
 
 		if ( !strcmp (name [i], "uid") ) 
-			mir->uid = camel_pstring_strdup (cols [i]);
+			mir->uid = (char *) camel_pstring_strdup (cols [i]);
 		else if ( !strcmp (name [i], "flags") ) 
 			mir->flags = cols [i] ? strtoul (cols [i], NULL, 10) : 0;
 		else if ( !strcmp (name [i], "read") ) 
@@ -832,21 +829,21 @@
 		else if ( !strcmp (name [i], "dreceived") ) 
 			mir->dreceived = cols [i] ? strtol (cols [i], NULL, 10) : 0;
 		else if ( !strcmp (name [i], "subject") ) 
-			mir->subject = camel_pstring_strdup (cols [i]);
+			mir->subject = (char *) camel_pstring_strdup (cols [i]);
 		else if ( !strcmp (name [i], "mail_from") ) 
-			mir->from = camel_pstring_strdup (cols [i]);
+			mir->from = (char *) camel_pstring_strdup (cols [i]);
 		else if ( !strcmp (name [i], "mail_to") ) 
-			mir->to = camel_pstring_strdup (cols [i]);
+			mir->to = (char *) camel_pstring_strdup (cols [i]);
 		else if ( !strcmp (name [i], "mail_cc") ) 
-			mir->cc = camel_pstring_strdup(cols [i]);
+			mir->cc = (char *) camel_pstring_strdup(cols [i]);
 		else if ( !strcmp (name [i], "mlist") ) 
-			mir->mlist = camel_pstring_strdup (cols [i]);
+			mir->mlist = (char *) camel_pstring_strdup (cols [i]);
 		else if ( !strcmp (name [i], "followup_flag") ) 
-			mir->followup_flag = camel_pstring_strdup(cols [i]);
+			mir->followup_flag = (char *) camel_pstring_strdup(cols [i]);
 		else if ( !strcmp (name [i], "followup_completed_on") ) 
-			mir->followup_completed_on = camel_pstring_strdup(cols [i]);
+			mir->followup_completed_on = (char *) camel_pstring_strdup(cols [i]);
 		else if ( !strcmp (name [i], "followup_due_by") ) 
-			mir->followup_due_by = camel_pstring_strdup(cols [i]);
+			mir->followup_due_by = (char *) camel_pstring_strdup(cols [i]);
 		else if ( !strcmp (name [i], "part") ) 
 			mir->part = g_strdup (cols [i]);
 		else if ( !strcmp (name [i], "labels") ) 
@@ -868,7 +865,6 @@
 	CamelFolderSummary *s = data->summary;
 	CamelMIRecord *mir;
 	CamelMessageInfo *info;
-	int i;
 	int ret = 0;
 
 	mir = g_new0 (CamelMIRecord , 1);
@@ -987,9 +983,9 @@
 	CAMEL_SUMMARY_UNLOCK(s, io_lock);
 	fclose (in);
 	s->flags |= ~CAMEL_SUMMARY_DIRTY;
-
-	return -1;
 #endif	
+	return -1;
+
 }
 
 /* saves the content descriptions, recursively */
@@ -1356,7 +1352,7 @@
 
 	if (uid == NULL || uid[0] == 0) {
 		camel_pstring_free (info->uid);
-		uid = info->uid = camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
+		uid = info->uid = (char *)camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
 	}
 
 	CAMEL_SUMMARY_LOCK(s, summary_lock);
@@ -1419,9 +1415,9 @@
 	//camel_message_info_ref(info); //FIXME: Check how things are loaded.
 	#warning "FIXME: 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, camel_pstring_strdup((camel_message_info_uid(info))));
+	g_ptr_array_add (s->uids, (gpointer) camel_pstring_strdup((camel_message_info_uid(info))));
 	
-	g_hash_table_insert (s->loaded_infos, camel_message_info_uid (info), info);
+	g_hash_table_insert (s->loaded_infos, (gpointer) camel_message_info_uid (info), info);
 	s->flags |= CAMEL_SUMMARY_DIRTY;
 
 	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
@@ -1448,9 +1444,9 @@
 	#warning "FIXME: 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, camel_pstring_strdup(camel_message_info_uid(info)));
+		g_ptr_array_add (s->uids, (char *) camel_pstring_strdup(camel_message_info_uid(info)));
 	
-	g_hash_table_insert (s->loaded_infos, camel_message_info_uid (info), info);
+	g_hash_table_insert (s->loaded_infos, (char *) camel_message_info_uid (info), info);
 	if (!load)
 		s->flags |= CAMEL_SUMMARY_DIRTY;
 
@@ -1720,8 +1716,9 @@
 void
 camel_folder_summary_clear(CamelFolderSummary *s)
 {
-	int i;
 #if 0
+	int i;
+
 	CAMEL_SUMMARY_LOCK(s, summary_lock);
 	if (camel_folder_summary_count(s) == 0) {
 		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
@@ -1747,7 +1744,6 @@
 void
 camel_folder_summary_clear_db (CamelFolderSummary *s)
 {
-	int i;
 	CamelDB *cdb;
 	char *folder_name;
 
@@ -1765,7 +1761,7 @@
 
 
 	camel_db_clear_folder_summary (cdb, folder_name, NULL);
-	g_ptr_array_foreach (s->uids, camel_pstring_free, NULL);
+	g_ptr_array_foreach (s->uids, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (s->uids, TRUE);
 	s->uids = g_ptr_array_new ();
 
@@ -1869,7 +1865,6 @@
 	const char *uid = s->uids->pdata[index];
         CamelMessageInfo *oldinfo;
         char *olduid;
-	int i;
 	
 	CAMEL_SUMMARY_LOCK(s, summary_lock);
 	CAMEL_SUMMARY_LOCK(s, ref_lock);
@@ -1878,13 +1873,13 @@
 		/* make sure it doesn't vanish while we're removing it */
 		g_hash_table_remove (s->loaded_infos, uid);
 		camel_pstring_free (uid);
-		g_ptr_array_remove_index(s->uids, i);
+		g_ptr_array_remove_index(s->uids, index);
 		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
 		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
 		camel_message_info_free(oldinfo);
 	} else {
 		/* Info isn't loaded into the memory. We must just remove the UID*/
-		g_ptr_array_remove_index(s->uids, i);
+		g_ptr_array_remove_index(s->uids, index);
 		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
 		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
 
@@ -1938,7 +1933,7 @@
 		for (i = start; i < end; i++) {
 			const char *uid = s->uids->pdata[i];
 
-			uids = g_slist_prepend (uids, uid);
+			uids = g_slist_prepend (uids, (gpointer) uid);
 
 			g_hash_table_remove(s->loaded_infos, uid);
 		}
@@ -2605,12 +2600,12 @@
 	mi->date_sent = record->dsent;
 	mi->date_received = record->dreceived;
 
-	mi->uid = camel_pstring_strdup (record->uid);
-	mi->subject = camel_pstring_add (record->subject, FALSE);
-	mi->from = camel_pstring_add (record->from, FALSE);
-	mi->to = camel_pstring_add (record->to, FALSE);
-	mi->cc = camel_pstring_add (record->cc, FALSE);
-	mi->mlist = camel_pstring_add (record->mlist, FALSE);
+	mi->uid = (char *) camel_pstring_strdup (record->uid);
+	mi->subject = (char *) camel_pstring_add (record->subject, FALSE);
+	mi->from = (char *) camel_pstring_add (record->from, FALSE);
+	mi->to = (char *) camel_pstring_add (record->to, FALSE);
+	mi->cc = (char *) camel_pstring_add (record->cc, FALSE);
+	mi->mlist = (char *) camel_pstring_add (record->mlist, FALSE);
 
 	/* Extract Message id & References */
 	mi->content = NULL;
@@ -2774,7 +2769,7 @@
 	int count, i;
 
 	/* Assume that we dont have to take care of DB Safeness. It will be done while doing the DB transaction */
-	record->uid = camel_pstring_strdup(camel_message_info_uid(mi));
+	record->uid = (char *) camel_pstring_strdup(camel_message_info_uid(mi));
 	record->flags = mi->flags;
 	
 	record->read =  ((mi->flags & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)));
@@ -2788,15 +2783,15 @@
 	record->dsent = mi->date_sent;
 	record->dreceived = mi->date_received;
 
-	record->subject = camel_pstring_strdup(camel_message_info_subject (mi));
-	record->from = camel_pstring_strdup(camel_message_info_from (mi));
-	record->to = camel_pstring_strdup(camel_message_info_to (mi));
-	record->cc = camel_pstring_strdup(camel_message_info_cc (mi));
-	record->mlist = camel_pstring_strdup(camel_message_info_mlist (mi));
-	
-	record->followup_flag = camel_pstring_strdup(camel_message_info_user_tag(info, "follow-up"));
-	record->followup_completed_on = camel_pstring_strdup(camel_message_info_user_tag(info, "completed-on"));
- 	record->followup_due_by = camel_pstring_strdup(camel_message_info_user_tag(info, "due-by"));
+	record->subject = (char *) camel_pstring_strdup(camel_message_info_subject (mi));
+	record->from = (char *) camel_pstring_strdup(camel_message_info_from (mi));
+	record->to = (char *) camel_pstring_strdup(camel_message_info_to (mi));
+	record->cc = (char *) camel_pstring_strdup(camel_message_info_cc (mi));
+	record->mlist = (char *) camel_pstring_strdup(camel_message_info_mlist (mi));
+	
+	record->followup_flag = (char *) camel_pstring_strdup(camel_message_info_user_tag(info, "follow-up"));
+	record->followup_completed_on = (char *) camel_pstring_strdup(camel_message_info_user_tag(info, "completed-on"));
+ 	record->followup_due_by = (char *) camel_pstring_strdup(camel_message_info_user_tag(info, "due-by"));
 
 	tmp = g_string_new (NULL);
 	if (mi->references) {

Modified: branches/camel-db-summary/camel/camel-folder-summary.h
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.h	(original)
+++ branches/camel-db-summary/camel/camel-folder-summary.h	Thu Jul 10 11:53:35 2008
@@ -282,7 +282,7 @@
 	CamelMessageContentInfo * (*content_info_load)(CamelFolderSummary *, FILE *);
 	int		          (*content_info_save)(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
 	void		          (*content_info_free)(CamelFolderSummary *, CamelMessageContentInfo *);
-	CamelMessageInfo * (*message_info_from_uid) (CamelFolderSummary *, char *);
+	CamelMessageInfo * (*message_info_from_uid) (CamelFolderSummary *, const char *);
 	/* get the next uid */
 	char *(*next_uid_string)(CamelFolderSummary *);
 
@@ -347,6 +347,17 @@
 /* add a new raw summary item */
 void camel_folder_summary_add (CamelFolderSummary *summary, CamelMessageInfo *info);
 
+/* Get only the uids of dirty/changed things to sync to server/db */
+GPtrArray * camel_folder_summary_get_changed (CamelFolderSummary *s);
+/* Gets the size of loaded mi's */
+int camel_folder_summary_cache_size (CamelFolderSummary *s);
+/* reload the summary at any required point if required */
+int camel_folder_summary_reload_from_db (CamelFolderSummary *s, CamelException *ex);
+/* insert mi to summary */
+void camel_folder_summary_insert (CamelFolderSummary *s, CamelMessageInfo *info, gboolean load);
+
+void camel_folder_summary_remove_index_fast (CamelFolderSummary *s, int index);
+
 /* build/add raw summary items */
 CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *summary, struct _camel_header_raw *headers);
 CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *summary, CamelMimeParser *parser);

Modified: branches/camel-db-summary/camel/camel-folder-thread.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-thread.c	(original)
+++ branches/camel-db-summary/camel/camel-folder-thread.c	Thu Jul 10 11:53:35 2008
@@ -620,10 +620,9 @@
 
 	fsummary = camel_folder_summary_array (folder->summary);
 	thread->summary = summary = g_ptr_array_new();
-	if (fsummary->len - camel_folder_summary_cache_size (folder->summary) > 50) {
-	    CamelException ex;
-		camel_folder_summary_reload_from_db (folder->summary, &ex);
-    }
+	if (fsummary->len - camel_folder_summary_cache_size (folder->summary) > 50)
+		camel_folder_summary_reload_from_db (folder->summary, NULL);
+
 	for (i = 0 ; i < fsummary->len ; i++) {
 		CamelMessageInfo *info ;
 		char *uid = fsummary->pdata[i];

Modified: branches/camel-db-summary/camel/camel-folder.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder.c	(original)
+++ branches/camel-db-summary/camel/camel-folder.c	Thu Jul 10 11:53:35 2008
@@ -452,10 +452,10 @@
 			*arg->ca_int = count;
 			break;
 		case CAMEL_FOLDER_ARG_UID_ARRAY: {
-			int j;
+/*			int j;
 			CamelMessageInfo *info;
 			GPtrArray *array;
-/*
+
 			count = camel_folder_summary_count(folder->summary);
 			array = g_ptr_array_new();
 			g_ptr_array_set_size(array, count);
@@ -467,7 +467,7 @@
 			}
 			*arg->ca_ptr = array;*/
 			// WTH this is reqd ?, let it crash to find out who uses this
-			printf("%s", 0);
+			g_assert (0);
 			break; }
 		case CAMEL_FOLDER_ARG_INFO_ARRAY:
 			*arg->ca_ptr = camel_folder_summary_array(folder->summary);
@@ -500,7 +500,7 @@
 		g_ptr_array_free(array, TRUE);
 		break; }
 	case CAMEL_FOLDER_ARG_INFO_ARRAY:
-		camel_folder_summary_array_free(folder->summary, val);
+		camel_folder_free_summary (folder, val);
 		break;
 	case CAMEL_FOLDER_ARG_PROPERTIES:
 		g_slist_free(val);
@@ -1168,7 +1168,7 @@
 		CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
 		
 		if (info) {
-			array->pdata[j++] = camel_pstring_strdup (camel_message_info_uid (info));
+			array->pdata[j++] = (char *)camel_pstring_strdup (camel_message_info_uid (info));
 			camel_message_info_free(info);
 		}
 	}
@@ -1303,7 +1303,7 @@
 static void
 free_summary(CamelFolder *folder, GPtrArray *summary)
 {
-	g_ptr_array_foreach (summary, camel_pstring_free, NULL);
+	g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (summary, TRUE);
 }
 

Modified: branches/camel-db-summary/camel/camel-vee-folder.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-folder.c	(original)
+++ branches/camel-db-summary/camel/camel-vee-folder.c	Thu Jul 10 11:53:35 2008
@@ -601,7 +601,7 @@
 					vuid = g_malloc(strlen(uid)+9);
 					memcpy(vuid, hash, 8);
 					strcpy(vuid+8, uid);
-					g_ptr_array_add(result, camel_pstring_strdup(vuid));
+					g_ptr_array_add(result, (gpointer) camel_pstring_strdup(vuid));
 					g_free (vuid);
 				}
 				camel_folder_search_free(f, matches);
@@ -625,8 +625,8 @@
 		node = p->folders;
 		while (node) {
 			CamelFolder *f = node->data;
-			int i;
 			char hash[9];
+
 			camel_vee_folder_hash_folder(f, hash);
 			hash[8] = 0;
 			g_hash_table_insert(hashes, hash, f);
@@ -883,7 +883,7 @@
 							if (n == 1) {
 								CamelMessageInfo *tinfo;
 								g_hash_table_remove(unmatched_uids, oldkey);
-								if (tinfo = vee_folder_add_uid(folder_unmatched, source, oldkey+8, hash)) {
+								if (tinfo = (CamelMessageInfo *) vee_folder_add_uid(folder_unmatched, source, oldkey+8, hash)) {
 									camel_message_info_free (tinfo);
 									camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
 								}
@@ -979,7 +979,7 @@
 		#warning "Handle exceptions"
 		#warning "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, camel_message_info_uid(mi), NULL);
+			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) {
 			if (g_hash_table_lookup_extended(u->unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, &oldval)) {
 				n = GPOINTER_TO_INT (oldval);
@@ -1151,7 +1151,7 @@
 	g_hash_table_destroy(allhash);
 	/* if expression not set, we only had a null list */
 	if (vf->expression == NULL || !rebuilded) {
-		g_ptr_array_foreach (match, camel_pstring_free, NULL);
+		g_ptr_array_foreach (match, (GFunc) camel_pstring_free, NULL);
 		g_ptr_array_free(match, TRUE);
 	} else
 		camel_folder_search_free(f, match);
@@ -1849,12 +1849,12 @@
 			camel_object_unref(node->data);
 	} else {
 		#warning "See if it is really reqd"
-		camel_folder_freeze (vf);
+		camel_folder_freeze ((CamelFolder *)vf);
 		while (p->folders) {
 			CamelFolder *f = p->folders->data;
 			camel_vee_folder_remove_folder(vf, f);
 		}
-		camel_folder_thaw (vf);
+		camel_folder_thaw ((CamelFolder *)vf);
 	}
 
 	g_free(vf->expression);

Modified: branches/camel-db-summary/camel/camel-vee-store.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-store.c	(original)
+++ branches/camel-db-summary/camel/camel-vee-store.c	Thu Jul 10 11:53:35 2008
@@ -104,8 +104,8 @@
 static void
 construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
 {
-	 CamelStore *store = (CamelStore *)service;
-	 CamelVeeStore *obj = (CamelVeeStore *)service;
+	/*  CamelStore *store = (CamelStore *)service;
+	 CamelVeeStore *obj = (CamelVeeStore *)service; */
 	 
 	 ((CamelServiceClass *) camel_vee_store_parent)->construct(service, session, provider, url, ex);
 	 

Modified: branches/camel-db-summary/camel/camel-vee-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-summary.c	(original)
+++ branches/camel-db-summary/camel/camel-vee-summary.c	Thu Jul 10 11:53:35 2008
@@ -33,6 +33,7 @@
 #include "camel-store.h"
 #include "camel-vee-summary.h"
 #include "camel-private.h"
+#include "camel-string-utils.h"
 
 #define d(x)
 
@@ -165,7 +166,6 @@
 message_info_from_uid (CamelFolderSummary *s, const char *uid)
 {
 	CamelMessageInfoBase *info;
-	int ret;
 
 	#warning "too bad design. Need to peek it from cfs instead of hacking ugly like this"
 	CAMEL_SUMMARY_LOCK(s, summary_lock);
@@ -179,7 +179,7 @@
 	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
 	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
 
-	return info;	
+	return (CamelMessageInfo *) info;	
 }
 
 static void
@@ -250,7 +250,7 @@
 camel_vee_summary_new(CamelFolder *parent)
 {
 	CamelVeeSummary *s;
-	char *fname;
+
 	s = (CamelVeeSummary *)camel_object_new(camel_vee_summary_get_type());
 	s->summary.folder = parent;
 
@@ -297,7 +297,7 @@
 /* 		return NULL; */
 /* 	} */
 
-	mi = message_info_from_uid(&s->summary, vuid); 
+	mi = (CamelVeeMessageInfo *) message_info_from_uid(&s->summary, vuid); 
 	if (mi) {
 		g_warning ("%s - already there\n", vuid);
 		g_free (vuid);
@@ -307,7 +307,7 @@
 	mi = (CamelVeeMessageInfo *)camel_message_info_new(&s->summary);
 	mi->summary = summary;
 	camel_object_ref (summary);
-	mi->info.uid = camel_pstring_strdup (vuid);
+	mi->info.uid = (char *) camel_pstring_strdup (vuid);
 	g_free (vuid);
 	camel_message_info_ref (mi);
 	camel_folder_summary_insert(&s->summary, (CamelMessageInfo *)mi, FALSE);

Modified: branches/camel-db-summary/camel/camel-vee-summary.h
==============================================================================
--- branches/camel-db-summary/camel/camel-vee-summary.h	(original)
+++ branches/camel-db-summary/camel/camel-vee-summary.h	Thu Jul 10 11:53:35 2008
@@ -58,6 +58,7 @@
 CamelFolderSummary *camel_vee_summary_new(struct _CamelFolder *parent);
 
 CamelVeeMessageInfo * camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const char *uid, const char hash[8]);
+GPtrArray * camel_vee_summary_get_ids (CamelVeeSummary *summary, char hash[8]);
 
 G_END_DECLS
 



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