summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2010-03-02 20:51:26 +0530
committerChenthill Palanisamy <pchenthill@novell.com>2010-03-02 20:51:26 +0530
commitd966c85b61787f810ff9e46d0055320b18582ad2 (patch)
tree2950c1823b241c911df0b463216cc820ec0a7213
parentc2a0b96176751a386cbf4c4cf5842f5ca27d8edd (diff)
downloadevolution-data-server-d966c85b61787f810ff9e46d0055320b18582ad2.tar.gz
Allow reading retrieving messages parallely
-rw-r--r--camel/camel-exception-list.def6
-rw-r--r--camel/camel-store.h1
-rw-r--r--camel/providers/imapx/camel-imapx-server.c2
-rw-r--r--camel/providers/imapx/camel-imapx-store.c4
4 files changed, 10 insertions, 3 deletions
diff --git a/camel/camel-exception-list.def b/camel/camel-exception-list.def
index 8fe1e268c..9d2940f3e 100644
--- a/camel/camel-exception-list.def
+++ b/camel/camel-exception-list.def
@@ -34,4 +34,8 @@ CAMEL_EXCEPTION_SERVICE_INVALID,
CAMEL_EXCEPTION_SERVICE_URL_INVALID,
CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED
+CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
+
+
+/* CamelOperation */
+CAMEL_EXCEPTION_OPERATION_IN_PROGRESS = 400
diff --git a/camel/camel-store.h b/camel/camel-store.h
index e4a19ee90..abf8cfd41 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -116,6 +116,7 @@ typedef struct _CamelRenameInfo {
#define CAMEL_STORE_VJUNK (1 << 3)
#define CAMEL_STORE_PROXY (1 << 4)
#define CAMEL_STORE_IS_MIGRATING (1 << 5)
+#define CAMEL_STORE_ASYNC (1 << 6)
struct _CamelDB;
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 2ac663bbc..b930a4872 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3731,7 +3731,7 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, const gchar
if (imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_GET_MESSAGE, uid)) {
/* TODO set a right exception */
- camel_exception_set (ex, 1, "Dowloading message... \n");
+ camel_exception_set (ex, CAMEL_EXCEPTION_OPERATION_IN_PROGRESS, "Downloading message...");
QUEUE_UNLOCK (is);
return NULL;
}
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 223e55019..20b17cf33 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -883,7 +883,9 @@ camel_imapx_store_class_init(CamelIMAPXStoreClass *klass)
static void
camel_imapx_store_init (gpointer object, gpointer klass)
{
- /*CamelIMAPXStore *istore = object;*/
+ CamelStore *store = (CamelStore *) object;
+
+ store->flags |= CAMEL_STORE_ASYNC;
}
static void