aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-08-02 03:30:39 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-08-02 03:30:39 +0800
commit9861660fdf5558f92f87387dce77a8d34013ef44 (patch)
tree1b9992fdc8f425eb7b3c967010a0aed9155de8f7 /mail/mail-ops.c
parent1b7da17c253261888de022fa0d6bebaa2d63df7a (diff)
downloadgsoc2013-evolution-9861660fdf5558f92f87387dce77a8d34013ef44.tar.gz
gsoc2013-evolution-9861660fdf5558f92f87387dce77a8d34013ef44.tar.zst
gsoc2013-evolution-9861660fdf5558f92f87387dce77a8d34013ef44.zip
add a CamelOperation for overriding status handler.
2003-07-29 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (mail_note_store): add a CamelOperation for overriding status handler. * mail-send-recv.c (receive_update_got_store): Pass our own cancel handle to get_folderinfo and mail_note_store. (mail_send_receive, mail_receive_uri): Same for get_store. * mail-ops.c (mail_get_store, mail_get_folderinfo): Add a CamelOperation argument, for overriding the status handler. Fixed most calles to pass NULL to use the default. svn path=/trunk/; revision=22056
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index f3469bf3e6..7a40e99c83 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1167,12 +1167,17 @@ static struct _mail_msg_op get_folderinfo_op = {
};
int
-mail_get_folderinfo (CamelStore *store, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+mail_get_folderinfo (CamelStore *store, CamelOperation *op, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
{
struct _get_folderinfo_msg *m;
int id;
m = mail_msg_new(&get_folderinfo_op, NULL, sizeof(*m));
+ if (op) {
+ camel_operation_unref(m->msg.cancel);
+ m->msg.cancel = op;
+ camel_operation_ref(op);
+ }
m->store = store;
camel_object_ref(store);
m->done = done;
@@ -1379,12 +1384,17 @@ static struct _mail_msg_op get_store_op = {
};
int
-mail_get_store (const char *uri, void (*done) (char *uri, CamelStore *store, void *data), void *data)
+mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, CamelStore *store, void *data), void *data)
{
struct _get_store_msg *m;
int id;
m = mail_msg_new (&get_store_op, NULL, sizeof (*m));
+ if (op) {
+ camel_operation_unref(m->msg.cancel);
+ m->msg.cancel = op;
+ camel_operation_ref(op);
+ }
m->uri = g_strdup (uri);
m->data = data;
m->done = done;