evolution r36212 - branches/mail-dbus-remoting/mail



Author: abharath
Date: Fri Aug 29 20:25:33 2008
New Revision: 36212
URL: http://svn.gnome.org/viewvc/evolution?rev=36212&view=rev

Log:
Move to remote calls for folder


Modified:
   branches/mail-dbus-remoting/mail/camel-folder-remote-impl.c
   branches/mail-dbus-remoting/mail/camel-folder-remote.c
   branches/mail-dbus-remoting/mail/camel-folder-remote.h
   branches/mail-dbus-remoting/mail/em-composer-utils.c
   branches/mail-dbus-remoting/mail/em-folder-browser.c
   branches/mail-dbus-remoting/mail/em-folder-properties.c
   branches/mail-dbus-remoting/mail/em-folder-utils.c
   branches/mail-dbus-remoting/mail/em-folder-view.c
   branches/mail-dbus-remoting/mail/em-folder-view.h
   branches/mail-dbus-remoting/mail/em-format-html-display.c
   branches/mail-dbus-remoting/mail/em-message-browser.c
   branches/mail-dbus-remoting/mail/em-popup.c
   branches/mail-dbus-remoting/mail/em-utils.c
   branches/mail-dbus-remoting/mail/mail-component.c
   branches/mail-dbus-remoting/mail/mail-folder-cache.c
   branches/mail-dbus-remoting/mail/mail-ops.c
   branches/mail-dbus-remoting/mail/mail-send-recv.c
   branches/mail-dbus-remoting/mail/mail-vfolder.c
   branches/mail-dbus-remoting/mail/message-list.c

Modified: branches/mail-dbus-remoting/mail/camel-folder-remote-impl.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-folder-remote-impl.c	(original)
+++ branches/mail-dbus-remoting/mail/camel-folder-remote-impl.c	Fri Aug 29 20:25:33 2008
@@ -282,6 +282,17 @@
 
 		message_flags = camel_folder_get_message_flags(folder, uid);
 		dbus_message_append_args (return_val, DBUS_TYPE_UINT32, &message_flags, DBUS_TYPE_INVALID);
+	} else if (strcmp(method, "camel_folder_get_unread_message_count") == 0) {
+		gboolean ret;
+		int unread;
+
+		ret = dbus_message_get_args (message, NULL,
+				DBUS_TYPE_STRING, &folder_hash_key,
+				DBUS_TYPE_INVALID);
+		folder = g_hash_table_lookup (folder_hash, folder_hash_key);
+
+		unread = camel_folder_get_unread_message_count(folder);
+		dbus_message_append_args (return_val, DBUS_TYPE_INT32, &unread, DBUS_TYPE_INVALID);
 	} else if (strcmp (method, "camel_vee_folder_set_expression") == 0) {
 			gboolean ret;
 			const char *query; 

Modified: branches/mail-dbus-remoting/mail/camel-folder-remote.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-folder-remote.c	(original)
+++ branches/mail-dbus-remoting/mail/camel-folder-remote.c	Fri Aug 29 20:25:33 2008
@@ -476,6 +476,33 @@
 	return message_flags;
 }
 
