[evolution-data-server] Support VANISHED response (RFC5162)



commit 425190c799760d87e2c6ca8f93ef1d73a9543f55
Author: David Woodhouse <David Woodhouse intel com>
Date:   Sat Jun 19 12:41:11 2010 +0100

    Support VANISHED response (RFC5162)

 camel/providers/imapx/camel-imapx-server.c   |   14 ++++++++++++++
 camel/providers/imapx/camel-imapx-tokens.txt |    1 +
 camel/providers/imapx/camel-imapx-utils.h    |    1 +
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 05a6d0c..e496bcc 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1172,6 +1172,20 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
 
 		break;
 	}
+	case IMAPX_VANISHED: {
+		GPtrArray *uids = imapx_parse_uids(imap->stream, ex);
+		int i;
+
+		if (camel_exception_is_set(ex))
+			return -1;
+		for (i = 0; i < uids->len; i++) {
+			gchar *uid = g_strdup_printf("%u", GPOINTER_TO_UINT(g_ptr_array_index (uids, i)));
+			c(printf("vanished: %s\n", uid));
+			imapx_expunge_uid_from_summary(imap, uid);
+		}
+		g_ptr_array_free (uids, FALSE);
+		break;
+	}
 	case IMAPX_NAMESPACE: {
 		CamelIMAPXNamespaceList *nsl = NULL;
 
diff --git a/camel/providers/imapx/camel-imapx-tokens.txt b/camel/providers/imapx/camel-imapx-tokens.txt
index be863ac..d1d3638 100644
--- a/camel/providers/imapx/camel-imapx-tokens.txt
+++ b/camel/providers/imapx/camel-imapx-tokens.txt
@@ -39,3 +39,4 @@ UID,		IMAPX_UID
 UIDVALIDITY,	IMAPX_UIDVALIDITY
 UNSEEN,		IMAPX_UNSEEN
 UIDNEXT,	IMAPX_UIDNEXT
+VANISHED,	IMAPX_VANISHED
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/providers/imapx/camel-imapx-utils.h
index 2084fc7..4e520e1 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/providers/imapx/camel-imapx-utils.h
@@ -49,6 +49,7 @@ typedef enum _camel_imapx_id_t {
 	IMAPX_UIDVALIDITY,
 	IMAPX_UNSEEN,
 	IMAPX_UIDNEXT,
+	IMAPX_VANISHED,
 } camel_imapx_id_t;
 
 /* str MUST be in upper case, tokenised using gperf function */



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