evolution r36175 - branches/mail-dbus-remoting/mail
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36175 - branches/mail-dbus-remoting/mail
- Date: Thu, 28 Aug 2008 18:03:36 +0000 (UTC)
Author: psankar
Date: Thu Aug 28 18:03:35 2008
New Revision: 36175
URL: http://svn.gnome.org/viewvc/evolution?rev=36175&view=rev
Log:
CamelFolder to CamelFolderRemote
Assume some apis in camel-folder-remote..h
Modified:
branches/mail-dbus-remoting/mail/em-folder-tree-model.c
branches/mail-dbus-remoting/mail/mail-ops.c
branches/mail-dbus-remoting/mail/mail-ops.h
branches/mail-dbus-remoting/mail/message-list.c
branches/mail-dbus-remoting/mail/message-list.h
Modified: branches/mail-dbus-remoting/mail/em-folder-tree-model.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-tree-model.c (original)
+++ branches/mail-dbus-remoting/mail/em-folder-tree-model.c Thu Aug 28 18:03:35 2008
@@ -445,7 +445,7 @@
GtkTreePath *path;
GtkTreeIter sub;
gboolean load = FALSE;
- struct _CamelFolder *folder;
+ CamelFolderRemote *folder;
gboolean emitted = FALSE;
const char *name;
guint32 flags;
@@ -473,8 +473,8 @@
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) {
int total;
- if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ if ((total = camel_folder_remote_get_message_count (folder)) > 0) {
+ int deleted = camel_folder_remote_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
@@ -485,8 +485,8 @@
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
int total;
- if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ if ((total = camel_folder_remote_get_message_count (folder)) > 0) {
+ int deleted = camel_folder_remote_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
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 Thu Aug 28 18:03:35 2008
@@ -77,13 +77,13 @@
struct _filter_mail_msg {
MailMsg base;
- CamelFolder *source_folder; /* where they come from */
+ CamelFolderRemote *source_folder; /* where they come from */
GPtrArray *source_uids; /* uids to copy, or NULL == copy all */
CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
CamelOperation *cancel;
CamelFilterDriver *driver;
int delete; /* delete messages after filtering them? */
- CamelFolder *destination; /* default destination for any messages, NULL for none */
+ CamelFolderRemote *destination; /* default destination for any messages, NULL for none */
};
/* since fetching also filters, we subclass the data here */
@@ -110,7 +110,7 @@
static void
em_filter_folder_element_exec (struct _filter_mail_msg *m)
{
- CamelFolder *folder;
+ CamelFolderRemote *folder;
GPtrArray *uids, *folder_uids = NULL;
if (m->cancel)
@@ -118,18 +118,18 @@
folder = m->source_folder;
- if (folder == NULL || camel_folder_get_message_count (folder) == 0) {
+ if (folder == NULL || camel_folder_remote_get_message_count (folder) == 0) {
if (m->cancel)
camel_operation_unregister (m->cancel);
return;
}
if (m->destination) {
- camel_folder_freeze (m->destination);
+ camel_folder_remote_freeze (m->destination);
camel_filter_driver_set_default_folder (m->driver, m->destination);
}
- camel_folder_freeze (folder);
+ camel_folder_remote_freeze (folder);
if (m->source_uids)
uids = m->source_uids;
@@ -145,10 +145,10 @@
/* 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_thaw (folder);
+ camel_folder_remote_thaw (folder);
if (m->destination)
- camel_folder_thaw (m->destination);
+ camel_folder_remote_thaw (m->destination);
/* this may thaw/unref source folders, do it here so we dont do it in the main thread
see also fetch_mail_fetch() below */
@@ -194,7 +194,7 @@
};
void
-mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
+mail_filter_folder (CamelFolderRemote *source_folder, GPtrArray *uids,
const char *type, gboolean notify,
CamelOperation *cancel)
{
@@ -224,13 +224,13 @@
/* convenience functions for it */
void
-mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids)
+mail_filter_on_demand (CamelFolderRemote *folder, GPtrArray *uids)
{
mail_filter_folder (folder, uids, FILTER_SOURCE_DEMAND, FALSE, NULL);
}
void
-mail_filter_junk (CamelFolder *folder, GPtrArray *uids)
+mail_filter_junk (CamelFolderRemote *folder, GPtrArray *uids)
{
mail_filter_folder (folder, uids, FILTER_SOURCE_JUNKTEST, FALSE, NULL);
}
@@ -288,17 +288,17 @@
char *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex);
if (path && !camel_exception_is_set (&fm->base.ex)) {
- camel_folder_freeze (fm->destination);
+ camel_folder_remote_freeze (fm->destination);
camel_filter_driver_set_default_folder (fm->driver, fm->destination);
camel_filter_driver_filter_mbox (fm->driver, path, m->source_uri, &fm->base.ex);
- camel_folder_thaw (fm->destination);
+ camel_folder_remote_thaw (fm->destination);
if (!camel_exception_is_set (&fm->base.ex))
g_unlink (path);
}
g_free (path);
} else {
- CamelFolder *folder = fm->source_folder = mail_tool_get_inbox (m->source_uri, &fm->base.ex);
+ CamelFolderRemote *folder = fm->source_folder = mail_tool_get_inbox (m->source_uri, &fm->base.ex);
if (folder) {
/* this handles 'keep on server' stuff, if we have any new uid's to copy
@@ -306,7 +306,7 @@
CamelUIDCache *cache = NULL;
char *cachename;
- cachename = uid_cachename_hack (folder->parent_store);
+ cachename = uid_cachename_hack (camel_folder_remote_get_parent_store (folder));
cache = camel_uid_cache_new (cachename);
g_free (cachename);
@@ -446,7 +446,7 @@
/* send 1 message to a specific transport */
static void
-mail_send_message(CamelFolder *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex)
+mail_send_message(CamelFolderRemote *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex)
{
EAccount *account = NULL;
const CamelInternetAddress *iaddr;
@@ -456,7 +456,7 @@
char *transport_url = NULL;
char *sent_folder_uri = NULL;
const char *resent_from, *tmp;
- CamelFolder *folder = NULL;
+ CamelFolderRemote *folder = NULL;
GString *err = NULL;
struct _camel_header_raw *xev, *header;
CamelMimeMessage *message;
@@ -590,7 +590,7 @@
camel_folder_append_message (folder, message, info, NULL, ex);
if (camel_exception_is_set (ex)) {
- CamelFolder *sent_folder;
+ CamelFolderRemote *sent_folder;
if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_USER_CANCEL)
goto exit;
@@ -658,7 +658,7 @@
struct _send_queue_msg {
MailMsg base;
- CamelFolder *queue;
+ CamelFolderRemote *queue;
char *destination;
CamelFilterDriver *driver;
@@ -690,7 +690,7 @@
static void
send_queue_exec (struct _send_queue_msg *m)
{
- CamelFolder *sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
+ CamelFolderRemote *sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
GPtrArray *uids, *send_uids = NULL;
CamelException ex;
int i, j;
@@ -823,7 +823,7 @@
/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
void
-mail_send_queue(CamelFolder *queue, const char *destination,
+mail_send_queue(CamelFolderRemote *queue, const char *destination,
const char *type, CamelOperation *cancel,
CamelFilterGetFolderFunc get_folder, void *get_data,
CamelFilterStatusFunc *status, void *status_data,
@@ -859,12 +859,12 @@
struct _append_msg {
MailMsg base;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
CamelMimeMessage *message;
CamelMessageInfo *info;
char *appended_uid;
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data);
+ void (*done)(CamelFolderRemote *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data);
void *data;
};
@@ -905,8 +905,8 @@
};
void
-mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data),
+mail_append_mail (CamelFolderRemote *folder, CamelMimeMessage *message, CamelMessageInfo *info,
+ void (*done)(CamelFolderRemote *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data),
void *data)
{
struct _append_msg *m;
@@ -936,7 +936,7 @@
struct _transfer_msg {
MailMsg base;
- CamelFolder *source;
+ CamelFolderRemote *source;
GPtrArray *uids;
gboolean delete;
char *dest_uri;
@@ -957,7 +957,7 @@
static void
transfer_messages_exec (struct _transfer_msg *m)
{
- CamelFolder *dest;
+ CamelFolderRemote *dest;
dest = mail_tool_uri_to_folder (m->dest_uri, m->dest_flags, &m->base.ex);
if (camel_exception_is_set (&m->base.ex))
@@ -969,8 +969,8 @@
return;
}
- camel_folder_freeze (m->source);
- camel_folder_freeze (dest);
+ camel_folder_remote_freeze (m->source);
+ camel_folder_remote_freeze (dest);
camel_folder_transfer_messages_to (m->source, m->uids, dest, NULL, m->delete, &m->base.ex);
@@ -984,8 +984,8 @@
CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
- camel_folder_thaw (m->source);
- camel_folder_thaw (dest);
+ camel_folder_remote_thaw (m->source);
+ camel_folder_remote_thaw (dest);
camel_folder_sync (dest, FALSE, NULL);
camel_object_unref (dest);
}
@@ -1014,7 +1014,7 @@
};
void
-mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
+mail_transfer_messages (CamelFolderRemote *source, GPtrArray *uids,
gboolean delete_from_source,
const char *dest_uri,
guint32 dest_flags,
@@ -1131,12 +1131,12 @@
/* ** ATTACH MESSAGES ****************************************************** */
struct _build_data {
- void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data);
+ void (*done)(CamelFolderRemote *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data);
void *data;
};
static void
-do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
+do_build_attachment (CamelFolderRemote *folder, GPtrArray *uids, GPtrArray *messages, void *data)
{
struct _build_data *d = data;
CamelMultipart *multipart;
@@ -1178,8 +1178,8 @@
}
void
-mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data)
+mail_build_attachment(CamelFolderRemote *folder, GPtrArray *uids,
+ void (*done)(CamelFolderRemote *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data)
{
struct _build_data *d;
@@ -1199,8 +1199,8 @@
char *uri;
guint32 flags;
- CamelFolder *folder;
- void (*done) (char *uri, CamelFolder *folder, void *data);
+ CamelFolderRemote *folder;
+ void (*done) (char *uri, CamelFolderRemote *folder, void *data);
void *data;
};
@@ -1241,7 +1241,7 @@
int
mail_get_folder (const char *uri, guint32 flags,
- void (*done)(char *uri, CamelFolder *folder, void *data),
+ void (*done)(char *uri, CamelFolderRemote *folder, void *data),
void *data, MailMsgDispatchFunc dispatch)
{
struct _get_folder_msg *m;
@@ -1263,9 +1263,9 @@
struct _get_quota_msg {
MailMsg base;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
CamelFolderQuotaInfo *quota;
- void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data);
+ void (*done) (CamelFolderRemote *folder, CamelFolderQuotaInfo *quota, void *data);
void *data;
};
@@ -1306,8 +1306,8 @@
};
int
-mail_get_folder_quota (CamelFolder *folder,
- void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data),
+mail_get_folder_quota (CamelFolderRemote *folder,
+ void (*done)(CamelFolderRemote *folder, CamelFolderQuotaInfo *quota, void *data),
void *data, MailMsgDispatchFunc dispatch)
{
struct _get_quota_msg *m;
@@ -1419,7 +1419,7 @@
remove_folder_exec (struct _remove_folder_msg *m)
{
CamelObjectRemote *store;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
GPtrArray *uids;
int i;
@@ -1429,23 +1429,23 @@
if (!folder)
return;
- store = folder->parent_store;
+ store = camel_folder_remote_get_parent_store (folder);
/* Delete every message in this folder, then expunge it */
uids = camel_folder_get_uids (folder);
- 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_sync (folder, TRUE, NULL);
- camel_folder_thaw(folder);
+ camel_folder_remote_thaw(folder);
camel_folder_free_uids (folder, uids);
/* if the store supports subscriptions, unsubscribe from this folder... */
if (camel_store_supports_subscriptions_remote (store))
- camel_store_unsubscribe_folder_remote (store, folder->full_name, NULL);
+ camel_store_unsubscribe_folder_remote (store, camel_folder_remote_get_full_name (folder), NULL);
/* Then delete the folder from the store */
- camel_store_delete_folder_remote (store, folder->full_name, &m->base.ex);
+ camel_store_delete_folder_remote (store, camel_folder_remote_get_full_name (folder), &m->base.ex);
m->removed = !camel_exception_is_set (&m->base.ex);
camel_object_unref (folder);
}
@@ -1493,8 +1493,8 @@
struct _sync_folder_msg {
MailMsg base;
- CamelFolder *folder;
- void (*done) (CamelFolder *folder, void *data);
+ CamelFolderRemote *folder;
+ void (*done) (CamelFolderRemote *folder, void *data);
void *data;
};
@@ -1533,7 +1533,7 @@
};
void
-mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_sync_folder(CamelFolderRemote *folder, void (*done) (CamelFolderRemote *folder, void *data), void *data)
{
struct _sync_folder_msg *m;
@@ -1641,7 +1641,7 @@
};
void
-mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_refresh_folder(CamelFolderRemote *folder, void (*done) (CamelFolderRemote *folder, void *data), void *data)
{
struct _sync_folder_msg *m;
@@ -1678,7 +1678,7 @@
};
void
-mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_expunge_folder(CamelFolderRemote *folder, void (*done) (CamelFolderRemote *folder, void *data), void *data)
{
struct _sync_folder_msg *m;
@@ -1717,7 +1717,7 @@
empty_trash_exec (struct _empty_trash_msg *m)
{
const char *evolution_dir;
- CamelFolder *trash;
+ CamelFolderRemote *trash;
char *uri;
if (m->account) {
@@ -1777,9 +1777,9 @@
struct _get_message_msg {
MailMsg base;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
char *uid;
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data);
+ void (*done) (CamelFolderRemote *folder, const char *uid, CamelMimeMessage *msg, void *data);
void *data;
CamelMimeMessage *message;
CamelOperation *cancel;
@@ -1824,7 +1824,7 @@
};
void
-mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid,
+mail_get_message(CamelFolderRemote *folder, const char *uid, void (*done) (CamelFolderRemote *folder, const char *uid,
CamelMimeMessage *msg, void *data),
void *data, MailMsgDispatchFunc dispatch)
{
@@ -1835,13 +1835,13 @@
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolderRemote *, const char *, CamelMimeMessage *, void *)) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
}
-typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *);
+typedef void (*get_done)(CamelFolderRemote *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *);
static void
get_messagex_done (struct _get_message_msg *m)
@@ -1863,7 +1863,7 @@
/* This is temporary, to avoid having to rewrite everything that uses
mail_get_message; it adds an exception argument to the callback */
void
-mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
+mail_get_messagex(CamelFolderRemote *folder, const char *uid, void (*done) (CamelFolderRemote *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
void *data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
@@ -1873,7 +1873,7 @@
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolderRemote *, const char *, CamelMimeMessage *, void *)) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
@@ -1884,11 +1884,11 @@
struct _get_messages_msg {
MailMsg base;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
GPtrArray *uids;
GPtrArray *messages;
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data);
+ void (*done) (CamelFolderRemote *folder, GPtrArray *uids, GPtrArray *msgs, void *data);
void *data;
};
@@ -1948,8 +1948,8 @@
};
void
-mail_get_messages(CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
+mail_get_messages(CamelFolderRemote *folder, GPtrArray *uids,
+ void (*done) (CamelFolderRemote *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
void *data)
{
struct _get_messages_msg *m;
@@ -1970,10 +1970,10 @@
struct _save_messages_msg {
MailMsg base;
- CamelFolder *folder;
+ CamelFolderRemote *folder;
GPtrArray *uids;
char *path;
- void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data);
+ void (*done)(CamelFolderRemote *folder, GPtrArray *uids, char *path, void *data);
void *data;
};
@@ -2095,8 +2095,8 @@
};
int
-mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data)
+mail_save_messages(CamelFolderRemote *folder, GPtrArray *uids, const char *path,
+ void (*done) (CamelFolderRemote *folder, GPtrArray *uids, char *path, void *data), void *data)
{
struct _save_messages_msg *m;
int id;
@@ -2234,7 +2234,7 @@
static void
prep_offline_exec (struct _prep_offline_msg *m)
{
- CamelFolder *folder;
+ CamelFolderRemote *folder;
if (m->cancel)
camel_operation_register(m->cancel);
Modified: branches/mail-dbus-remoting/mail/mail-ops.h
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-ops.h (original)
+++ branches/mail-dbus-remoting/mail/mail-ops.h Thu Aug 28 18:03:35 2008
@@ -33,6 +33,7 @@
#include "mail-mt.h"
#include "camel-object-remote.h"
+#include "camel-folder-remote.h"
#include "camel/camel-folder.h"
#include "camel/camel-filter-driver.h"
#include "camel/camel-mime-message.h"
@@ -40,12 +41,12 @@
#include "libedataserver/e-account.h"
-void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
+void mail_append_mail (CamelFolderRemote *folder, CamelMimeMessage *message, CamelMessageInfo *info,
+ void (*done)(CamelFolderRemote *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
const char *appended_uid, void *data),
void *data);
-void mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
+void mail_transfer_messages (CamelFolderRemote *source, GPtrArray *uids,
gboolean delete_from_source,
const char *dest_uri,
guint32 dest_flags,
@@ -53,29 +54,29 @@
void *data);
/* get a single message, asynchronously */
-void mail_get_message (CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data),
+void mail_get_message (CamelFolderRemote *folder, const char *uid,
+ void (*done) (CamelFolderRemote *folder, const char *uid, CamelMimeMessage *msg, void *data),
void *data,
MailMsgDispatchFunc dispatch);
void
-mail_get_messagex(CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
+mail_get_messagex(CamelFolderRemote *folder, const char *uid,
+ void (*done) (CamelFolderRemote *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
void *data, MailMsgDispatchFunc dispatch);
/* get several messages */
-void mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
+void mail_get_messages (CamelFolderRemote *folder, GPtrArray *uids,
+ void (*done) (CamelFolderRemote *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
void *data);
/* same for a folder */
int mail_get_folder (const char *uri, guint32 flags,
- void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
+ void (*done) (char *uri, CamelFolderRemote *folder, void *data), void *data,
MailMsgDispatchFunc dispatch);
/* get quota information for a folder */
-int mail_get_folder_quota (CamelFolder *folder,
- void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data),
+int mail_get_folder_quota (CamelFolderRemote *folder,
+ void (*done)(CamelFolderRemote *folder, CamelFolderQuotaInfo *quota, void *data),
void *data, MailMsgDispatchFunc dispatch);
/* and for a store */
@@ -83,23 +84,23 @@
void (*done) (char *uri, CamelObjectRemote *store, void *data), void *data);
/* build an attachment */
-void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages,
+void mail_build_attachment (CamelFolderRemote *folder, GPtrArray *uids,
+ void (*done)(CamelFolderRemote *folder, GPtrArray *messages,
CamelMimePart *part, char *subject, void *data),
void *data);
-void mail_sync_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data), void *data);
+void mail_sync_folder (CamelFolderRemote *folder,
+ void (*done) (CamelFolderRemote *folder, void *data), void *data);
void mail_sync_store(CamelObjectRemote *store, int expunge,
void (*done) (CamelObjectRemote *store, void *data), void *data);
-void mail_refresh_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
+void mail_refresh_folder (CamelFolderRemote *folder,
+ void (*done) (CamelFolderRemote *folder, void *data),
void *data);
-void mail_expunge_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
+void mail_expunge_folder (CamelFolderRemote *folder,
+ void (*done) (CamelFolderRemote *folder, void *data),
void *data);
void mail_empty_trash (EAccount *account,
@@ -119,12 +120,12 @@
/* transfer (copy/move) a folder */
void mail_xfer_folder (const char *src_uri, const char *dest_uri, gboolean remove_source,
void (*done) (char *src_uri, char *dest_uri, gboolean remove_source,
- CamelFolder *folder, void *data),
+ CamelFolderRemote *folder, void *data),
void *data);
/* save messages */
-int mail_save_messages (CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data),
+int mail_save_messages (CamelFolderRemote *folder, GPtrArray *uids, const char *path,
+ void (*done) (CamelFolderRemote *folder, GPtrArray *uids, char *path, void *data),
void *data);
int mail_save_part (CamelMimePart *part, const char *path,
@@ -132,7 +133,7 @@
void *data, gboolean readonly);
/* yeah so this is messy, but it does a lot, maybe i can consolidate all user_data's to be the one */
-void mail_send_queue (CamelFolder *queue, const char *destination,
+void mail_send_queue (CamelFolderRemote *queue, const char *destination,
const char *type, CamelOperation *cancel,
CamelFilterGetFolderFunc get_folder, void *get_data,
CamelFilterStatusFunc *status, void *status_data,
@@ -146,13 +147,13 @@
void (*done)(char *source, void *data),
void *data);
-void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
+void mail_filter_folder (CamelFolderRemote *source_folder, GPtrArray *uids,
const char *type, gboolean notify,
CamelOperation *cancel);
/* convenience functions for above */
-void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
-void mail_filter_junk (CamelFolder *folder, GPtrArray *uids);
+void mail_filter_on_demand (CamelFolderRemote *folder, GPtrArray *uids);
+void mail_filter_junk (CamelFolderRemote *folder, GPtrArray *uids);
/* Work Offline */
void mail_prep_offline(const char *uri, CamelOperation *cancel,
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 Thu Aug 28 18:03:35 2008
@@ -100,7 +100,7 @@
struct _MLSelection {
GPtrArray *uids;
- CamelFolder *folder;
+ CamelObjectRemote *folder;
char *folder_uri;
};
@@ -820,13 +820,13 @@
if (cut) {
int i;
- camel_folder_freeze(ml->folder);
+ camel_folder_remote_freeze(ml->folder);
for (i=0;i<uids->len;i++)
camel_folder_set_message_flags(ml->folder, uids->pdata[i],
CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED,
CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED);
- camel_folder_thaw(ml->folder);
+ camel_folder_remote_thaw(ml->folder);
}
p->clipboard.uids = uids;
@@ -1429,7 +1429,7 @@
}
case COL_LOCATION: {
/* Fixme : freeing memory stuff (mem leaks) */
- CamelFolder *folder;
+ CamelObjectRemote *folder;
CamelURL *curl;
EAccount *account;
char *location = NULL;
@@ -1845,7 +1845,7 @@
"uniform_row_height", TRUE,
NULL);
- name = camel_store_get_service_name_remote (CAMEL_SERVICE (message_list->folder->parent_store), TRUE);
+ name = camel_store_get_service_name_remote (CAMEL_SERVICE (camel_folder_remote_get_parent_store(message_list->folder)), TRUE);
d(printf ("folder name is '%s'\n", name));
path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
@@ -1936,7 +1936,7 @@
/* Only selection->data and selection->length are valid */
GtkSelectionData *selection;
- CamelFolder *folder;
+ CamelObjectRemote *folder;
guint32 action;
guint info;
@@ -1950,9 +1950,9 @@
ml_drop_async_desc (struct _drop_msg *m)
{
if (m->move)
- return g_strdup_printf(_("Moving messages into folder %s"), m->folder->full_name);
+ return g_strdup_printf(_("Moving messages into folder %s"), camel_folder_remote_get_name (m->folder));
else
- return g_strdup_printf(_("Copying messages into folder %s"), m->folder->full_name);
+ return g_strdup_printf(_("Copying messages into folder %s"), camel_folder_remote_get_name (m->folder));
}
static void
@@ -2565,8 +2565,8 @@
g_return_val_if_fail (info != NULL, FALSE);
/* check folder type */
- is_junk_folder = ml->folder->folder_flags & CAMEL_FOLDER_IS_JUNK;
- is_trash_folder = ml->folder->folder_flags & CAMEL_FOLDER_IS_TRASH;
+ is_junk_folder = camel_folder_remote_get_folder_flags (ml->folder) & CAMEL_FOLDER_IS_JUNK;
+ is_trash_folder = camel_folder_remote_get_folder_flags (ml->folder) & CAMEL_FOLDER_IS_TRASH;
/* check flags set on current message */
flags = camel_message_info_flags (info);
@@ -3138,7 +3138,7 @@
static void
-mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag)
+mail_folder_hide_by_flag (CamelObjectRemote *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag)
{
CamelFolderChangeInfo *newchanges, *oldchanges = *changes;
CamelMessageInfo *info;
@@ -3181,7 +3181,7 @@
{
MessageList *ml = MESSAGE_LIST (user_data);
CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data;
- CamelFolder *folder = (CamelFolder *)o;
+ CamelObjectRemote *folder = (CamelObjectRemote *)o;
int i;
/* may be NULL if we're in the process of being destroyed */
@@ -3254,7 +3254,7 @@
* the "Outgoing folder" column view.
**/
void
-message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing)
+message_list_set_folder (MessageList *message_list, CamelFolderRemote *folder, const char *uri, gboolean outgoing)
{
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
@@ -3320,7 +3320,7 @@
message_list->just_set_folder = TRUE;
/* Setup the strikeout effect for non-trash folders */
- if (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH))
+ if (!(camel_folder_remote_get_folder_flags (folder) & CAMEL_FOLDER_IS_TRASH))
strikeout_col = COL_DELETED;
cell = e_table_extras_get_cell (message_list->extras, "render_date");
@@ -3345,8 +3345,8 @@
gconf = mail_config_get_gconf_client ();
hide_deleted = !gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_deleted", NULL);
- message_list->hidedeleted = hide_deleted && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
- message_list->hidejunk = junk_folder && !(folder->folder_flags & CAMEL_FOLDER_IS_JUNK) && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
+ message_list->hidedeleted = hide_deleted && !(camel_folder_remote_get_folder_flags (folder) & CAMEL_FOLDER_IS_TRASH);
+ message_list->hidejunk = junk_folder && !(camel_folder_remote_get_folder_flags (folder) & CAMEL_FOLDER_IS_JUNK) && !(camel_folder_remote_get_folder_flags (folder) & CAMEL_FOLDER_IS_TRASH);
load_hide_state (message_list);
if (message_list->frozen == 0)
@@ -3662,7 +3662,7 @@
struct _glibsuxcrap {
unsigned int count;
- CamelFolder *folder;
+ CamelObjectRemote *folder;
};
static void
@@ -3892,7 +3892,7 @@
gboolean thread_subject;
CamelFolderThread *tree;
- CamelFolder *folder;
+ CamelObjectRemote *folder;
GPtrArray *summary;
int last_row; /* last selected (cursor) row */
@@ -3932,7 +3932,7 @@
if (cursor)
m->last_row = e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), cursor);
- e_profile_event_emit("list.getuids", m->folder->full_name, 0);
+ 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)) {
@@ -4092,7 +4092,7 @@
MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
- e_profile_event_emit("list.threaduids", m->folder->full_name, 0);
+ e_profile_event_emit("list.threaduids", camel_folder_remote_get_name (m->folder), 0);
//camel_folder_summary_reload_from_db (m->folder->summary, NULL);
if (!camel_operation_cancel_check(m->base.cancel)) {
@@ -4104,10 +4104,10 @@
m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject);
} else {
m->summary = g_ptr_array_new ();
- if (showuids->len > camel_folder_summary_cache_size (m->folder->summary) ) {
+ if (showuids->len > camel_folder_summary_cache_size (camel_folder_remote_get_summary (m->folder)) ) {
CamelException ex;
camel_exception_init (&ex);
- camel_folder_summary_reload_from_db (m->folder->summary, &ex);
+ camel_folder_summary_reload_from_db (camel_folder_remote_get_summary (m->folder), &ex);
if (camel_exception_is_set (&ex)) {
g_warning ("Exception while reloading: %s\n", camel_exception_get_description (&ex));
camel_exception_clear (&ex);
@@ -4153,7 +4153,7 @@
if (m->ml->folder != m->folder)
return;
- e_profile_event_emit("list.buildtree", m->folder->full_name, 0);
+ e_profile_event_emit("list.buildtree", camel_folder_remote_get_name (m->folder), 0);
if (m->dotree) {
gboolean forcing_expand_state = m->ml->expand_all || m->ml->collapse_all;
@@ -4235,7 +4235,7 @@
{
int i;
- e_profile_event_emit("list.regenerated", m->folder->full_name, 0);
+ e_profile_event_emit("list.regenerated", camel_folder_remote_get_name (m->folder), 0);
if (m->summary) {
for (i = 0; i < m->summary->len; i++)
@@ -4274,7 +4274,7 @@
static gboolean
ml_regen_timeout(struct _regen_list_msg *m)
{
- e_profile_event_emit("list.regenerate", m->folder->full_name, 0);
+ e_profile_event_emit("list.regenerate", camel_folder_remote_get_name (m->folder), 0);
m->ml->regen = g_list_prepend(m->ml->regen, m);
/* TODO: we should manage our own thread stuff, would make cancelling outstanding stuff easier */
Modified: branches/mail-dbus-remoting/mail/message-list.h
==============================================================================
--- branches/mail-dbus-remoting/mail/message-list.h (original)
+++ branches/mail-dbus-remoting/mail/message-list.h Thu Aug 28 18:03:35 2008
@@ -29,6 +29,8 @@
#include <table/e-table-simple.h>
#include <table/e-tree-scrolled.h>
+#include <camel-folder-remote.h>
+
#ifdef __cplusplus
extern "C" {
#pragma }
@@ -96,7 +98,7 @@
ETableExtras *extras;
/* The folder & matching uri */
- CamelFolder *folder;
+ CamelFolderRemote *folder;
char *folder_uri;
GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
@@ -180,7 +182,7 @@
GType message_list_get_type (void);
GtkWidget *message_list_new (void);
-void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing);
+void message_list_set_folder (MessageList *message_list, CamelFolderRemote *camel_folder, const char *uri, gboolean outgoing);
void message_list_freeze(MessageList *ml);
void message_list_thaw(MessageList *ml);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]