+int 
+camel_folder_remote_get_unread_message_count (CamelFolderRemote *folder)
+{
+	gboolean ret;
+	DBusError error;
+	int unread;
+
+	dbus_error_init (&error);
+	/* Invoke the appropriate dbind call to MailSessionRemoteImpl */
+	ret = dbind_context_method_call (evolution_dbus_peek_context(), 
+			CAMEL_DBUS_NAME,
+			CAMEL_FOLDER_OBJECT_PATH,
+			CAMEL_FOLDER_INTERFACE,
+			"camel_folder_get_unread_message_count",
+			&error, 
+			"s=>i", folder->object_id, &unread); 
+
+	if (!ret) {
+		g_warning ("Error: Camel folder get unread message count: %s\n", error.message);
+		return 0;
+	}
+
+	d(printf("Camel folder get unread message count remotely\n"));
+	
+	return unread;
+}
+
 void
 camel_folder_remote_set_vee_folder_expression (CamelFolderRemote *folder, const char *query)
 {

Modified: branches/mail-dbus-remoting/mail/camel-folder-remote.h
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-folder-remote.h	(original)
+++ branches/mail-dbus-remoting/mail/camel-folder-remote.h	Fri Aug 29 20:25:33 2008
@@ -45,6 +45,8 @@
 
 guint32 camel_folder_remote_get_message_flags (CamelFolderRemote *folder, const char *uid);
 
+int camel_folder_remote_get_unread_message_count (CamelFolderRemote *folder);
+
 #define camel_folder_remote_delete_message(folder, uid) \
 	camel_folder_remote_set_message_flags (folder, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN)
 

Modified: branches/mail-dbus-remoting/mail/em-composer-utils.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-composer-utils.c	(original)
+++ branches/mail-dbus-remoting/mail/em-composer-utils.c	Fri Aug 29 20:25:33 2008
@@ -200,7 +200,7 @@
 	if (queued) {
 		if (emcs && emcs->drafts_folder) {
 			/* delete the old draft message */
-			camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
+			camel_folder_remote_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
 							CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
 							CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
 			camel_object_unref (emcs->drafts_folder);
@@ -211,8 +211,8 @@
 
 		if (emcs && emcs->folder) {
 			/* set any replied flags etc */
-			camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
-			camel_folder_set_message_user_flag (emcs->folder, emcs->uid, "receipt-handled", TRUE);
+			camel_folder_remote_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
+			camel_folder_remote_set_message_user_flag (emcs->folder, emcs->uid, "receipt-handled", TRUE);
 			camel_object_unref (emcs->folder);
 			emcs->folder = NULL;
 			g_free (emcs->uid);
@@ -506,7 +506,7 @@
 
 	if (emcs->drafts_folder) {
 		/* delete the original draft message */
-		camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
+		camel_folder_remote_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
 						CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
 						CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
 		camel_object_unref (emcs->drafts_folder);
@@ -517,7 +517,7 @@
 
 	if (emcs->folder) {
 		/* set the replied flags etc */
-		camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
+		camel_folder_remote_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
 		camel_object_unref (emcs->folder);
 		emcs->folder = NULL;
 		g_free (emcs->uid);
@@ -748,13 +748,18 @@
 	if (folder != NULL) {
 		char *url = mail_tools_folder_to_url (folder);
 		GList *list = g_list_prepend (NULL, url);
+		CamelURL *camel_url;
+		CamelObjectRemote *store;
 
 		e_composer_header_table_set_post_to_list (table, list);
 
 		g_list_free (list);
 		g_free (url);
 
-		url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
+		store = camel_folder_remote_get_parent_store(folder);
+		camel_url = camel_url_new (camel_store_get_url_remote (store), NULL);
+		url = camel_url_to_string (camel_url, CAMEL_URL_HIDE_ALL);
+
 		account = mail_config_get_account_by_source_url (url);
 		g_free (url);
 
@@ -1020,7 +1025,7 @@
 real_update_forwarded_flag (gpointer uid, gpointer folder)
 {
 	if (uid && folder)
-		camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_FORWARDED, CAMEL_MESSAGE_FORWARDED);
+		camel_folder_remote_set_message_flags (folder, uid, CAMEL_MESSAGE_FORWARDED, CAMEL_MESSAGE_FORWARDED);
 }
 
 static void
@@ -1695,11 +1700,15 @@
 
 	/* add post-to, if nessecary */
 	if (postto && camel_address_length((CamelAddress *)postto)) {
+		CamelURL *camel_url; 
 		char *store_url = NULL;
 		char *post;
+		CamelObjectRemote *store;
 
 		if (folder) {
-			store_url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
+			store = camel_folder_remote_get_parent_store(folder);
+			camel_url = camel_url_new (camel_store_get_url_remote (store), NULL);
+			store_url = camel_url_to_string (camel_url, CAMEL_URL_HIDE_ALL);
 			if (store_url[strlen (store_url) - 1] == '/')
 				store_url[strlen (store_url)-1] = '\0';
 		}
@@ -1738,8 +1747,13 @@
 {
 	EAccount *account;
 	char *tmp;
+	CamelURL *camel_url;
+	CamelObjectRemote *store;
+
+	store = camel_folder_remote_get_parent_store(folder);
+	camel_url = camel_url_new (camel_store_get_url_remote (store), NULL);
 
-	tmp = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
+	tmp = camel_url_to_string(camel_url, CAMEL_URL_HIDE_ALL);
 	account = mail_config_get_account_by_source_url(tmp);
 	g_free(tmp);
 

Modified: branches/mail-dbus-remoting/mail/em-folder-browser.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-browser.c	(original)
+++ branches/mail-dbus-remoting/mail/em-folder-browser.c	Fri Aug 29 20:25:33 2008
@@ -992,7 +992,7 @@
 	if (m->cancel)
 		camel_operation_register (m->cancel);
 
-	d(printf("Setting up Search Folder: %s\n", m->folder->full_name));
+	d(printf("Setting up Search Folder: %s\n", camel_folder_remote_get_full_name(m->folder)));
 
 	camel_folder_remote_set_vee_folder_expression (m->folder, m->query);
 
@@ -1156,7 +1156,7 @@
 		    g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_ACTIVATED], 0);
 
 		    if (!efb->account_search_vf) {
-			    store = camel_object_remote_from_camel_store (emfv->folder->parent_store);
+			    store = camel_object_remote_from_camel_store (camel_folder_remote_get_parent_store(emfv->folder));
 				#warning DAMN WRONG. You must be a moron to leave this. Fix it soon.
 				/*
 			    if (store->folders) {
@@ -1499,8 +1499,8 @@
 
 	camel_exception_init (&ex);
 
-	if ((fi = camel_store_get_folder_info (emfb->view.folder->parent_store,
-					       emfb->view.folder->full_name,
+	if ((fi = camel_store_get_folder_info (camel_folder_remote_get_parent_store(emfb->view.folder),
+					       camel_folder_remote_get_full_name(emfb->view.folder),
 					       CAMEL_STORE_FOLDER_INFO_FAST,
 					       &ex)) != NULL)
 		em_folder_utils_copy_folder(fi, FALSE);
@@ -1522,8 +1522,8 @@
 	/* FIXME: This function MUST become multi-threaded.
 	   FIXME: This interface should NOT use a folderinfo */
 
-	if ((fi = camel_store_get_folder_info (emfb->view.folder->parent_store,
-					       emfb->view.folder->full_name,
+	if ((fi = camel_store_get_folder_info (camel_folder_remote_get_parent_store(emfb->view.folder),
+					       camel_folder_remote_get_full_name(emfb->view.folder),
 					       CAMEL_STORE_FOLDER_INFO_FAST,
 					       &ex)) != NULL)
 		em_folder_utils_copy_folder(fi, TRUE);
@@ -1607,10 +1607,10 @@
 		return;
 	if( em_utils_prompt_user((GtkWindow *)emfv, "/apps/evolution/mail/prompts/mark_all_read","mail:ask-mark-all-read", NULL)){
 		uids = message_list_get_uids(emfv->list);
-		camel_folder_freeze(emfv->folder);
+		camel_folder_remote_freeze(emfv->folder);
 		for (i=0;i<uids->len;i++)
-			camel_folder_set_message_flags(emfv->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-		camel_folder_thaw(emfv->folder);
+			camel_folder_remote_set_message_flags(emfv->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+		camel_folder_remote_thaw(emfv->folder);
 		message_list_free_uids(emfv->list, uids);
 	}
 }
@@ -2084,7 +2084,7 @@
 		}
 
 		if (emfv->uic) {
-			state = (folder->folder_flags & CAMEL_FOLDER_IS_TRASH) == 0;
+			state = (camel_folder_remote_get_folder_flags(folder) & CAMEL_FOLDER_IS_TRASH) == 0;
 			bonobo_ui_component_set_prop(emfv->uic, "/commands/HideDeleted", "sensitive", state?"1":"0", NULL);
 		}
 
@@ -2183,7 +2183,7 @@
 
 		/* HideDeleted */
 		state = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL);
-		if (emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH)) {
+		if (emfv->folder && (camel_folder_remote_get_folder_flags(emfv->folder) & CAMEL_FOLDER_IS_TRASH)) {
 			state = FALSE;
 			bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "sensitive", "0", NULL);
 		} else

Modified: branches/mail-dbus-remoting/mail/em-folder-properties.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-properties.c	(original)
+++ branches/mail-dbus-remoting/mail/em-folder-properties.c	Fri Aug 29 20:25:33 2008
@@ -306,7 +306,7 @@
 		return;
 	}
 
-	store = folder->parent_store;
+	store = camel_folder_remote_get_parent_store(folder);
 
 	prop_data = g_malloc0 (sizeof (*prop_data));
 	prop_data->object = folder;

Modified: branches/mail-dbus-remoting/mail/em-folder-utils.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-utils.c	(original)
+++ branches/mail-dbus-remoting/mail/em-folder-utils.c	Fri Aug 29 20:25:33 2008
@@ -177,7 +177,7 @@
 					camel_folder_free_uids (fromfolder, uids);
 
 					if (m->delete)
-						camel_folder_sync(fromfolder, TRUE, NULL);
+						camel_folder_remote_sync(fromfolder, TRUE, NULL);
 
 					camel_object_unref (fromfolder);
 					camel_object_unref (tofolder);
@@ -394,14 +394,14 @@
 			GPtrArray *uids = camel_folder_get_uids (folder);
 			int i;
 
-			camel_folder_freeze (folder);
+			camel_folder_remote_freeze (folder);
 			for (i = 0; i < uids->len; i++)
 				camel_folder_delete_message (folder, uids->pdata[i]);
 
 			camel_folder_free_uids (folder, uids);
 
-			camel_folder_sync (folder, TRUE, NULL);
-			camel_folder_thaw (folder);
+			camel_folder_remote_sync (folder, TRUE, NULL);
+			camel_folder_remote_thaw (folder);
 		}
 
 		camel_store_delete_folder_remote (store, fi->full_name, ex);
@@ -459,19 +459,18 @@
 
 	local = mail_component_peek_local_store (NULL);
 
-	if (folder->parent_store == local && emfu_is_special_local_folder (folder->full_name)) {
-		dialog = e_error_new (NULL, "mail:no-delete-special-folder", folder->full_name, NULL);
+	if (camel_folder_remote_get_parent_store(folder) == local && emfu_is_special_local_folder (camel_folder_remote_get_full_name(folder))) {
+		dialog = e_error_new (NULL, "mail:no-delete-special-folder", camel_folder_remote_get_full_name(folder), NULL);
 		em_utils_show_error_silent (dialog);
 		return;
 	}
 
-	camel_object_ref (folder->parent_store);
+	camel_object_ref (camel_folder_remote_get_parent_store(folder));
 
 	dialog = e_error_new(NULL,
-			     (folder->parent_store && CAMEL_IS_VEE_STORE(folder->parent_store))?"mail:ask-delete-vfolder":"mail:ask-delete-folder",
-			     folder->full_name, NULL);
-	g_object_set_data_full ((GObject *) dialog, "full_name", g_strdup (folder->full_name), g_free);
-	g_object_set_data_full ((GObject *) dialog, "store", folder->parent_store, camel_object_unref);
+			     (camel_folder_remote_get_parent_store(folder) && CAMEL_IS_VEE_STORE(camel_folder_remote_get_parent_store(folder)))?"mail:ask-delete-vfolder":"mail:ask-delete-folder", camel_folder_remote_get_full_name(folder), NULL);
+	g_object_set_data_full ((GObject *) dialog, "full_name", g_strdup (camel_folder_remote_get_full_name(folder)), g_free);
+	g_object_set_data_full ((GObject *) dialog, "store", camel_folder_remote_get_parent_store(folder), camel_object_unref);
 	g_signal_connect (dialog, "response", G_CALLBACK (emfu_delete_response), NULL);
 	gtk_widget_show (dialog);
 }
@@ -490,26 +489,26 @@
 	local = mail_component_peek_local_store (NULL);
 
 	/* don't allow user to rename one of the special local folders */
-	if (folder->parent_store == local && emfu_is_special_local_folder (folder->full_name)) {
+	if (camel_folder_remote_get_parent_store(folder) == local && emfu_is_special_local_folder (camel_folder_remote_get_full_name(folder))) {
 		e_error_run(NULL,
-			    "mail:no-rename-special-folder", folder->full_name, NULL);
+			    "mail:no-rename-special-folder", camel_folder_remote_get_full_name(folder), NULL);
 		return;
 	}
 
-	if ((p = strrchr (folder->full_name, '/')))
-		base_len = (size_t) (p - folder->full_name);
+	if ((p = strrchr (camel_folder_remote_get_full_name(folder), '/')))
+		base_len = (size_t) (p - camel_folder_remote_get_full_name(folder));
 	else
 		base_len = 0;
 
-	prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), folder->name);
+	prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), camel_folder_remote_get_name(folder));
 	while (!done) {
-		new_name = e_request_string (NULL, _("Rename Folder"), prompt, folder->name);
-		if (new_name == NULL || !strcmp (folder->name, new_name)) {
+		new_name = e_request_string (NULL, _("Rename Folder"), prompt, camel_folder_remote_get_name(folder));
+		if (new_name == NULL || !strcmp (camel_folder_remote_get_name(folder), new_name)) {
 			/* old name == new name */
 			done = TRUE;
 		} else if (strchr(new_name, '/') != NULL) {
 			e_error_run(NULL,
-				    "mail:no-rename-folder", folder->name, new_name, _("Folder names cannot contain '/'"), NULL);
+				    "mail:no-rename-folder", camel_folder_remote_get_name(folder), new_name, _("Folder names cannot contain '/'"), NULL);
 			done = TRUE;
 		} else {
 			CamelFolderInfo *fi;
@@ -518,7 +517,7 @@
 
 			if (base_len > 0) {
 				path = g_malloc (base_len + strlen (new_name) + 2);
-				memcpy (path, folder->full_name, base_len);
+				memcpy (path, camel_folder_remote_get_full_name(folder), base_len);
 				tmp = path + base_len;
 				*tmp++ = '/';
 				strcpy (tmp, new_name);
@@ -527,20 +526,20 @@
 			}
 
 			camel_exception_init (&ex);
-			if ((fi = camel_store_get_folder_info (folder->parent_store, path, CAMEL_STORE_FOLDER_INFO_FAST, &ex)) != NULL) {
-				camel_store_free_folder_info (folder->parent_store, fi);
+			if ((fi = camel_store_get_folder_info (camel_folder_remote_get_parent_store(folder), path, CAMEL_STORE_FOLDER_INFO_FAST, &ex)) != NULL) {
+				camel_store_free_folder_info (camel_folder_remote_get_parent_store(folder), fi);
 				e_error_run(NULL,
-					    "mail:no-rename-folder-exists", folder->name, new_name, NULL);
+					    "mail:no-rename-folder-exists", camel_folder_remote_get_name(folder), new_name, NULL);
 			} else {
 				const char *oldpath, *newpath;
 
-				oldpath = folder->full_name;
+				oldpath = camel_folder_remote_get_full_name(folder);
 				newpath = path;
 
 				d(printf ("renaming %s to %s\n", oldpath, newpath));
 
 				camel_exception_clear (&ex);
-				camel_store_rename_folder_remote (folder->parent_store, oldpath, newpath, &ex);
+				camel_store_rename_folder_remote (camel_folder_remote_get_parent_store(folder), oldpath, newpath, &ex);
 				if (camel_exception_is_set (&ex)) {
 					e_error_run(NULL,
 						    "mail:no-rename-folder", oldpath, newpath, ex.desc, NULL);

Modified: branches/mail-dbus-remoting/mail/em-folder-view.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-view.c	(original)
+++ branches/mail-dbus-remoting/mail/em-folder-view.c	Fri Aug 29 20:25:33 2008
@@ -478,13 +478,13 @@
 		return 0;
 
 	uids = message_list_get_selected(emfv->list);
-	camel_folder_freeze(emfv->folder);
+	camel_folder_remote_freeze(emfv->folder);
 
 	for (i=0; i<uids->len; i++)
-		camel_folder_set_message_flags(emfv->folder, uids->pdata[i], mask, set);
+		camel_folder_remote_set_message_flags(emfv->folder, uids->pdata[i], mask, set);
 
 	message_list_free_uids(emfv->list, uids);
-	camel_folder_thaw(emfv->folder);
+	camel_folder_remote_thaw(emfv->folder);
 
 	return i;
 }
@@ -1079,10 +1079,10 @@
 		}
 
 		uids = message_list_get_selected(emfv->list);
-		camel_folder_freeze(emfv->folder);
+		camel_folder_remote_freeze(emfv->folder);
 
 		for (count=0; count < uids->len; count++) {
-			if (camel_folder_get_message_flags (emfv->folder, uids->pdata[count]) & CAMEL_MESSAGE_USER_NOT_DELETABLE) {
+			if (camel_folder_remote_get_message_flags (emfv->folder, uids->pdata[count]) & CAMEL_MESSAGE_USER_NOT_DELETABLE) {
 				if (emfv->preview_active) {
 					GtkHTMLStream *hstream = gtk_html_begin(((EMFormatHTML *)emfv->preview)->html);
 
@@ -1098,11 +1098,11 @@
 				count = -1;
 				break;
 			} else
-				camel_folder_set_message_flags(emfv->folder, uids->pdata[count], CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED );
+				camel_folder_remote_set_message_flags(emfv->folder, uids->pdata[count], CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED );
 		}
 
 		message_list_free_uids(emfv->list, uids);
-		camel_folder_thaw(emfv->folder);
+		camel_folder_remote_thaw(emfv->folder);
 
 		emfv_select_next_message (emfv, count, FALSE);
 	}
@@ -1117,11 +1117,11 @@
 	EMFolderView *emfv = data;
 	GConfClient *gconf = gconf_client_get_default ();
 
-	if (emfv->folder && emfv->folder->parent_store && CAMEL_IS_VEE_STORE (emfv->folder->parent_store)
+	if (emfv->folder && camel_folder_remote_get_parent_store(emfv->folder) && CAMEL_IS_VEE_STORE(camel_folder_remote_get_parent_store(emfv->folder))
 	    && !gconf_client_get_bool (gconf, DelInVFolderKey, NULL)) {
 		GtkWidget *dialog, *checkbox, *align;
 
-		dialog = e_error_new (NULL, "mail:ask-delete-vfolder-msg", emfv->folder->full_name, NULL);
+		dialog = e_error_new (NULL, "mail:ask-delete-vfolder-msg", camel_folder_remote_get_full_name(emfv->folder), NULL);
 		g_signal_connect (dialog, "response", G_CALLBACK (emfv_delete_msg_response), emfv);
 		checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
 		gtk_widget_set_name (checkbox, DelInVFolderCheckName);
@@ -1208,7 +1208,7 @@
 	int i;
 
 	for (i = 0; i < uids->len; i++)
-		camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, TRUE);
+		camel_folder_remote_set_message_user_flag (emfv->folder, uids->pdata[i], label, TRUE);
 
 	message_list_free_uids (emfv->list, uids);
 }
@@ -1220,8 +1220,8 @@
 	int i;
 
 	for (i = 0; i < uids->len; i++) {
-		camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, FALSE);
-		camel_folder_set_message_user_tag (emfv->folder, uids->pdata[i], "label", NULL);
+		camel_folder_remote_set_message_user_flag (emfv->folder, uids->pdata[i], label, FALSE);
+		camel_folder_remote_set_message_user_tag (emfv->folder, uids->pdata[i], "label", NULL);
 	}
 
 	message_list_free_uids (emfv->list, uids);
@@ -1391,10 +1391,10 @@
 	g_return_val_if_fail (label_tag != NULL, state);
 
 	for (i = 0; i < uids->len && (!exists || !not_exists); i++) {
-		if (camel_folder_get_message_user_flag (emfv->folder, uids->pdata[i], label_tag))
+		if (camel_folder_remote_get_message_user_flag (emfv->folder, uids->pdata[i], label_tag))
 			exists = TRUE;
 		else {
-			const char *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label"));
+			const char *label = e_util_labels_get_new_tag (camel_folder_remote_get_message_user_tag (emfv->folder, uids->pdata[i], "label"));
 
 			/* backward compatibility... */
 			if (label && !strcmp (label, label_tag))
@@ -2418,7 +2418,7 @@
 void
 em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status)
 {
-	if (emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH))
+	if (emfv->folder && (camel_folder_remote_get_folder_flags(emfv->folder) & CAMEL_FOLDER_IS_TRASH))
 		status = FALSE;
 
 	emfv->hide_deleted = status;
@@ -2673,15 +2673,15 @@
 	case '!':
 		uids = message_list_get_selected(emfv->list);
 
-		camel_folder_freeze(emfv->folder);
+		camel_folder_remote_freeze(emfv->folder);
 		for (i = 0; i < uids->len; i++) {
-			flags = camel_folder_get_message_flags(emfv->folder, uids->pdata[i]) ^ CAMEL_MESSAGE_FLAGGED;
+			flags = camel_folder_remote_get_message_flags(emfv->folder, uids->pdata[i]) ^ CAMEL_MESSAGE_FLAGGED;
 			if (flags & CAMEL_MESSAGE_FLAGGED)
 				flags &= ~CAMEL_MESSAGE_DELETED;
-			camel_folder_set_message_flags(emfv->folder, uids->pdata[i],
+			camel_folder_remote_set_message_flags(emfv->folder, uids->pdata[i],
 						       CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_DELETED, flags);
 		}
-		camel_folder_thaw(emfv->folder);
+		camel_folder_remote_thaw(emfv->folder);
 
 		message_list_free_uids(emfv->list, uids);
 		break;
@@ -3004,13 +3004,13 @@
 static void
 emfv_set_seen(EMFolderView *emfv, const char *uid)
 {
-	guint32 old_flags = camel_folder_get_message_flags(emfv->folder, uid);
+	guint32 old_flags = camel_folder_remote_get_message_flags(emfv->folder, uid);
 
 	/* If we're setting the SEEN flag on a message, handle receipt requests */
 	if (!(old_flags & CAMEL_MESSAGE_SEEN))
 		em_utils_handle_receipt(emfv->folder, uid, (CamelMimeMessage *)((EMFormat *)emfv->preview)->message);
 
-	camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+	camel_folder_remote_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
 }
 
 /* keep these two tables in sync */

Modified: branches/mail-dbus-remoting/mail/em-folder-view.h
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-view.h	(original)
+++ branches/mail-dbus-remoting/mail/em-folder-view.h	Fri Aug 29 20:25:33 2008
@@ -25,6 +25,7 @@
 
 #include <gtk/gtk.h>
 #include "mail/em-popup.h"
+#include "camel-object-remote.h"
 
 /* Standard GObject macros */
 #define EM_TYPE_FOLDER_VIEW \
@@ -84,7 +85,7 @@
 
 	struct _EMFormatHTMLDisplay *preview;
 
-	struct _CamelFolder *folder;
+	CamelObjectRemote *folder;
 	char *folder_uri;
 
 	char *displayed_uid;	/* only used to stop re-loads, don't use it to represent any selection state */

Modified: branches/mail-dbus-remoting/mail/em-format-html-display.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-format-html-display.c	(original)
+++ branches/mail-dbus-remoting/mail/em-format-html-display.c	Fri Aug 29 20:25:33 2008
@@ -1338,14 +1338,14 @@
 	char *iconpath;
 
 	if (emf->folder == NULL || emf->uid == NULL
-	    || (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL
+	    || (flag = camel_folder_remote_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL
 	    || flag[0] == 0)
 		return;
 
 	/* header displayed for message-flags in mail display */
 	camel_stream_printf(stream, "<table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>");
 
-	comp = camel_folder_get_message_user_tag(emf->folder, emf->uid, "completed-on");
+	comp = camel_folder_remote_get_message_user_tag(emf->folder, emf->uid, "completed-on");
 	iconpath = e_icon_factory_get_icon_filename (comp && comp[0] ? "stock_flag-for-followup-done" : "stock_flag-for-followup", E_ICON_SIZE_MENU);
 	if (iconpath) {
 		CamelMimePart *iconpart;
@@ -1370,7 +1370,7 @@
 		localtime_r(&date, &due_tm);
 		e_utf8_strftime_fix_am_pm(due_date, sizeof (due_date), _("Completed on %B %d, %Y, %l:%M %p"), &due_tm);
 		camel_stream_printf(stream, "%s, %s", flag, due_date);
-	} else if ((due = camel_folder_get_message_user_tag(emf->folder, emf->uid, "due-by")) != NULL && due[0]) {
+	} else if ((due = camel_folder_remote_get_message_user_tag(emf->folder, emf->uid, "due-by")) != NULL && due[0]) {
 		time_t now;
 
 		date = camel_header_decode_date(due, NULL);

Modified: branches/mail-dbus-remoting/mail/em-message-browser.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-message-browser.c	(original)
+++ branches/mail-dbus-remoting/mail/em-message-browser.c	Fri Aug 29 20:25:33 2008
@@ -114,7 +114,7 @@
 
 	/* Well we don't know if it got displayed (yet) ... but whatever ... */
 	if (!nomarkseen)
-		camel_folder_set_message_flags (
+		camel_folder_remote_set_message_flags (
 			emfv->folder, uid,
 			CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
 }

Modified: branches/mail-dbus-remoting/mail/em-popup.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-popup.c	(original)
+++ branches/mail-dbus-remoting/mail/em-popup.c	Fri Aug 29 20:25:33 2008
@@ -168,7 +168,7 @@
 em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
 {
 	EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t));
-	CamelObjectRemote *store = camel_folder_get_parent_store (folder);
+	CamelObjectRemote *store = camel_folder_remote_get_parent_store (folder);
 	guint32 mask = ~0;
 	gboolean draft_or_outbox;
 	int i;

Modified: branches/mail-dbus-remoting/mail/em-utils.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-utils.c	(original)
+++ branches/mail-dbus-remoting/mail/em-utils.c	Fri Aug 29 20:25:33 2008
@@ -786,7 +786,7 @@
 		folder = ted->folder;
 		uids = ted->uids;
 
-		camel_folder_freeze (folder);
+		camel_folder_remote_freeze (folder);
 		for (i = 0; i < uids->len; i++) {
 			CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
 
@@ -798,7 +798,7 @@
 			}
 		}
 
-		camel_folder_thaw (folder);
+		camel_folder_remote_thaw (folder);
 		camel_tag_list_free (&tags);
 
 		if (ted->emfv->preview)
@@ -889,7 +889,7 @@
 	g_return_if_fail (CAMEL_IS_FOLDER (folder));
 	g_return_if_fail (uids != NULL);
 
-	camel_folder_freeze (folder);
+	camel_folder_remote_freeze (folder);
 	for (i = 0; i < uids->len; i++) {
 		CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
 
@@ -900,7 +900,7 @@
 			camel_message_info_free(mi);
 		}
 	}
-	camel_folder_thaw (folder);
+	camel_folder_remote_thaw (folder);
 
 	em_utils_uids_free (uids);
 }
@@ -926,7 +926,7 @@
 
 	now = camel_header_format_date (time (NULL), 0);
 
-	camel_folder_freeze (folder);
+	camel_folder_remote_freeze (folder);
 	for (i = 0; i < uids->len; i++) {
 		const char *tag;
 		CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
@@ -938,7 +938,7 @@
 			camel_message_info_free(mi);
 		}
 	}
-	camel_folder_thaw (folder);
+	camel_folder_remote_thaw (folder);
 
 	g_free (now);
 
@@ -1221,7 +1221,7 @@
 	/* TODO: Handle conflicts? */
 	if (file == NULL) {
 		/* Drop filename for messages from a mailbox */
-		file = g_strdup_printf(_("Messages from %s"), folder->name);
+		file = g_strdup_printf(_("Messages from %s"), camel_folder_remote_get_name(folder));
 	}
 
 	e_filename_make_safe(file);

Modified: branches/mail-dbus-remoting/mail/mail-component.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-component.c	(original)
+++ branches/mail-dbus-remoting/mail/mail-component.c	Fri Aug 29 20:25:33 2008
@@ -552,6 +552,9 @@
 
 		selected = message_list_get_selected(emfv->list);
 
+/* Lets do this for now. Implement it in the right way later */
+		name = camel_folder_remote_get_name (emfv->folder);
+
 		/* This is so that if any of these are
 		 * shared/reused, we fallback to the standard
 		 * display behaviour */
@@ -586,7 +589,7 @@
 
 		message_list_free_uids(emfv->list, selected);
 
-		if (emfv->folder->parent_store == mail_component_peek_local_store(NULL)
+		if (camel_folder_remote_get_parent_store(emfv->folder) == mail_component_peek_local_store(NULL)
 		    && (!strcmp (name, "Drafts") || !strcmp (name, "Inbox")
 			|| !strcmp (name, "Outbox") || !strcmp (name, "Sent")))
 			use_name = _(name);
@@ -708,7 +711,7 @@
 
 		g_signal_emit_by_name (
 			emft, "folder-selected", emft, uri,
-			selected_folder->full_name, uri, selected_folder->folder_flags);
+			camel_folder_remote_get_full_name(selected_folder), uri, camel_folder_remote_get_folder_flags(selected_folder));
 	}
 
 	gtk_widget_set_sensitive (emft, TRUE);
@@ -852,10 +855,10 @@
 		int i;
 
 		uids =  camel_folder_get_uids (folder);
-		camel_folder_freeze(folder);
+		camel_folder_remote_freeze(folder);
 		for (i=0;i<uids->len;i++)
-			camel_folder_set_message_flags(folder, uids->pdata[i], CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN);
-		camel_folder_thaw(folder);
+			camel_folder_remote_set_message_flags(folder, uids->pdata[i], CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN);
+		camel_folder_remote_thaw(folder);
 		camel_folder_free_uids (folder, uids);
 	}
 }

Modified: branches/mail-dbus-remoting/mail/mail-folder-cache.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-folder-cache.c	(original)
+++ branches/mail-dbus-remoting/mail/mail-folder-cache.c	Fri Aug 29 20:25:33 2008
@@ -292,18 +292,18 @@
 
 	folder = mfi->folder;
 	if (folder) {
-		d(printf("update 1 folder '%s'\n", folder->full_name));
+		d(printf("update 1 folder '%s'\n", camel_folder_remote_get_full_name(folder)));
 		if ((count_trash && (CAMEL_IS_VTRASH_FOLDER (folder)))
 		    || folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
 		    || folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)
 		    || (count_sent && folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))) {
 			d(printf(" total count\n"));
-			unread = camel_folder_get_message_count (folder);
+			unread = camel_folder_remote_get_message_count (folder);
 			if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
 					|| folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
 				guint32 junked = 0;
 
-				if ((deleted = camel_folder_get_deleted_message_count (folder)) > 0)
+				if ((deleted = camel_folder_remote_get_deleted_message_count (folder)) > 0)
 					unread -= deleted;
 
 				camel_object_get (folder, NULL, CAMEL_FOLDER_JUNKED, &junked, NULL);
@@ -316,7 +316,7 @@
 			if (info)
 				unread = info->unread;
 			else
-				unread = camel_folder_get_unread_message_count (folder);
+				unread = camel_folder_remote_get_unread_message_count (folder);
 		}
 	} else if (info)
 		unread = info->unread;
@@ -393,7 +393,7 @@
 	static time_t last_newmail = 0;
 	CamelFolderChangeInfo *changes = event_data;
 	CamelFolder *folder = (CamelFolder *)o;
-	CamelObjectRemote *store = folder->parent_store;
+	CamelObjectRemote *store = camel_folder_remote_get_parent_store(folder);
 	CamelMessageInfo *info;
 	struct _store_info *si;
 	struct _folder_info *mfi;
@@ -401,7 +401,7 @@
 	int i;
 	guint32 flags;
 
-	d(printf("folder '%s' changed\n", folder->full_name));
+	d(printf("folder '%s' changed\n", camel_folder_remote_get_full_name(folder)));
 
 	if (!CAMEL_IS_VEE_FOLDER(folder)
 	    && folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
@@ -429,7 +429,7 @@
 	LOCK(info_lock);
 	if (stores != NULL
 	    && (si = g_hash_table_lookup(stores, store)) != NULL
-	    && (mfi = g_hash_table_lookup(si->folders, folder->full_name)) != NULL
+	    && (mfi = g_hash_table_lookup(si->folders, camel_folder_remote_get_full_name(folder))) != NULL
 	    && mfi->folder == folder) {
 		update_1folder(mfi, new, NULL);
 	}
@@ -440,7 +440,7 @@
 folder_finalised(CamelObject *o, gpointer event_data, gpointer user_data)
 {
 	CamelFolder *folder = (CamelFolder *)o;
-	CamelObjectRemote *store = folder->parent_store;
+	CamelObjectRemote *store = camel_folder_remote_get_parent_store(folder);
 	struct _store_info *si;
 	struct _folder_info *mfi;
 
@@ -448,7 +448,7 @@
 	LOCK(info_lock);
 	if (stores != NULL
 	    && (si = g_hash_table_lookup(stores, store)) != NULL
-	    && (mfi = g_hash_table_lookup(si->folders, folder->full_name)) != NULL
+	    && (mfi = g_hash_table_lookup(si->folders, camel_folder_remote_get_full_name(folder))) != NULL
 	    && mfi->folder == folder) {
 		mfi->folder = NULL;
 	}
@@ -461,7 +461,7 @@
 	CamelFolder *folder = (CamelFolder *)o;
 	char *old = event_data;
 
-	d(printf("Folder renamed from '%s' to '%s'\n", old, folder->full_name));
+	d(printf("Folder renamed from '%s' to '%s'\n", old, camel_folder_remote_get_full_name(folder)));
 
 	old = old;
 	folder = folder;
@@ -470,16 +470,16 @@
 
 void mail_note_folder(CamelFolder *folder)
 {
-	CamelObjectRemote *store = folder->parent_store;
+	CamelObjectRemote *store = camel_folder_remote_get_parent_store(folder);
 	struct _store_info *si;
 	struct _folder_info *mfi;
 
-	d(printf("noting folder '%s'\n", folder->full_name));
+	d(printf("noting folder '%s'\n", camel_folder_remote_get_full_name(folder)));
 
 	LOCK(info_lock);
 	if (stores == NULL
 	    || (si = g_hash_table_lookup(stores, store)) == NULL
-	    || (mfi = g_hash_table_lookup(si->folders, folder->full_name)) == NULL) {
+	    || (mfi = g_hash_table_lookup(si->folders, camel_folder_remote_get_full_name(folder))) == NULL) {
 		w(g_warning("Noting folder before store initialised"));
 		UNLOCK(info_lock);
 		return;

Modified: branches/mail-dbus-remoting/mail/mail-ops.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-ops.c	(original)
+++ branches/mail-dbus-remoting/mail/mail-ops.c	Fri Aug 29 20:25:33 2008
@@ -146,7 +146,7 @@
 
 	/* sync our source folder */
 	if (!m->cache)
-		camel_folder_sync (folder, FALSE, camel_exception_is_set (&m->base.ex) ? NULL : &m->base.ex);
+		camel_folder_remote_sync (folder, FALSE, camel_exception_is_set (&m->base.ex) ? NULL : &m->base.ex);
 	camel_folder_remote_thaw (folder);
 
 	if (m->destination)
@@ -340,13 +340,13 @@
 					/* not keep on server - just delete all the actual messages on the server */
 					for (i=0;i<folder_uids->len;i++) {
 						d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i]));
-						camel_folder_delete_message(folder, folder_uids->pdata[i]);
+						camel_folder_remote_delete_message(folder, folder_uids->pdata[i]);
 					}
 				}
 
 				if (fm->delete || cache_uids) {
 					/* expunge messages (downloaded so far) */
-					camel_folder_sync(folder, fm->delete, NULL);
+					camel_folder_remote_sync(folder, fm->delete, NULL);
 				}
 
 				camel_uid_cache_destroy (cache);
@@ -628,7 +628,7 @@
 		}
 	}
 	if (!camel_exception_is_set(ex))
-		camel_folder_set_message_flags (queue, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
+		camel_folder_remote_set_message_flags (queue, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
 
 	if (err->len) {
 		/* set the culmulative exception report */
@@ -637,7 +637,7 @@
 
 exit:
 	if (folder) {
-		camel_folder_sync(folder, FALSE, NULL);
+		camel_folder_remote_sync(folder, FALSE, NULL);
 		camel_object_unref(folder);
 	}
 	if (info)
@@ -779,11 +779,11 @@
 	camel_folder_free_uids (m->queue, uids);
 	g_ptr_array_free (send_uids, TRUE);
 
-	camel_folder_sync (m->queue, TRUE, &ex);
+	camel_folder_remote_sync (m->queue, TRUE, &ex);
 	camel_exception_clear (&ex);
 
 	if (sent_folder) {
-		camel_folder_sync (sent_folder, FALSE, &ex);
+		camel_folder_remote_sync (sent_folder, FALSE, &ex);
 		camel_exception_clear (&ex);
 	}
  
@@ -982,13 +982,13 @@
 		int i;
 
 		for (i = 0; i < m->uids->len; i++)
-			camel_folder_set_message_flags (m->source, m->uids->pdata[i],
+			camel_folder_remote_set_message_flags (m->source, m->uids->pdata[i],
 							CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
 	}
 
 	camel_folder_remote_thaw (m->source);
 	camel_folder_remote_thaw (dest);
-	camel_folder_sync (dest, FALSE, NULL);
+	camel_folder_remote_sync (dest, FALSE, NULL);
 	camel_object_unref (dest);
 }
 
@@ -1274,7 +1274,7 @@
 static gchar *
 get_quota_desc (struct _get_quota_msg *m)
 {
-	return g_strdup_printf(_("Retrieving quota information for folder %s"), camel_folder_get_name(m->folder));
+	return g_strdup_printf(_("Retrieving quota information for folder %s"), camel_folder_remote_get_name(m->folder));
 }
 
 static void
@@ -1437,8 +1437,8 @@
 	uids = camel_folder_get_uids (folder);
 	camel_folder_remote_freeze(folder);
 	for (i = 0; i < uids->len; i++)
-		camel_folder_delete_message (folder, uids->pdata[i]);
-	camel_folder_sync (folder, TRUE, NULL);
+		camel_folder_remote_delete_message (folder, uids->pdata[i]);
+	camel_folder_remote_sync (folder, TRUE, NULL);
 	camel_folder_remote_thaw(folder);
 	camel_folder_free_uids (folder, uids);
 
@@ -1510,7 +1510,7 @@
 static void
 sync_folder_exec (struct _sync_folder_msg *m)
 {
-	camel_folder_sync(m->folder, FALSE, &m->base.ex);
+	camel_folder_remote_sync(m->folder, FALSE, &m->base.ex);
 }
 
 static void
@@ -1672,7 +1672,7 @@
 static void
 expunge_folder_exec (struct _sync_folder_msg *m)
 {
-	camel_folder_expunge(m->folder, &m->base.ex);
+	camel_folder_remote_expunge(m->folder, &m->base.ex);
 }
 
 /* we just use the sync stuff where we can, since it would be the same */
@@ -1737,7 +1737,7 @@
 	}
 
 	if (trash)
-		camel_folder_expunge (trash, &m->base.ex);
+		camel_folder_remote_expunge (trash, &m->base.ex);
 
 	camel_object_unref (trash);
 }
@@ -2257,7 +2257,7 @@
 		}
 		/* prepare_for_offline should do this? */
 		/* of course it should all be atomic, but ... */
-		camel_folder_sync(folder, FALSE, NULL);
+		camel_folder_remote_sync(folder, FALSE, NULL);
 		camel_object_unref(folder);
 	}
 

Modified: branches/mail-dbus-remoting/mail/mail-send-recv.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-send-recv.c	(original)
+++ branches/mail-dbus-remoting/mail/mail-send-recv.c	Fri Aug 29 20:25:33 2008
@@ -811,7 +811,7 @@
 	for (i=0;i<m->folders->len;i++) {
 		folder = mail_tool_uri_to_folder(m->folders->pdata[i], 0, &ex);
 		if (folder) {
-			camel_folder_sync (folder, FALSE, &ex);
+			camel_folder_remote_sync (folder, FALSE, &ex);
 			camel_exception_clear(&ex);
 			camel_folder_refresh_info(folder, &ex);
 			camel_exception_clear(&ex);

Modified: branches/mail-dbus-remoting/mail/mail-vfolder.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-vfolder.c	(original)
+++ branches/mail-dbus-remoting/mail/mail-vfolder.c	Fri Aug 29 20:25:33 2008
@@ -750,7 +750,7 @@
 		g_free(oldname);
 	}
 
-	d(printf("Filter rule changed? for folder '%s'!!\n", folder->name));
+	d(printf("Filter rule changed? for folder '%s'!!\n", camel_folder_remote_get_name(folder)));
 
 	/* find any (currently available) folders, and add them to the ones to open */
 	rule_add_sources(((EMVFolderRule *)rule)->sources, &sources_folder, &sources_uri);

Modified: branches/mail-dbus-remoting/mail/message-list.c
==============================================================================
--- branches/mail-dbus-remoting/mail/message-list.c	(original)
+++ branches/mail-dbus-remoting/mail/message-list.c	Fri Aug 29 20:25:33 2008
@@ -822,7 +822,7 @@
 
 			camel_folder_remote_freeze(ml->folder);
 			for (i=0;i<uids->len;i++)
-				camel_folder_set_message_flags(ml->folder, uids->pdata[i],
+				camel_folder_remote_set_message_flags(ml->folder, uids->pdata[i],
 							       CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED,
 							       CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED);
 
@@ -3467,7 +3467,7 @@
 			flag |= CAMEL_MESSAGE_DELETED;
 	}
 
-	camel_folder_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~flags);
+	camel_folder_remote_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~flags);
 
 	if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) {
 		g_source_remove (list->seen_id);
@@ -3935,7 +3935,7 @@
 	e_profile_event_emit("list.getuids", camel_folder_remote_get_name (m->folder), 0);
 
 	/* if we have hidedeleted on, use a search to find it out, merge with existing search if set */
-	if (!camel_folder_has_search_capability(m->folder)) {
+	if (!camel_folder_remote_has_search_capability(m->folder)) {
 		/* if we have no search capability, dont let search or hide deleted work */
 		expr = NULL;
 	} else if (m->hidedel) {
@@ -3986,7 +3986,7 @@
 
 			/* cursor_uid has been filtered out */
 			if (i == uids->len) {
-				gboolean was_deleted = (camel_folder_get_message_flags (m->folder, looking_for) & CAMEL_MESSAGE_DELETED) != 0;
+				gboolean was_deleted = (camel_folder_remote_get_message_flags (m->folder, looking_for) & CAMEL_MESSAGE_DELETED) != 0;
 
 				/* I would really like to check for CAMEL_MESSAGE_FOLDER_FLAGGED on a message,
 				   so I would know whether it was changed locally, and then just check the changes
@@ -4004,7 +4004,7 @@
 		return;
 
 	/* perform hiding */
-	if (m->hideexpr && camel_folder_has_search_capability(m->folder)) {
+	if (m->hideexpr && camel_folder_remote_has_search_capability(m->folder)) {
 		uidnew = camel_folder_search_by_expression (m->ml->folder, m->hideexpr, &m->base.ex);
 		/* well, lets not abort just because this faileld ... */
 		camel_exception_clear (&m->base.ex);



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