[evolution-mapi] Preparations for Fast Transfer implementation



commit af42dc409c3729c456b7da8ab9f2f323e6e18480
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 26 16:23:56 2011 +0200

    Preparations for Fast Transfer implementation

 src/camel/camel-mapi-folder.c                  |    2 +-
 src/libexchangemapi/Makefile.am                |    4 +
 src/libexchangemapi/e-mapi-fast-transfer.c     |  593 +++++++++++++++++++++
 src/libexchangemapi/e-mapi-fast-transfer.h     |  107 ++++
 src/libexchangemapi/e-mapi-openchange.c        |  666 ++++++++++++++++++++++++
 src/libexchangemapi/e-mapi-openchange.h        |   40 ++
 src/libexchangemapi/exchange-mapi-connection.c |  139 +++++
 src/libexchangemapi/exchange-mapi-connection.h |   10 +
 src/libexchangemapi/exchange-mapi-debug.c      |   32 +-
 src/libexchangemapi/exchange-mapi-debug.h      |    2 +-
 src/libexchangemapi/exchange-mapi-mail-utils.c |    2 +-
 11 files changed, 1578 insertions(+), 19 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index 5a8e374..4a33b11 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -159,7 +159,7 @@ fetch_items_summary_cb (FetchItemsCallbackData *item_data, gpointer data)
 	MailItem *item = g_new0(MailItem , 1);
 
 	if (camel_debug_start("mapi:folder")) {
-		exchange_mapi_debug_dump_properties (item_data->conn, item_data->fid, item_data->properties);
+		exchange_mapi_debug_dump_properties (item_data->conn, item_data->fid, item_data->properties, 3);
 		camel_debug_end();
 	}
 
diff --git a/src/libexchangemapi/Makefile.am b/src/libexchangemapi/Makefile.am
index 6c69849..2f343dd 100644
--- a/src/libexchangemapi/Makefile.am
+++ b/src/libexchangemapi/Makefile.am
@@ -19,6 +19,10 @@ mapidata_DATA = 				\
 libexchangemapi_1_0_la_SOURCES =		\
 	camel-mapi-settings.c			\
 	camel-mapi-settings.h			\
+	e-mapi-fast-transfer.h			\
+	e-mapi-fast-transfer.c			\
+	e-mapi-openchange.h			\
+	e-mapi-openchange.c			\
 	exchange-mapi-defs.h			\
 	exchange-mapi-folder.c			\
 	exchange-mapi-folder.h			\
diff --git a/src/libexchangemapi/e-mapi-fast-transfer.c b/src/libexchangemapi/e-mapi-fast-transfer.c
new file mode 100644
index 0000000..2193eae
--- /dev/null
+++ b/src/libexchangemapi/e-mapi-fast-transfer.c
@@ -0,0 +1,593 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ *    Milan Crha <mcrha redhat com>
+ *
+ * Copyright (C) 2011 Red Hat, Inc. (www.redhat.com)
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "exchange-mapi-connection.h"
+#include "exchange-mapi-debug.h"
+
+#include "e-mapi-fast-transfer.h"
+#include "e-mapi-openchange.h"
+
+struct _EMapiFXParserClosure;
+typedef struct _EMapiFXParserClosure EMapiFXParserClosure;
+
+struct _EMapiFXParserClosure {
+	ExchangeMapiConnection *conn;
+	mapi_id_t fid;
+	TALLOC_CTX *mem_ctx;
+	EMapiFastTransferCB cb;
+	gpointer cb_user_data;
+	GError **perror;
+
+	uint32_t next_proptag_is_nameid;
+	uint32_t next_nameid_proptag;
+	guint32 message_index;
+	guint32 messages_total;
+
+	/* in what section it is now */
+	uint32_t marker;
+	/* where to store read properties */
+	struct mapi_SPropValue_array *current_properties;
+	/* what message is currently read (can be embeded message or the below message */
+	EMapiMessage *current_message;
+
+	/* main message properties */
+	EMapiMessage *message;
+};
+
+EMapiRecipient *
+e_mapi_recipient_new (TALLOC_CTX *mem_ctx)
+{
+	EMapiRecipient *recipient;
+
+	recipient = talloc_zero (mem_ctx, EMapiRecipient);
+	g_assert (recipient != NULL);
+
+	recipient->properties.cValues = 0;
+	recipient->properties.lpProps = talloc_zero_array (mem_ctx, struct mapi_SPropValue, 1);
+	recipient->next = NULL;
+
+	g_assert (recipient->properties.lpProps != NULL);
+
+	return recipient;
+}
+
+void
+e_mapi_recipient_free (EMapiRecipient *recipient)
+{
+	if (!recipient)
+		return;
+
+	talloc_free (recipient->properties.lpProps);
+	talloc_free (recipient);
+}
+
+EMapiAttachment *
+e_mapi_attachment_new (TALLOC_CTX *mem_ctx)
+{
+	EMapiAttachment *attachment;
+
+	attachment = talloc_zero (mem_ctx, EMapiAttachment);
+	g_assert (attachment != NULL);
+
+	attachment->properties.cValues = 0;
+	attachment->properties.lpProps = talloc_zero_array (mem_ctx, struct mapi_SPropValue, 1);
+	attachment->embeded_message = NULL;
+	attachment->next = NULL;
+
+	g_assert (attachment->properties.lpProps != NULL);
+
+	return attachment;
+}
+
+void
+e_mapi_attachment_free (EMapiAttachment *attachment)
+{
+	if (!attachment)
+		return;
+
+	e_mapi_message_free (attachment->embeded_message);
+	talloc_free (attachment->properties.lpProps);
+	talloc_free (attachment);
+}
+
+EMapiMessage *
+e_mapi_message_new (TALLOC_CTX *mem_ctx)
+{
+	EMapiMessage *message;
+
+	message = talloc_zero (mem_ctx, EMapiMessage);
+	g_assert (message != NULL);
+
+	message->properties.cValues = 0;
+	message->properties.lpProps = talloc_zero_array (mem_ctx, struct mapi_SPropValue, 1);
+	message->recipients = NULL;
+	message->attachments = NULL;
+	message->parent = NULL;
+
+	g_assert (message->properties.lpProps != NULL);
+
+	return message;
+}
+
+void
+e_mapi_message_free (EMapiMessage *message)
+{
+	EMapiRecipient *recipient;
+	EMapiAttachment *attachment;
+
+	if (!message)
+		return;
+
+	recipient = message->recipients;
+	while (recipient) {
+		EMapiRecipient *r = recipient;
+
+		recipient = recipient->next;
+		e_mapi_recipient_free (r);
+	}
+
+	attachment = message->attachments;
+	while (attachment) {
+		EMapiAttachment *a = attachment;
+
+		attachment = attachment->next;
+		e_mapi_attachment_free (a);
+	}
+
+	talloc_free (message->properties.lpProps);
+	talloc_free (message);
+}
+
+static void
+e_mapi_message_finish_read (EMapiMessage *message)
+{
+	EMapiRecipient *rprev, *rtail, *rnext;
+	EMapiAttachment *aprev, *atail, *anext;
+
+	if (!message)
+		return;
+
+	/* reverse order of recipients and attachments */
+	rprev = NULL;
+	for (rtail = message->recipients; rtail; rtail = rnext) {
+		rnext = rtail->next;
+		rtail->next = rprev;
+		rprev = rtail;
+	}
+	message->recipients = rprev;
+
+	aprev = NULL;
+	for (atail = message->attachments; atail; atail = anext) {
+		anext = atail->next;
+		atail->next = aprev;
+		aprev = atail;
+	}
+	message->attachments = aprev;
+}
+
+void
+e_mapi_message_dump (EMapiMessage *message, gint indent, gboolean with_properties)
+{
+	EMapiRecipient *recipient;
+	EMapiAttachment *attachment;
+	gint index;
+
+	g_print ("%*sEMapiMessage: %p (parent:%p)\n", indent, "", message, message->parent);
+
+	if (!message)
+		return;
+
+	if (with_properties)
+		exchange_mapi_debug_dump_properties (NULL, 0, &message->properties, indent + 3);
+
+	for (index = 0, recipient = message->recipients; recipient; index++, recipient = recipient->next) {
+		g_print ("%*sRecipient[%d]:\n", indent + 2, "", index);
+		if (with_properties)
+			exchange_mapi_debug_dump_properties (NULL, 0, &recipient->properties, indent + 3);
+	}
+
+	for (index = 0, attachment = message->attachments; attachment; index++, attachment = attachment->next) {
+		g_print ("%*sAttachment[%d]:\n", indent + 2, "", index);
+		if (with_properties)
+			exchange_mapi_debug_dump_properties (NULL, 0, &attachment->properties, indent + 3);
+		if (attachment->embeded_message) {
+			g_print ("%*sEmbeded message:\n", indent + 3, "");
+			e_mapi_message_dump (attachment->embeded_message, indent + 5, with_properties);
+		}
+	}
+}
+
+static gboolean
+process_parsed_message (EMapiFXParserClosure *data)
+{
+	g_return_val_if_fail (data != NULL, FALSE);
+	g_return_val_if_fail (data->conn != NULL, FALSE);
+	g_return_val_if_fail (data->cb != NULL, FALSE);
+	g_return_val_if_fail (data->message != NULL, FALSE);
+
+	return data->cb (data->conn, data->fid, data->mem_ctx, data->message, data->message_index, data->messages_total, data->cb_user_data, data->perror);
+}
+
+static enum MAPISTATUS
+parse_marker_cb (uint32_t marker, void *closure)
+{
+	EMapiFXParserClosure *data = closure;
+	gboolean stop = FALSE;
+
+	/* g_print ("\tMarker: %s (0x%08x)\n", get_proptag_name (marker), marker); */
+	switch (marker) {
+		case PidTagStartMessage:
+			if (data->message) {
+				g_debug ("%s: PidTagStartMessage: out of order, previous message not finished yet", G_STRFUNC);
+				e_mapi_message_finish_read (data->message);
+				stop = !process_parsed_message (data);
+				e_mapi_message_free (data->message);
+				data->message = NULL;
+				data->current_message = NULL;
+				data->current_properties = NULL;
+			}
+
+			if (stop)
+				return MAPI_E_USER_CANCEL;
+
+			/* new message parsing */
+			data->message_index++;
+			data->message = e_mapi_message_new (data->mem_ctx);
+			data->current_message = data->message;
+			data->current_properties = &data->message->properties;
+			data->marker = marker;
+			break;
+		case PidTagEndMessage:
+			if (!data->message) {
+				g_debug ("%s: PidTagEndMessage no message started", G_STRFUNC);
+			} else {
+				e_mapi_message_finish_read (data->message);
+				stop = !process_parsed_message (data);
+
+				e_mapi_message_free (data->message);
+				data->message = NULL;
+				data->current_message = NULL;
+				data->current_properties = NULL;
+
+				if (stop)
+					return MAPI_E_USER_CANCEL;
+			}
+			data->marker = 0;
+			break;
+		case PidTagStartRecip:
+			if (!data->current_message) {
+				g_debug ("%s: PidTagStartRecip no message started", G_STRFUNC);
+			} else {
+				EMapiRecipient *recipient;
+
+				recipient = e_mapi_recipient_new (data->mem_ctx);
+
+				/* they are stored in reverse order, but reverted before passing to a caller */
+				recipient->next = data->current_message->recipients;
+				data->current_message->recipients = recipient;
+
+				data->current_properties = &recipient->properties;
+			}
+			data->marker = marker;
+			break;
+		case PidTagEndToRecip:
+			data->current_properties = NULL;
+			data->marker = 0;
+			break;
+		case PidTagNewAttach:
+			if (!data->current_message) {
+				g_debug ("%s: PidTagNewAttach no message started", G_STRFUNC);
+			} else {
+				EMapiAttachment *attachment;
+
+				attachment = e_mapi_attachment_new (data->mem_ctx);
+
+				/* they are stored in reverse order, but reverted before passing to a caller */
+				attachment->next = data->current_message->attachments;
+				data->current_message->attachments = attachment;
+
+				data->current_properties = &attachment->properties;
+			}
+			data->marker = marker;
+			break;
+		case PidTagEndAttach:
+			data->current_properties = NULL;
+			data->marker = 0;
+			break;
+		case PidTagStartEmbed:
+			if (!data->current_message) {
+				g_debug ("%s: PidTagStartEmbed no message started", G_STRFUNC);
+			} else if (!data->current_message->attachments) {
+				g_debug ("%s: PidTagStartEmbed no attachment started", G_STRFUNC);
+			} else if (data->current_message->attachments->embeded_message) {
+				g_debug ("%s: PidTagStartEmbed attachment has embeded message already", G_STRFUNC);
+			} else {
+				EMapiMessage *message;
+
+				message = e_mapi_message_new (data->mem_ctx);
+
+				message->parent = data->current_message;
+				data->current_message->attachments->embeded_message = message;
+				data->current_message = message;
+				data->current_properties = &message->properties;
+			}
+			data->marker = marker;
+			break;
+		case PidTagEndEmbed:
+			if (!data->current_message) {
+				g_debug ("%s: PidTagEndEmbed no message started", G_STRFUNC);
+			} else if (!data->current_message->parent) {
+				g_debug ("%s: PidTagEndEmbed no parent message", G_STRFUNC);
+			} else {
+				e_mapi_message_finish_read (data->current_message);
+				data->current_message = data->current_message->parent;
+				data->current_properties = NULL;
+			}
+			data->marker = 0;
+			break;
+		default:
+			data->marker = marker;
+			break;
+	}
+
+	return MAPI_E_SUCCESS;
+}
+
+static enum MAPISTATUS
+parse_delprop_cb (uint32_t proptag, void *closure)
+{
+	return MAPI_E_SUCCESS;
+}
+
+static enum MAPISTATUS
+parse_namedprop_cb (uint32_t proptag, struct MAPINAMEID nameid, void *closure)
+{
+	/* the next property is a named property, but cannot make it proptag, thus left it for later */
+	EMapiFXParserClosure *data = closure;
+	uint32_t lid = MAPI_E_RESERVED;
+	char *guid;
+
+	guid = GUID_string (data->mem_ctx, &(nameid.lpguid));
+
+	if (nameid.ulKind == MNID_ID) {
+		if (e_mapi_nameid_lid_lookup_canonical (nameid.kind.lid, guid, &lid) != MAPI_E_SUCCESS)
+			lid = MAPI_E_RESERVED;
+	} else if (nameid.ulKind == MNID_STRING) {
+		if (e_mapi_nameid_string_lookup_canonical (nameid.kind.lpwstr.Name, guid, &lid) != MAPI_E_SUCCESS)
+			lid = MAPI_E_RESERVED;
+	}
+
+	talloc_free (guid);
+
+	if (lid != MAPI_E_RESERVED) {
+		data->next_proptag_is_nameid = proptag;
+		data->next_nameid_proptag = lid;
+	}
+
+	return MAPI_E_SUCCESS;
+}
+
+static enum MAPISTATUS
+parse_property_cb (struct SPropValue prop, void *closure)
+{
+	EMapiFXParserClosure *data = closure;
+
+	if (data->next_proptag_is_nameid == prop.ulPropTag) {
+		prop.ulPropTag = data->next_nameid_proptag;
+	}
+
+	data->next_proptag_is_nameid = MAPI_E_RESERVED;
+	data->next_nameid_proptag = MAPI_E_RESERVED;
+
+	if (!data->current_properties) {
+		if (data->marker)
+			g_debug ("%s: Property received out of order under marker %s", G_STRFUNC, get_proptag_name (data->marker));
+		return MAPI_E_SUCCESS;
+	}
+
+	switch (prop.ulPropTag & 0xFFFF) {
+		case PT_BOOLEAN:
+		case PT_I2:
+		case PT_LONG:
+		case PT_DOUBLE:
+		case PT_I8:
+		case PT_STRING8:
+		case PT_UNICODE:
+		case PT_SYSTIME:
+		case PT_BINARY:
+		case PT_ERROR:
+		case PT_CLSID:
+		case PT_SVREID:
+		case PT_MV_STRING8:
+		case PT_MV_UNICODE:
+		case PT_MV_BINARY:
+		case PT_MV_LONG:
+			data->current_properties->cValues++;
+			data->current_properties->lpProps = talloc_realloc (data->mem_ctx,
+									    data->current_properties->lpProps,
+									    struct mapi_SPropValue,
+									    data->current_properties->cValues + 1);
+			cast_mapi_SPropValue (data->mem_ctx, &data->current_properties->lpProps[data->current_properties->cValues - 1], &prop);
+			data->current_properties->lpProps[data->current_properties->cValues].ulPropTag = 0;
+			break;
+		default:
+			/* skip all of other type */
+			break;
+	}
+
+	return MAPI_E_SUCCESS;
+}
+
+static enum MAPISTATUS
+e_mapi_fast_transfer_internal (ExchangeMapiConnection *conn,
+			       mapi_id_t fid,
+			       TALLOC_CTX *mem_ctx,
+			       EMapiFastTransferCB cb,
+			       gpointer cb_user_data,
+			       gint messages_total,
+			       gboolean expect_start_message,
+			       mapi_object_t *fasttransfer_ctx,
+			       GError **perror)
+{
+	enum MAPISTATUS ms;
+	enum TransferStatus transferStatus;
+	uint16_t stepCount = -1, totalCount = -1;
+	struct fx_parser_context *parser;
+	EMapiFXParserClosure data = { 0 };
+
+	data.conn = conn;
+	data.fid = fid;
+	data.mem_ctx = talloc_new (mem_ctx);
+	data.cb = cb;
+	data.cb_user_data = cb_user_data;
+	data.perror = perror;
+
+	data.next_proptag_is_nameid = MAPI_E_RESERVED;
+	data.next_nameid_proptag = MAPI_E_RESERVED;
+	data.message_index = 0;
+	data.messages_total = messages_total;
+	data.marker = 0;
+	data.current_properties = NULL;
+	data.current_message = NULL;
+	data.message = NULL;
+
+	if (!expect_start_message) {
+		data.message_index++;
+		data.message = e_mapi_message_new (data.mem_ctx);
+		data.current_message = data.message;
+		data.current_properties = &data.message->properties;
+		data.marker = PidTagStartMessage;
+	}
+		
+	parser = fxparser_init (data.mem_ctx, &data);
+	fxparser_set_marker_callback (parser, parse_marker_cb);
+	fxparser_set_delprop_callback (parser, parse_delprop_cb);
+	fxparser_set_namedprop_callback (parser, parse_namedprop_cb);
+	fxparser_set_property_callback (parser, parse_property_cb);
+
+	do {
+		DATA_BLOB transferdata;
+
+		ms = FXGetBuffer (fasttransfer_ctx, 0, &transferStatus, &stepCount, &totalCount, &transferdata);
+		if (ms != MAPI_E_SUCCESS)
+			break;
+
+		fxparser_parse (parser, &transferdata);
+	} while ((transferStatus == TransferStatus_Partial) || (transferStatus == TransferStatus_NoRoom));
+
+	if (data.message) {
+		e_mapi_message_finish_read (data.message);
+		if (ms == MAPI_E_SUCCESS && !process_parsed_message (&data))
+			ms = MAPI_E_USER_CANCEL;
+
+		e_mapi_message_free (data.message);
+	}
+
+	talloc_free (parser);
+	talloc_free (data.mem_ctx);
+
+	return ms;
+}
+
+enum MAPISTATUS
+e_mapi_fast_transfer_objects (ExchangeMapiConnection *conn,
+			      mapi_id_t fid,
+			      TALLOC_CTX *mem_ctx,
+			      mapi_object_t *obj_folder,
+			      mapi_id_array_t *ids,
+			      EMapiFastTransferCB cb,
+			      gpointer cb_user_data,
+			      GError **perror)
+{
+	enum MAPISTATUS ms;
+	mapi_object_t fasttransfer_ctx;
+
+	mapi_object_init (&fasttransfer_ctx);
+
+	ms = FXCopyMessages (obj_folder, ids, FastTransferCopyMessage_BestBody, FastTransfer_Unicode, &fasttransfer_ctx);
+	if (ms != MAPI_E_SUCCESS) {
+		return ms;
+	}
+
+	ms = e_mapi_fast_transfer_internal (conn, fid, mem_ctx, cb, cb_user_data, ids->count, TRUE, &fasttransfer_ctx, perror);
+
+	mapi_object_release (&fasttransfer_ctx);
+
+	if (perror && !*perror && ms != MAPI_E_SUCCESS)
+		make_mapi_error (perror, G_STRFUNC, ms);
+
+	return ms;
+}
+
+enum MAPISTATUS
+e_mapi_fast_transfer_object (ExchangeMapiConnection *conn,
+			     mapi_id_t fid,
+			     TALLOC_CTX *mem_ctx,
+			     mapi_object_t *obj_message,
+			     guint32 transfer_flags, /* bit or of EMapiFastTransferFlags */
+			     EMapiFastTransferCB cb,
+			     gpointer cb_user_data,
+			     GError **perror)
+{
+	enum MAPISTATUS ms;
+	mapi_object_t fasttransfer_ctx;
+	struct SPropTagArray *excludes = NULL;
+
+	mapi_object_init (&fasttransfer_ctx);
+
+	#define add(x)	{						\
+		if (!excludes)						\
+			excludes = set_SPropTagArray (mem_ctx, 0x1, x);	\
+		else							\
+			SPropTagArray_add (mem_ctx, excludes, x);	\
+	}
+
+	if (!(transfer_flags & E_MAPI_FAST_TRANSFER_FLAG_ATTACHMENTS))
+		add (PidTagMessageAttachments);
+	if (!(transfer_flags & E_MAPI_FAST_TRANSFER_FLAG_RECIPIENTS))
+		add (PidTagMessageRecipients);
+
+	#undef add
+
+	if (!excludes)
+		excludes = talloc_zero (mem_ctx, struct SPropTagArray);
+
+	ms = FXCopyTo (obj_message, 0, FastTransferCopyTo_BestBody, FastTransfer_Unicode, excludes, &fasttransfer_ctx);
+	if (ms != MAPI_E_SUCCESS) {
+		return ms;
+	}
+
+	ms = e_mapi_fast_transfer_internal (conn, fid, mem_ctx, cb, cb_user_data, 1, FALSE, &fasttransfer_ctx, perror);
+
+	mapi_object_release (&fasttransfer_ctx);
+	talloc_free (excludes);
+
+	if (perror && !*perror && ms != MAPI_E_SUCCESS)
+		make_mapi_error (perror, G_STRFUNC, ms);
+
+	return ms;
+}
diff --git a/src/libexchangemapi/e-mapi-fast-transfer.h b/src/libexchangemapi/e-mapi-fast-transfer.h
new file mode 100644
index 0000000..ef652e9
--- /dev/null
+++ b/src/libexchangemapi/e-mapi-fast-transfer.h
@@ -0,0 +1,107 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ *    Milan Crha <mcrha redhat com>
+ *
+ * Copyright (C) 2011 Red Hat, Inc. (www.redhat.com)
+ *
+ */
+
+#ifndef E_MAPI_FAST_TRANSFER_H
+#define E_MAPI_FAST_TRANSFER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <libmapi/libmapi.h>
+#include "exchange-mapi-connection.h"
+
+G_BEGIN_DECLS
+
+struct _EMapiMessage;
+struct _EMapiRecipient;
+struct _EMapiAttachment;
+
+typedef struct _EMapiMessage EMapiMessage;
+typedef struct _EMapiRecipient EMapiRecipient;
+typedef struct _EMapiAttachment EMapiAttachment;
+
+typedef gboolean (*EMapiFastTransferCB) (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, /* const */ EMapiMessage *message, guint32 msg_index, guint32 msg_total, gpointer user_data, GError **perror);
+
+struct _EMapiRecipient
+{
+	struct mapi_SPropValue_array properties;
+
+	EMapiRecipient *next;
+};
+
+struct _EMapiAttachment
+{
+	struct mapi_SPropValue_array properties;
+	EMapiMessage *embeded_message;
+
+	EMapiAttachment *next;
+};
+
+struct _EMapiMessage {
+	struct mapi_SPropValue_array properties;
+	EMapiRecipient *recipients; /* NULL when none */
+	EMapiAttachment *attachments; /* NULL when none */
+
+	EMapiMessage *parent; /* chain up to parent's message, if this is embeded attachment */
+};
+
+EMapiRecipient *	e_mapi_recipient_new		(TALLOC_CTX *mem_ctx);
+void			e_mapi_recipient_free		(EMapiRecipient *recipient);
+
+EMapiAttachment *	e_mapi_attachment_new		(TALLOC_CTX *mem_ctx);
+void			e_mapi_attachment_free		(EMapiAttachment *attachment);
+
+EMapiMessage *		e_mapi_message_new		(TALLOC_CTX *mem_ctx);
+void			e_mapi_message_free		(EMapiMessage *message);
+void			e_mapi_message_dump		(EMapiMessage *message,
+							 gint indent,
+							 gboolean with_properties);
+
+enum MAPISTATUS		e_mapi_fast_transfer_objects	(ExchangeMapiConnection *conn,
+							 mapi_id_t fid,
+							 TALLOC_CTX *mem_ctx,
+							 mapi_object_t *obj_folder,
+							 mapi_id_array_t *ids,
+							 EMapiFastTransferCB cb,
+							 gpointer cb_user_data,
+							 GError **perror);
+
+typedef enum {
+	E_MAPI_FAST_TRANSFER_FLAG_NONE		= 0,
+	E_MAPI_FAST_TRANSFER_FLAG_ATTACHMENTS	= 1 << 0,
+	E_MAPI_FAST_TRANSFER_FLAG_RECIPIENTS	= 1 << 1,
+	E_MAPI_FAST_TRANSFER_FLAG_ALL		= E_MAPI_FAST_TRANSFER_FLAG_ATTACHMENTS | E_MAPI_FAST_TRANSFER_FLAG_RECIPIENTS
+} EMapiFastTransferFlags;
+
+enum MAPISTATUS		e_mapi_fast_transfer_object	(ExchangeMapiConnection *conn,
+							 mapi_id_t fid,
+							 TALLOC_CTX *mem_ctx,
+							 mapi_object_t *obj_message,
+							 guint32 transfer_flags, /* bit OR of EMapiFastTransferFlags */
+							 EMapiFastTransferCB cb,
+							 gpointer cb_user_data,
+							 GError **perror);
+
+G_END_DECLS
+
+#endif /* E_MAPI_FAST_TRANSFER_H */
diff --git a/src/libexchangemapi/e-mapi-openchange.c b/src/libexchangemapi/e-mapi-openchange.c
new file mode 100644
index 0000000..ae0abe2
--- /dev/null
+++ b/src/libexchangemapi/e-mapi-openchange.c
@@ -0,0 +1,666 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ *    Milan Crha <mcrha redhat com>
+ *
+ * Copyright (C) 2011 Red Hat, Inc. (www.redhat.com)
+ *
+ */
+
+/* Array copied from OpenChange source, till it's available in OpenChange's API */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <libmapi/libmapi.h>
+#include <libmapi/mapi_nameid.h>
+
+#include "e-mapi-openchange.h"
+
+static struct mapi_nameid_tags mapi_nameid_tags[] = {
+{ PidLidAddressBookProviderArrayType                          , "ABPArrayType"                                                   , 0x8029, NULL, PT_LONG        , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidAddressBookProviderEmailList                          , "ABPEmailList"                                                   , 0x8028, NULL, PT_MV_LONG     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidAddressCountryCode                                    , "AddressCountryCode"                                             , 0x80dd, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidAnniversaryEventEntryId                               , "AnniversaryEventEID"                                            , 0x804e, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidAutoLog                                               , "AutoLog"                                                        , 0x8025, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidBirthdayEventEntryId                                  , "BirthdayEventEID"                                               , 0x804d, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidBirthdayLocal                                         , "ApptBirthdayLocal"                                              , 0x80de, NULL, PT_SYSTIME     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidBusinessCardCardPicture                               , "BCCardPicture"                                                  , 0x8041, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidBusinessCardDisplayDefinition                         , "BCDisplayDefinition"                                            , 0x8040, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactCharacterSet                                   , "ContactCharSet"                                                 , 0x8023, NULL, PT_LONG        , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactItemData                                       , "ContactItemData"                                                , 0x8007, NULL, PT_MV_LONG     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactUserField1                                     , "ContactUserField1"                                              , 0x804f, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactUserField2                                     , "ContactUserField2"                                              , 0x8050, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactUserField3                                     , "ContactUserField3"                                              , 0x8051, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidContactUserField4                                     , "ContactUserField4"                                              , 0x8052, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDepartment                                            , "Department"                                                     , 0x8010, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDistributionListChecksum                              , "DLChecksum"                                                     , 0x804c, NULL, PT_LONG        , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDistributionListMembers                               , "DLMembers"                                                      , 0x8055, NULL, PT_MV_BINARY   , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDistributionListName                                  , "DLName"                                                         , 0x8053, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDistributionListOneOffMembers                         , "DLOneOffMembers"                                                , 0x8054, NULL, PT_MV_BINARY   , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidDistributionListStream                                , "DLStream"                                                       , 0x8064, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1AddressType                                     , "Email1AddrType"                                                 , 0x8082, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1DisplayName                                     , "Email1DisplayName"                                              , 0x8080, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1EmailAddress                                    , "Email1EmailAddress"                                             , 0x8083, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1OriginalDisplayName                             , "Email1OriginalDisplayName"                                      , 0x8084, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1OriginalEntryId                                 , "Email1OriginalEntryID"                                          , 0x8085, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail1RichTextFormat                                  , "Email1RTF"                                                      , 0x8086, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2AddressType                                     , "Email2AddrType"                                                 , 0x8092, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2DisplayName                                     , "Email2DisplayName"                                              , 0x8090, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2EmailAddress                                    , "Email2EmailAddress"                                             , 0x8093, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2OriginalDisplayName                             , "Email2OriginalDisplayName"                                      , 0x8094, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2OriginalEntryId                                 , "Email2OriginalEntryID"                                          , 0x8095, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail2RichTextFormat                                  , "Email1RTF"                                                      , 0x8096, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3AddressType                                     , "Email3AddrType"                                                 , 0x80a2, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3DisplayName                                     , "Email3DisplayName"                                              , 0x80a0, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3EmailAddress                                    , "Email3EmailAddress"                                             , 0x80a3, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3OriginalDisplayName                             , "Email3OriginalDisplayName"                                      , 0x80a4, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3OriginalEntryId                                 , "Email3OriginalEntryID"                                          , 0x80a5, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmail3RichTextFormat                                  , "Email1RTF"                                                      , 0x80a6, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidEmailList                                             , "EmailList"                                                      , 0x8027, NULL, PT_MV_LONG     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax1AddressType                                       , "Fax1AddrType"                                                   , 0x80b2, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax1EmailAddress                                      , "Fax1EmailAddress"                                               , 0x80b3, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax1OriginalDisplayName                               , "Fax1OriginalDisplayName"                                        , 0x80b4, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax1OriginalEntryId                                   , "Fax1OriginalEntryID"                                            , 0x80b5, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax2AddressType                                       , "Fax2AddrType"                                                   , 0x80c2, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax2EmailAddress                                      , "Fax2EmailAddress"                                               , 0x80c3, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax2OriginalDisplayName                               , "Fax2OriginalDisplayName"                                        , 0x80c4, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax2OriginalEntryId                                   , "Fax2OriginalEntryID"                                            , 0x80c5, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax3AddressType                                       , "Fax3AddrType"                                                   , 0x80d2, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax3EmailAddress                                      , "Fax3EmailAddress"                                               , 0x80d3, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax3OriginalDisplayName                               , "Fax3OriginalDisplayName"                                        , 0x80d4, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFax3OriginalEntryId                                   , "Fax3OriginalEntryID"                                            , 0x80d5, NULL, PT_BINARY      , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFileUnder                                             , "FileUnder"                                                      , 0x8005, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFileUnderId                                           , "FileUnderId"                                                    , 0x8006, NULL, PT_LONG        , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFileUnderList                                         , "FileUnderList"                                                  , 0x8026, NULL, PT_MV_LONG     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidFreeBusyLocation                                      , "FreeBusyLocation"                                               , 0x80d8, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidHasPicture                                            , "HasPicture"                                                     , 0x8015, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidHomeAddress                                           , "HomeAddress"                                                    , 0x801a, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidHomeAddressCountryCode                                , "HomeAddressCountryCode"                                         , 0x80da, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidHtml                                                  , "HTML"                                                           , 0x802b, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidInstantMessagingAddress                               , "InstMsg"                                                        , 0x8062, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidOtherAddress                                          , "OtherAddress"                                                   , 0x801c, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidOtherAddressCountryCode                               , "OtherAddressCountryCode"                                        , 0x80dc, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidPostalAddressId                                       , "PostalAddressId"                                                , 0x8022, NULL, PT_LONG        , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidReferredBy                                            , "ReferredBy"                                                     , 0x800e, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWeddingAnniversaryLocal                               , "ApptAnniversaryLocal"                                           , 0x80df, NULL, PT_SYSTIME     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddress                                           , "WorkAddress"                                                    , 0x801b, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressCity                                       , "WorkAddressCity"                                                , 0x8046, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressCountry                                    , "WorkAddressCountry"                                             , 0x8049, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressCountryCode                                , "WorkAddressCountryCode"                                         , 0x80db, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressPostalCode                                 , "WorkAddressPostalCode"                                          , 0x8048, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressPostOfficeBox                              , "WorkAddressPostOfficeBox"                                       , 0x804a, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidWorkAddressState                                      , "WorkAddressState"                                               , 0x8047, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidYomiCompanyName                                       , "YomiCompanyName"                                                , 0x802e, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidYomiFirstName                                         , "YomiFirstName"                                                  , 0x802c, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidYomiLastName                                          , "YomiLastName"                                                   , 0x802d, NULL, PT_UNICODE     , MNID_ID, PSETID_Address, 0x0 },
+{ PidLidAllAttendeesString                                    , "AllAttendeesString"                                             , 0x8238, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAllowExternalCheck                                    , "AllowExternCheck"                                               , 0x8246, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentAuxiliaryFlags                             , "ApptAuxFlags"                                                   , 0x8207, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentColor                                      , "ApptColor"                                                      , 0x8214, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentCounterProposal                            , "ApptCounterProposal"                                            , 0x8257, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentDuration                                   , "ApptDuration"                                                   , 0x8213, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentEndDate                                    , "ApptEndDate"                                                    , 0x8211, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentEndTime                                    , "ApptEndTime"                                                    , 0x8210, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentEndWhole                                   , "ApptEndWhole"                                                   , 0x820e, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentLastSequence                               , "ApptLastSequence"                                               , 0x8203, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentNotAllowPropose                            , "ApptNotAllowPropose"                                            , 0x825a, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentProposalNumber                             , "ApptProposalNum"                                                , 0x8259, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentProposedDuration                           , "ApptProposedDuration"                                           , 0x8256, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentProposedEndWhole                           , "ApptProposedEndWhole"                                           , 0x8251, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentProposedStartWhole                         , "ApptProposedStartWhole"                                         , 0x8250, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentRecur                                      , "ApptRecur"                                                      , 0x8216, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentReplyName                                  , "ApptReplyName, http://schemas.microsoft.com/mapi/apptreplyname"; , 0x8230, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentReplyTime                                  , "ApptReplyTime"                                                  , 0x8220, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentSequence                                   , "ApptSequence"                                                   , 0x8201, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentSequenceTime                               , "ApptSeqTime"                                                    , 0x8202, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentStartDate                                  , "ApptStartDate"                                                  , 0x8212, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentStartTime                                  , "ApptStartTime"                                                  , 0x820f, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentStartWhole                                 , "ApptStartWhole"                                                 , 0x820d, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentStateFlags                                 , "ApptStateFlags"                                                 , 0x8217, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentSubType                                    , "ApptSubType"                                                    , 0x8215, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentTimeZoneDefinitionEndDisplay               , "ApptTZDefEndDisplay"                                            , 0x825f, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentTimeZoneDefinitionRecur                    , "ApptTZDefRecur"                                                 , 0x8260, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentTimeZoneDefinitionStartDisplay             , "ApptTZDefStartDisplay"                                          , 0x825e, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentUnsendableRecipients                       , "ApptUnsendableRecips"                                           , 0x825d, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAppointmentUpdateTime                                 , "ApptUpdateTime"                                                 , 0x8226, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAutoFillLocation                                      , "AutoFillLocation"                                               , 0x823a, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidAutoStartCheck                                        , "AutoStartCheck"                                                 , 0x8244, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidBusyStatus                                            , "BusyStatus"                                                     , 0x8205, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidCcAttendeesString                                     , "CCAttendeesString"                                              , 0x823c, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidChangeHighlight                                       , "ChangeHighlight"                                                , 0x8204, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidClipEnd                                               , "ClipEnd"                                                        , 0x8236, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidClipStart                                             , "ClipStart"                                                      , 0x8235, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidCollaborateDoc                                        , "CollaborateDoc"                                                 , 0x8247, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidConferencingCheck                                     , "ConfCheck"                                                      , 0x8240, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidConferencingType                                      , "ConfType"                                                       , 0x8241, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidDirectory                                             , "Directory"                                                      , 0x8242, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidExceptionReplaceTime                                  , "ExceptionReplaceTime"                                           , 0x8228, NULL, PT_SYSTIME     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidFExceptionalAttendees                                 , "FExceptionalAttendees"                                          , 0x822b, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidFExceptionalBody                                      , "FExceptionalBody"                                               , 0x8206, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidFInvited                                              , "FInvited"                                                       , 0x8229, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidForwardInstance                                       , "FwrdInstance"                                                   , 0x820a, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidForwardNotificationRecipients                         , "ForwardNotificationRecipients"                                  , 0x8261, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidFOthersAppointment                                    , "FOthersAppt, http://schemas.microsoft.com/mapi/fothersappt";     , 0x822f, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidInboundICalStream                                     , "InboundICalStream, dispidInboundICalStream"                     , 0x827a, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidIntendedBusyStatus                                    , "IntendedBusyStatus"                                             , 0x8224, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidLinkedTaskItems                                       , "LinkedTaskItems"                                                , 0x820c, NULL, PT_MV_BINARY   , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidLocation                                              , "Location"                                                       , 0x8208, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidMeetingWorkspaceUrl                                   , "MWSURL"                                                         , 0x8209, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidNetShowUrl                                            , "NetShowURL"                                                     , 0x8248, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidOnlinePassword                                        , "OnlinePassword"                                                 , 0x8249, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidOrganizerAlias                                        , "OrgAlias"                                                       , 0x8243, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidOriginalStoreEntryId                                  , "OrigStoreEid, http://schemas.microsoft.com/mapi/origstoreeid";   , 0x8237, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidOwnerName                                             , "OwnerName"                                                      , 0x822e, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidRecurrencePattern                                     , "RecurPattern"                                                   , 0x8232, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidRecurrenceType                                        , "RecurType"                                                      , 0x8231, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidRecurring                                             , "Recurring"                                                      , 0x8223, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidResponseStatus                                        , "ResponseStatus"                                                 , 0x8218, NULL, PT_LONG        , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidSingleBodyICal                                        , "IsSingleBodyICal, dispidIsSingleBodyICal"                       , 0x827b, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidTimeZoneDescription                                   , "TimeZoneDesc"                                                   , 0x8234, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidTimeZoneStruct                                        , "TimeZoneStruct"                                                 , 0x8233, NULL, PT_BINARY      , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidToAttendeesString                                     , "ToAttendeesString"                                              , 0x823b, NULL, PT_UNICODE     , MNID_ID, PSETID_Appointment, 0x0 },
+{ PidLidClientIntent                                          , "ClientIntent"                                                   , 0x0015, NULL, PT_LONG        , MNID_ID, PSETID_CalendarAssistant, 0x0 },
+{ PidLidServerProcessed                                       , "ExchangeProcessed"                                              , 0x85cc, NULL, PT_BOOLEAN     , MNID_ID, PSETID_CalendarAssistant, 0x0 },
+{ PidLidServerProcessingActions                               , "ExchangeProcessingAction"                                       , 0x85cd, NULL, PT_LONG        , MNID_ID, PSETID_CalendarAssistant, 0x0 },
+{ PidLidAgingDontAgeMe                                        , "AgingDontAgeMe"                                                 , 0x850e, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidAutoProcessState                                      , "SniffState"                                                     , 0x851a, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidBilling                                               , "Billing"                                                        , 0x8535, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidClassification                                        , "Classification"                                                 , 0x85b6, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidClassificationDescription                             , "ClassDesc"                                                      , 0x85b7, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidClassificationGuid                                    , "ClassGuid"                                                      , 0x85b8, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidClassificationKeep                                    , "ClassKeep"                                                      , 0x85ba, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidClassified                                            , "Classified"                                                     , 0x85b5, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidCommonEnd                                             , "CommonEnd"                                                      , 0x8517, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidCommonStart                                           , "CommonStart"                                                    , 0x8516, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidCompanies                                             , "Companies, http://schemas.microsoft.com/exchange/companies";     , 0x8539, NULL, PT_MV_UNICODE  , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidContactLinkEntry                                      , "ContactLinkEntry"                                               , 0x8585, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidContactLinkName                                       , "ContactLinkName"                                                , 0x8586, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidContactLinkSearchKey                                  , "ContactLinkSearchKey"                                           , 0x8584, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidContacts                                              , "Contacts"                                                       , 0x853a, NULL, PT_MV_UNICODE  , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationActionLastAppliedTime                     , "ConvActionLastAppliedTime"                                      , 0x85ca, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationActionMaxDeliveryTime                     , "ConvActionMaxDeliveryTime"                                      , 0x85c8, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationActionMoveFolderEid                       , "ConvActionMoveFolderEid"                                        , 0x85c6, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationActionMoveStoreEid                        , "ConvActionMoveStoreEid"                                         , 0x85c7, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationActionVersion                             , "ConvActionVersion"                                              , 0x85cb, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidConversationProcessed                                 , "ConvExLegacyProcessedRand"                                      , 0x85c9, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidCurrentVersion                                        , "CurrentVersion"                                                 , 0x8552, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidCurrentVersionName                                    , "CurrentVersionName"                                             , 0x8554, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidDayOfMonth                                            , "NULL"                                                           , 0x1000, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidFlagRequest                                           , "Request"                                                        , 0x8530, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidFlagString                                            , "FlagStringEnum"                                                 , 0x85c0, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidICalendarDayOfWeekMask                                , "http://schemas.microsoft.com/mapi/dayofweekmask";                , 0x1001, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidInfoPathFormName                                      , "NULL"                                                           , 0x85b1, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidInternetAccountName                                   , "InetAcctName"                                                   , 0x8580, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidInternetAccountStamp                                  , "InetAcctStamp"                                                  , 0x8581, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidMonthOfYear                                           , "NULL"                                                           , 0x1006, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNoEndDateFlag                                         , "http://schemas.microsoft.com/mapi/fnoenddate";                   , 0x100b, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendableBcc                                        , "NonSendableBCC"                                                 , 0x8538, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendableCc                                         , "NonSendableCC"                                                  , 0x8537, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendableTo                                         , "NonSendableTo"                                                  , 0x8536, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendBccTrackStatus                                 , "NonSendBccTrackStatus"                                          , 0x8545, NULL, PT_MV_LONG     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendCcTrackStatus                                  , "NonSendCcTrackStatus"                                           , 0x8544, NULL, PT_MV_LONG     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidNonSendToTrackStatus                                  , "NonSendToTrackStatus"                                           , 0x8543, NULL, PT_MV_LONG     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidOccurrences                                           , "NULL"                                                           , 0x1005, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidPrivate                                               , "Private"                                                        , 0x8506, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidPromptSendUpdate                                      , "PromptSendUpdate"                                               , 0x8045, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidRecurrenceDuration                                    , "NULL"                                                           , 0x100d, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReferenceEntryId                                      , "ReferenceEID"                                                   , 0x85bd, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderDelta                                         , "ReminderDelta, http://schemas.microsoft.com/mapi/reminderdelta"; , 0x8501, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderFileParameter                                 , "ReminderFileParam"                                              , 0x851f, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderOverride                                      , "ReminderOverride"                                               , 0x851c, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderPlaySound                                     , "ReminderPlaySound"                                              , 0x851e, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderSet                                           , "ReminderSet"                                                    , 0x8503, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderSignalTime                                    , "ReminderNextTime"                                               , 0x8560, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderTime                                          , "ReminderTime"                                                   , 0x8502, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderTimeDate                                      , "ReminderTimeDate"                                               , 0x8505, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderTimeTime                                      , "ReminderTimeTime"                                               , 0x8504, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidReminderType                                          , "ReminderType, http://schemas.microsoft.com/mapi/remindertype";   , 0x851d, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidRemoteStatus                                          , "RemoteStatus"                                                   , 0x8511, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidSideEffects                                           , "SideEffects"                                                    , 0x8510, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidSmartNoAttach                                         , "SmartNoAttach"                                                  , 0x8514, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidSpamOriginalFolder                                    , "SpamOriginalFolder"                                             , 0x859c, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidTaskGlobalId                                          , "TaskGlobalObjId"                                                , 0x8519, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidTaskMode                                              , "TaskMode"                                                       , 0x8518, NULL, PT_LONG        , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidToDoOrdinalDate                                       , "ToDoOrdinalDate"                                                , 0x85a0, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidToDoSubOrdinal                                        , "ToDoSubOrdinal"                                                 , 0x85a1, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidToDoTitle                                             , "ToDoTitle"                                                      , 0x85a4, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidUseTnef                                               , "UseTNEF"                                                        , 0x8582, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidValidFlagStringProof                                  , "ValidFlagStringProof"                                           , 0x85bf, NULL, PT_SYSTIME     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidVerbResponse                                          , "VerbResponse"                                                   , 0x8524, NULL, PT_UNICODE     , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidVerbStream                                            , "VerbStream"                                                     , 0x8520, NULL, PT_BINARY      , MNID_ID, PSETID_Common, 0x0 },
+{ PidLidLogDocumentPosted                                     , "LogDocPosted"                                                   , 0x8711, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogDocumentPrinted                                    , "LogDocPrinted"                                                  , 0x870e, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogDocumentRouted                                     , "LogDocRouted"                                                   , 0x8710, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogDocumentSaved                                      , "LogDocSaved"                                                    , 0x870f, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogDuration                                           , "LogDuration"                                                    , 0x8707, NULL, PT_LONG        , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogEnd                                                , "LogEnd"                                                         , 0x8708, NULL, PT_SYSTIME     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogFlags                                              , "LogFlags"                                                       , 0x870c, NULL, PT_LONG        , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogStart                                              , "LogStart"                                                       , 0x8706, NULL, PT_SYSTIME     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogType                                               , "LogType"                                                        , 0x8700, NULL, PT_UNICODE     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidLogTypeDesc                                           , "LogTypeDesc"                                                    , 0x8712, NULL, PT_UNICODE     , MNID_ID, PSETID_Log, 0x0 },
+{ PidLidAppointmentMessageClass                               , "ApptMessageClass"                                               , 0x0024, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidAttendeeCriticalChange                                , "LID_ATTENDEE_CRITICAL_CHANGE"                                   , 0x0001, NULL, PT_SYSTIME     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidCalendarType                                          , "LID_CALENDAR_TYPE"                                              , 0x001c, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidCleanGlobalObjectId                                   , "CleanGlobalObjId"                                               , 0x0023, NULL, PT_BINARY      , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidDayInterval                                           , "LID_DAY_INTERVAL"                                               , 0x0011, NULL, PT_SHORT       , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidDelegateMail                                          , "LID_DELEGATE_MAIL"                                              , 0x0009, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidEndRecurrenceDate                                     , "LID_END_RECUR_DATE"                                             , 0x000f, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidEndRecurrenceTime                                     , "LID_END_RECUR_TIME"                                             , 0x0010, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidGlobalObjectId                                        , "LID_GLOBAL_OBJID"                                               , 0x0003, NULL, PT_BINARY      , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidIsException                                           , "LID_IS_EXCEPTION"                                               , 0x000a, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidIsRecurring                                           , "LID_IS_RECURRING"                                               , 0x0005, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidIsSilent                                              , "LID_IS_SILENT"                                                  , 0x0004, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidMeetingType                                           , "MeetingType"                                                    , 0x0026, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidMonthInterval                                         , "LID_MONTH_INTERVAL"                                             , 0x0013, NULL, PT_SHORT       , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidMonthOfYearMask                                       , "LID_MOY_MASK"                                                   , 0x0017, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOldLocation                                           , "OldLocation"                                                    , 0x0028, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOldRecurrenceType                                     , "LID_RECUR_TYPE"                                                 , 0x0018, NULL, PT_SHORT       , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOldWhenEndWhole                                       , "OldWhenEndWhole"                                                , 0x002a, NULL, PT_SYSTIME     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOldWhenStartWhole                                     , "OldWhenStartWhole"                                              , 0x0029, NULL, PT_SYSTIME     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOptionalAttendees                                     , "LID_OPTIONAL_ATTENDEES"                                         , 0x0007, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidOwnerCriticalChange                                   , "LID_OWNER_CRITICAL_CHANGE"                                      , 0x001a, NULL, PT_SYSTIME     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidRequiredAttendees                                     , "LID_REQUIRED_ATTENDEES"                                         , 0x0006, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidResourceAttendees                                     , "LID_RESOURCE_ATTENDEES"                                         , 0x0008, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidStartRecurrenceDate                                   , "LID_START_RECUR_DATE"                                           , 0x000d, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidStartRecurrenceTime                                   , "LID_START_RECUR_TIME"                                           , 0x000e, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidTimeZone                                              , "LID_TIME_ZONE"                                                  , 0x000c, NULL, PT_LONG        , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidWeekInterval                                          , "LID_WEEK_INTERVAL"                                              , 0x0012, NULL, PT_SHORT       , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidWhere                                                 , "LID_WHERE"                                                      , 0x0002, NULL, PT_UNICODE     , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidYearInterval                                          , "LID_YEAR_INTERVAL"                                              , 0x0014, NULL, PT_SHORT       , MNID_ID, PSETID_Meeting, 0x0 },
+{ PidLidNoteColor                                             , "NoteColor"                                                      , 0x8b00, NULL, PT_LONG        , MNID_ID, PSETID_Note, 0x0 },
+{ PidLidNoteHeight                                            , "NoteHeight"                                                     , 0x8b03, NULL, PT_LONG        , MNID_ID, PSETID_Note, 0x0 },
+{ PidLidNoteWidth                                             , "NoteWidth"                                                      , 0x8b02, NULL, PT_LONG        , MNID_ID, PSETID_Note, 0x0 },
+{ PidLidNoteX                                                 , "NoteX"                                                          , 0x8b04, NULL, PT_LONG        , MNID_ID, PSETID_Note, 0x0 },
+{ PidLidNoteY                                                 , "NoteY"                                                          , 0x8b05, NULL, PT_LONG        , MNID_ID, PSETID_Note, 0x0 },
+{ PidLidPostRssChannel                                        , "PostRssChannel"                                                 , 0x8904, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssChannelLink                                    , "PostRssChannelLink"                                             , 0x8900, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssItemGuid                                       , "PostRssItemGuid"                                                , 0x8903, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssItemHash                                       , "PostRssItemHash"                                                , 0x8902, NULL, PT_LONG        , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssItemLink                                       , "PostRssItemLink"                                                , 0x8901, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssItemXml                                        , "PostRssItemXml"                                                 , 0x8905, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidPostRssSubscription                                   , "PostRssSubscription"                                            , 0x8906, NULL, PT_UNICODE     , MNID_ID, PSETID_PostRss, 0x0 },
+{ PidLidSharingAnonymity                                      , "SharingAnonymity"                                               , 0x8a19, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingBindingEntryId                                 , "SharingBindingEid"                                              , 0x8a2d, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingBrowseUrl                                      , "SharingBrowseUrl"                                               , 0x8a51, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingCapabilities                                   , "SharingCaps"                                                    , 0x8a17, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingConfigurationUrl                               , "SharingConfigUrl"                                               , 0x8a24, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingDataRangeEnd                                   , "SharingDataRangeEnd"                                            , 0x8a45, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingDataRangeStart                                 , "SharingDataRangeStart"                                          , 0x8a44, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingDetail                                         , "SharingDetail"                                                  , 0x8a2b, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingExtensionXml                                   , "SharingExtXml"                                                  , 0x8a21, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingFilter                                         , "SharingFilter"                                                  , 0x8a13, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingFlags                                          , "SharingFlags"                                                   , 0x8a0a, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingFlavor                                         , "SharingFlavor"                                                  , 0x8a18, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingFolderEntryId                                  , "SharingFolderEid"                                               , 0x8a15, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingIndexEntryId                                   , "SharingIndexEid"                                                , 0x8a2e, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingInitiatorEntryId                               , "SharingInitiatorEid"                                            , 0x8a09, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingInitiatorName                                  , "SharingInitiatorName"                                           , 0x8a07, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingInitiatorSmtp                                  , "SharingInitiatorSmtp"                                           , 0x8a08, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingInstanceGuid                                   , "SharingInstanceGuid"                                            , 0x8a1c, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLastAutoSyncTime                               , "SharingLastAutoSync"                                            , 0x8a55, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLastSyncTime                                   , "SharingLastSync"                                                , 0x8a1f, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalComment                                   , "SharingLocalComment"                                            , 0x8a4d, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalLastModificationTime                      , "SharingLocalLastMod"                                            , 0x8a23, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalName                                      , "SharingLocalName"                                               , 0x8a0f, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalPath                                      , "SharingLocalPath"                                               , 0x8a0e, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalStoreUid                                  , "SharingLocalStoreUid"                                           , 0x8a49, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalType                                      , "SharingLocalType"                                               , 0x8a14, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingLocalUid                                       , "SharingLocalUid"                                                , 0x8a10, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingOriginalMessageEntryId                         , "SharingOriginalMessageEid"                                      , 0x8a29, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingParentBindingEntryId                           , "SharingParentBindingEid"                                        , 0x8a5c, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingParticipants                                   , "SharingParticipants"                                            , 0x8a1e, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingPermissions                                    , "SharingPermissions"                                             , 0x8a1b, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingProviderExtension                              , "SharingProviderExtension"                                       , 0x8a0b, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingProviderGuid                                   , "SharingProviderGuid"                                            , 0x8a01, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingProviderName                                   , "SharingProviderName"                                            , 0x8a02, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingProviderUrl                                    , "SharingProviderUrl"                                             , 0x8a03, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRangeEnd                                       , "SharingRangeEnd"                                                , 0x8a47, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRangeStart                                     , "SharingRangeStart"                                              , 0x8a46, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingReciprocation                                  , "SharingReciprocation"                                           , 0x8a1a, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteByteSize                                 , "SharingRemoteByteSize"                                          , 0x8a4b, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteComment                                  , "SharingRemoteComment"                                           , 0x8a2f, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteCrc                                      , "SharingRemoteCrc"                                               , 0x8a4c, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteLastModificationTime                     , "SharingRemoteLastMod"                                           , 0x8a22, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteMessageCount                             , "SharingRemoteMsgCount"                                          , 0x8a4f, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteName                                     , "SharingRemoteName"                                              , 0x8a05, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemotePass                                     , "SharingRemotePass"                                              , 0x8a0d, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemotePath                                     , "SharingRemotePath"                                              , 0x8a04, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteStoreUid                                 , "SharingRemoteStoreUid"                                          , 0x8a48, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteType                                     , "SharingRemoteType"                                              , 0x8a1d, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteUid                                      , "SharingRemoteUid"                                               , 0x8a06, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteUser                                     , "SharingRemoteUser"                                              , 0x8a0c, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRemoteVersion                                  , "SharingRemoteVersion"                                           , 0x8a5b, NULL, PT_UNICODE     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingResponseTime                                   , "SharingResponseTime"                                            , 0x8a28, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingResponseType                                   , "SharingResponseType"                                            , 0x8a27, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingRoamLog                                        , "SharingRoamLog"                                                 , 0x8a4e, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingStart                                          , "SharingStart"                                                   , 0x8a25, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingStatus                                         , "SharingStatus"                                                  , 0x8a00, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingStop                                           , "SharingStop"                                                    , 0x8a26, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingSyncFlags                                      , "SharingSyncFlags"                                               , 0x8a60, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingSyncInterval                                   , "SharingSyncInterval"                                            , 0x8a2a, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingTimeToLive                                     , "SharingTimeToLive"                                              , 0x8a2c, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingTimeToLiveAuto                                 , "SharingTimeToLiveAuto"                                          , 0x8a56, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingWorkingHoursDays                               , "SharingWorkingHoursDays"                                        , 0x8a42, NULL, PT_LONG        , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingWorkingHoursEnd                                , "SharingWorkingHoursEnd"                                         , 0x8a41, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingWorkingHoursStart                              , "SharingWorkingHoursStart"                                       , 0x8a40, NULL, PT_SYSTIME     , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidSharingWorkingHoursTimeZone                           , "SharingWorkingHoursTZ"                                          , 0x8a43, NULL, PT_BINARY      , MNID_ID, PSETID_Sharing, 0x0 },
+{ PidLidPercentComplete                                       , "PercentComplete"                                                , 0x8102, NULL, PT_DOUBLE      , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskAcceptanceState                                   , "TaskDelegValue"                                                 , 0x812a, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskAccepted                                          , "TaskAccepted"                                                   , 0x8108, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskActualEffort                                      , "TaskActualEffort"                                               , 0x8110, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskAssigner                                          , "TaskDelegator"                                                  , 0x8121, NULL, PT_UNICODE     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskAssigners                                         , "TaskMyDelegators"                                               , 0x8117, NULL, PT_BINARY      , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskComplete                                          , "TaskComplete"                                                   , 0x811c, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskCustomFlags                                       , "TaskActualEffort"                                               , 0x8139, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskDateCompleted                                     , "TaskDateCompleted"                                              , 0x810f, NULL, PT_SYSTIME     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskDeadOccurrence                                    , "TaskDeadOccur"                                                  , 0x8109, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskDueDate                                           , "TaskDueDate"                                                    , 0x8105, NULL, PT_SYSTIME     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskEstimatedEffort                                   , "TaskEstimatedEffort"                                            , 0x8111, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskFCreator                                          , "TaskFCreator"                                                   , 0x811e, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskFFixOffline                                       , "TaskFFixOffline"                                                , 0x812c, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskFRecurring                                        , "TaskFRecur"                                                     , 0x8126, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskHistory                                           , "TaskHistory"                                                    , 0x811a, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskLastDelegate                                      , "TaskLastDelegate"                                               , 0x8125, NULL, PT_UNICODE     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskLastUpdate                                        , "TaskLastUpdate"                                                 , 0x8115, NULL, PT_SYSTIME     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskLastUser                                          , "TaskLastUser"                                                   , 0x8122, NULL, PT_UNICODE     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskMultipleRecipients                                , "TaskMultRecips"                                                 , 0x8120, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskNoCompute                                         , "TaskNoCompute"                                                  , 0x8124, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskOrdinal                                           , "TaskOrdinal"                                                    , 0x8123, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskOwner                                             , "TaskOwner"                                                      , 0x811f, NULL, PT_UNICODE     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskOwnership                                         , "TaskOwnership"                                                  , 0x8129, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskRecurrence                                        , "TaskRecur"                                                      , 0x8116, NULL, PT_BINARY      , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskResetReminder                                     , "TaskResetReminder"                                              , 0x8107, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskRole                                              , "TaskRole"                                                       , 0x8127, NULL, PT_UNICODE     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskStartDate                                         , "TaskStartDate"                                                  , 0x8104, NULL, PT_SYSTIME     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskState                                             , "TaskState"                                                      , 0x8113, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskStatus                                            , "TaskStatus"                                                     , 0x8101, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskStatusOnComplete                                  , "TaskSOC"                                                        , 0x8119, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskUpdates                                           , "TaskUpdates"                                                    , 0x811b, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTaskVersion                                           , "TaskVersion"                                                    , 0x8112, NULL, PT_LONG        , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTeamTask                                              , "TeamTask"                                                       , 0x8103, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidTrustRecipientHighlights                              , "TrustRecipHighlights"                                           , 0x823e, NULL, PT_BOOLEAN     , MNID_ID, PSETID_Task, 0x0 },
+{ PidLidCategories                                            , "Categories"                                                     , 0x9000, NULL, PT_MV_UNICODE  , MNID_ID, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameInstantMessagingAddress2                             , NULL                                                             , 0x0000, "IMAddress2", PT_UNICODE     , MNID_STRING, PSETID_AirSync, 0x0 },
+{ PidNameInstantMessagingAddress3                             , NULL                                                             , 0x0000, "IMAddress3", PT_UNICODE     , MNID_STRING, PSETID_AirSync, 0x0 },
+{ PidNameAttachmentMacContentType                             , NULL                                                             , 0x0000, "AttachmentMacContentType", PT_UNICODE     , MNID_STRING, PSETID_Attachment, 0x0 },
+{ PidNameAttachmentMacInfo                                    , NULL                                                             , 0x0000, "AttachmentMacInfo", PT_BINARY      , MNID_STRING, PSETID_Attachment, 0x0 },
+{ PidNameOriginalSpamConfidenceLevel                          , NULL                                                             , 0x0000, "OriginalScl", PT_LONG        , MNID_STRING, PSETID_Messaging, 0x0 },
+{ PidNameAudioNotes                                           , NULL                                                             , 0x0000, "UMAudioNotes", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameAutomaticSpeechRecognitionData                       , NULL                                                             , 0x0000, "AsrData", PT_BINARY      , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameOutlookProtectionRuleTimestamp                       , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-Outlook-Protection-Rule-Config-Timestamp", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameXUnifiedMessagingPartnerAssignedId                   , NULL                                                             , 0x0000, "X-MS-Exchange-UM-PartnerAssignedID", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameXUnifiedMessagingPartnerContent                      , NULL                                                             , 0x0000, "X-MS-Exchange-UM-PartnerContent", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameXUnifiedMessagingPartnerContext                      , NULL                                                             , 0x0000, "X-MS-Exchange-UM-PartnerContext", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameXUnifiedMessagingPartnerStatus                       , NULL                                                             , 0x0000, "X-MS-Exchange-UM-PartnerStatus", PT_UNICODE     , MNID_STRING, PSETID_UnifiedMessaging, 0x0 },
+{ PidNameAcceptLanguage                                       , NULL                                                             , 0x0000, "Accept-Language", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameApprovalAllowedDecisionMakers                        , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-Approval-Allowed-Decision-Makers", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameApprovalRequestor                                    , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-Approval-Requestor", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameApproved                                             , NULL                                                             , 0x0000, "Approved", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameAuthenticatedAs                                      , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-AuthAs", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameAuthenticatedDomain                                  , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-AuthDomain", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameAuthenticatedMechanism                               , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-AuthMechanism", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameAuthenticatedSource                                  , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-AuthSource", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameBcc                                                  , NULL                                                             , 0x0000, "Bcc", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameCc                                                   , NULL                                                             , 0x0000, "Cc", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentBase                                          , NULL                                                             , 0x0000, "Content-Base", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentClass                                         , NULL                                                             , 0x0000, "Content-Class", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentDisposition                                   , NULL                                                             , 0x0000, "Content-Disposition", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentID                                            , NULL                                                             , 0x0000, "Content-ID", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentLanguage                                      , NULL                                                             , 0x0000, "Content-Language", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentLocation                                      , NULL                                                             , 0x0000, "Content-Location", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentTransferEncoding                              , NULL                                                             , 0x0000, "Content-Transfer-Encoding", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameContentType                                          , NULL                                                             , 0x0000, "Content-Type", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameControl                                              , NULL                                                             , 0x0000, "Control", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameCrossReference                                       , NULL                                                             , 0x0000, "Xref", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameDisposition                                          , NULL                                                             , 0x0000, "Disposition", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameDispositionNotificationTo                            , NULL                                                             , 0x0000, "Disposition-Notification-To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameDistribution                                         , NULL                                                             , 0x0000, "Distribution", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameExpires                                              , NULL                                                             , 0x0000, "Expires", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameExpiryDate                                           , NULL                                                             , 0x0000, "Expiry-Date", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameFollowupTo                                           , NULL                                                             , 0x0000, "Followup-To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameFrom                                                 , NULL                                                             , 0x0000, "From", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameImportance                                           , NULL                                                             , 0x0000, "Importance", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameInReplyTo                                            , NULL                                                             , 0x0000, "In-Reply-To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameInternetComment                                      , NULL                                                             , 0x0000, "Comment", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameInternetKeywords                                     , NULL                                                             , 0x0000, "Keywords", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameInternetSubject                                      , NULL                                                             , 0x0000, "Subject", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameLines                                                , NULL                                                             , 0x0000, "Lines", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameMessageId                                            , NULL                                                             , 0x0000, "Message-ID", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameMimeVersion                                          , NULL                                                             , 0x0000, "Mime-Version", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameNewsgroups                                           , NULL                                                             , 0x0000, "Newsgroups", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameNntpPostingHost                                      , NULL                                                             , 0x0000, "NNTP-Posting-Host", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameOrganization                                         , NULL                                                             , 0x0000, "Organization", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameOriginalRecipient                                    , NULL                                                             , 0x0000, "Original-Recipient", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameOutlookProtectionRuleOverridden                      , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-Outlook-Protection-Rule-Overridden", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameOutlookProtectionRuleVersion                         , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-Outlook-Protection-Rule-Addin-Version", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNamePath                                                 , NULL                                                             , 0x0000, "Path", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNamePostingVersion                                       , NULL                                                             , 0x0000, "Posting-Version", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNamePriority                                             , NULL                                                             , 0x0000, "Priority", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReceived                                             , NULL                                                             , 0x0000, "Received", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReferences                                           , NULL                                                             , 0x0000, "References", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameRelayVersion                                         , NULL                                                             , 0x0000, "Relay-Version", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReplyBy                                              , NULL                                                             , 0x0000, "Reply-By", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReplyTo                                              , NULL                                                             , 0x0000, "Reply-To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReturnPath                                           , NULL                                                             , 0x0000, "Return-Path", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameReturnReceiptTo                                      , NULL                                                             , 0x0000, "Return-Receipt-To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameRightsProtectMessage                                 , NULL                                                             , 0x0000, "X-MS-Exchange-Organization-RightsProtectMessage", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameSender                                               , NULL                                                             , 0x0000, "Sender", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameSensitivity                                          , NULL                                                             , 0x0000, "Sensitivity", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameSummary                                              , NULL                                                             , 0x0000, "Summary", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameThreadIndex                                          , NULL                                                             , 0x0000, "Thread-Index", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameThreadTopic                                          , NULL                                                             , 0x0000, "Thread-Topic", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameTo                                                   , NULL                                                             , 0x0000, "To", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXCallId                                              , NULL                                                             , 0x0000, "X-CallID", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXFaxNumberOfPages                                    , NULL                                                             , 0x0000, "X-FaxNumberOfPages", PT_SHORT       , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXMailer                                              , NULL                                                             , 0x0000, "X-Mailer", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXMessageCompleted                                    , NULL                                                             , 0x0000, "X-Message-Completed", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXMessageFlag                                         , NULL                                                             , 0x0000, "X-Message-Flag", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXRequireProtectedPlayOnPhone                         , NULL                                                             , 0x0000, "X-RequireProtectedPlayOnPhone", PT_BOOLEAN     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSenderTelephoneNumber                               , NULL                                                             , 0x0000, "X-CallingTelephoneNumber", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingBrowseUrl                                    , NULL                                                             , 0x0000, "X-Sharing-Browse-Url", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingCapabilities                                 , NULL                                                             , 0x0000, "X-Sharing-Capabilities", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingConfigUrl                                    , NULL                                                             , 0x0000, "X-Sharing-Config-Url", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingExendedCaps                                  , NULL                                                             , 0x0000, "X-Sharing-Exended-Caps", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingFlavor                                       , NULL                                                             , 0x0000, "X-Sharing-Flavor", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingInstanceGuid                                 , NULL                                                             , 0x0000, "X-Sharing-Instance-Guid", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingLocalType                                    , NULL                                                             , 0x0000, "X-Sharing-Local-Type", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingProviderGuid                                 , NULL                                                             , 0x0000, "X-Sharing-Provider-Guid", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingProviderName                                 , NULL                                                             , 0x0000, "X-Sharing-Provider-Name", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingProviderUrl                                  , NULL                                                             , 0x0000, "X-Sharing-Provider-Url", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingRemoteName                                   , NULL                                                             , 0x0000, "X-Sharing-Remote-Name", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingRemotePath                                   , NULL                                                             , 0x0000, "X-Sharing-Remote-Path", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingRemoteStoreUid                               , NULL                                                             , 0x0000, "X-Sharing-Remote-Store-Uid", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingRemoteType                                   , NULL                                                             , 0x0000, "X-Sharing-Remote-Type", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXSharingRemoteUid                                    , NULL                                                             , 0x0000, "X-Sharing-Remote-Uid", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXUnsent                                              , NULL                                                             , 0x0000, "X-Unsent", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXVoiceMessageAttachmentOrder                         , NULL                                                             , 0x0000, "X-AttachmentOrder", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXVoiceMessageDuration                                , NULL                                                             , 0x0000, "X-VoiceMessageDuration", PT_SHORT       , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameXVoiceMessageSenderName                              , NULL                                                             , 0x0000, "X-VoiceMessageSenderName", PT_UNICODE     , MNID_STRING, PS_INTERNET_HEADERS, 0x0 },
+{ PidNameApplicationName                                      , NULL                                                             , 0x0000, "AppName", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameAuthor                                               , NULL                                                             , 0x0000, "Author", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameByteCount                                            , NULL                                                             , 0x0000, "ByteCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarAttendeeRole                                 , NULL                                                             , 0x0000, "urn:schemas:calendar:attendeerole", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarBusystatus                                   , NULL                                                             , 0x0000, "urn:schemas:calendar:busystatus", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarContact                                      , NULL                                                             , 0x0000, "urn:schemas:calendar:contact", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarContactUrl                                   , NULL                                                             , 0x0000, "urn:schemas:calendar:contacturl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarCreated                                      , NULL                                                             , 0x0000, "urn:schemas:calendar:created", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarDescriptionUrl                               , NULL                                                             , 0x0000, "urn:schemas:calendar:descriptionurl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarDuration                                     , NULL                                                             , 0x0000, "urn:schemas:calendar:duration", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarExceptionDate                                , NULL                                                             , 0x0000, "urn:schemas:calendar:exdate", PT_MV_SYSTIME  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarExceptionRule                                , NULL                                                             , 0x0000, "urn:schemas:calendar:exrule", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarGeoLatitude                                  , NULL                                                             , 0x0000, "urn:schemas:calendar:geolatitude", PT_DOUBLE      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarGeoLongitude                                 , NULL                                                             , 0x0000, "urn:schemas:calendar:geolongitude", PT_DOUBLE      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarInstanceType                                 , NULL                                                             , 0x0000, "urn:schemas:calendar:instancetype", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarIsOrganizer                                  , NULL                                                             , 0x0000, "urn:schemas:calendar:isorganizer", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarLastModified                                 , NULL                                                             , 0x0000, "urn:schemas:calendar:lastmodified", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarLocationUrl                                  , NULL                                                             , 0x0000, "urn:schemas:calendar:locationurl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarMeetingStatus                                , NULL                                                             , 0x0000, "urn:schemas:calendar:meetingstatus", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarMethod                                       , NULL                                                             , 0x0000, "urn:schemas:calendar:method", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarProductId                                    , NULL                                                             , 0x0000, "urn:schemas:calendar:prodid", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarRecurrenceIdRange                            , NULL                                                             , 0x0000, "urn:schemas:calendar:recurrenceidrange", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarReminderOffset                               , NULL                                                             , 0x0000, "urn:schemas:calendar:reminderoffset", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarResources                                    , NULL                                                             , 0x0000, "urn:schemas:calendar:resources", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarRsvp                                         , NULL                                                             , 0x0000, "urn:schemas:calendar:rsvp", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarSequence                                     , NULL                                                             , 0x0000, "urn:schemas:calendar:sequence", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarTimeZone                                     , NULL                                                             , 0x0000, "urn:schemas:calendar:timezone", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarTimeZoneId                                   , NULL                                                             , 0x0000, "urn:schemas:calendar:timezoneid", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarTransparent                                  , NULL                                                             , 0x0000, "urn:schemas:calendar:transparent", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarUid                                          , NULL                                                             , 0x0000, "urn:schemas:calendar:uid", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCalendarVersion                                      , NULL                                                             , 0x0000, "urn:schemas:calendar:version", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCategory                                             , NULL                                                             , 0x0000, "Category", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCharacterCount                                       , NULL                                                             , 0x0000, "CharCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameComments                                             , NULL                                                             , 0x0000, "Comments", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCompany                                              , NULL                                                             , 0x0000, "Company", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsAlternateRecipient                           , NULL                                                             , 0x0000, "urn:schemas:contacts:alternaterecipient", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsCountry                                      , NULL                                                             , 0x0000, "urn:schemas:contacts:c", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsEmail1                                       , NULL                                                             , 0x0000, "urn:schemas:contacts:email1", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsEmail2                                       , NULL                                                             , 0x0000, "urn:schemas:contacts:email2", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsEmail3                                       , NULL                                                             , 0x0000, "urn:schemas:contacts:email3", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsFileAs                                       , NULL                                                             , 0x0000, "urn:schemas:contacts:fileas", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsFileasId                                     , NULL                                                             , 0x0000, "urn:schemas:contacts:fileasid", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsHomeLatitude                                 , NULL                                                             , 0x0000, "urn:schemas:contacts:homelatitude", PT_DOUBLE      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsHomeLongitude                                , NULL                                                             , 0x0000, "urn:schemas:contacts:homelongitude", PT_DOUBLE      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsHomeTimeZone                                 , NULL                                                             , 0x0000, "urn:schemas:contacts:hometimezone", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsMapUrl                                       , NULL                                                             , 0x0000, "urn:schemas:contacts:mapurl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsOtherCountryCode                             , NULL                                                             , 0x0000, "urn:schemas:contacts:othercountrycode", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsOtherPager                                   , NULL                                                             , 0x0000, "urn:schemas:contacts:otherpager", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsOtherTimeZone                                , NULL                                                             , 0x0000, "urn:schemas:contacts:othertimezone", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsProxyAddresses                               , NULL                                                             , 0x0000, "urn:schemas:contacts:proxyaddresses", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsSecretaryUrl                                 , NULL                                                             , 0x0000, "urn:schemas:contacts:secretaryurl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameContactsSourceUrl                                    , NULL                                                             , 0x0000, "urn:schemas:contacts:sourceurl", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameCreateDateTimeReadOnly                               , NULL                                                             , 0x0000, "CreateDtmRo", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavGetContentType                                    , NULL                                                             , 0x0000, "DAV:getcontenttype", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavId                                                , NULL                                                             , 0x0000, "DAV:id", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavIsCollection                                      , NULL                                                             , 0x0000, "DAV:iscollection", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavIsStructuredDocument                              , NULL                                                             , 0x0000, "DAV:isstructureddocument", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavParentName                                        , NULL                                                             , 0x0000, "DAV:parentname", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavResourceType                                      , NULL                                                             , 0x0000, "DAV:resourcetype", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavSearchRequest                                     , NULL                                                             , 0x0000, "DAV:searchrequest", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavSearchType                                        , NULL                                                             , 0x0000, "DAV:searchtype", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDavUid                                               , NULL                                                             , 0x0000, "DAV:uid", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameDocumentParts                                        , NULL                                                             , 0x0000, "DocParts", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameEditTime                                             , NULL                                                             , 0x0000, "EditTime", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangeIntendedBusyStatus                           , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/intendedbusystatus";, PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangeJunkEmailMoveStamp                           , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/junkemailmovestamp";, PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangeModifyExceptionStructure                     , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/modifyexceptionstruct";, PT_BINARY      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangeNoModifyExceptions                           , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/nomodifyexceptions";, PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangePatternEnd                                   , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/patternend";, PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangePatternStart                                 , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/patternstart";, PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangePublicFolderEmailAddress                     , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/publicfolderemailaddress";, PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchangeReminderInterval                             , NULL                                                             , 0x0000, "http://schemas.microsoft.com/exchange/reminderinterval";, PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchDatabaseSchema                                   , NULL                                                             , 0x0000, "urn:schemas-microsoft-com:exch-data:baseschema", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchDataExpectedContentClass                         , NULL                                                             , 0x0000, "urn:schemas-microsoft-com:exch-data:expected-content-class", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameExchDataSchemaCollectionReference                    , NULL                                                             , 0x0000, "urn:schemas-microsoft-com:exch-data:schema-collection-ref", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHeadingPairs                                         , NULL                                                             , 0x0000, "HeadingPairs", PT_BINARY      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHiddenCount                                          , NULL                                                             , 0x0000, "HiddenCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailCalendar                                     , NULL                                                             , 0x0000, "urn:schemas:httpmail:calendar", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailCc                                           , NULL                                                             , 0x0000, "urn:schemas:httpmail:cc", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailContacts                                     , NULL                                                             , 0x0000, "urn:schemas:httpmail:contacts", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailContentMediaType                             , NULL                                                             , 0x0000, "urn:schemas:httpmail:content-media-type", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailFrom                                         , NULL                                                             , 0x0000, "urn:schemas:httpmail:from", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailFromEmail                                    , NULL                                                             , 0x0000, "urn:schemas:httpmail:fromemail", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailHtmlDescription                              , NULL                                                             , 0x0000, "urn:schemas:httpmail:htmldescription", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailOutbox                                       , NULL                                                             , 0x0000, "urn:schemas:httpmail:outbox", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailSendMessage                                  , NULL                                                             , 0x0000, "urn:schemas:httpmail:sendmsg", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailSubmitted                                    , NULL                                                             , 0x0000, "urn:schemas:httpmail:submitted", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameHttpmailTo                                           , NULL                                                             , 0x0000, "urn:schemas:httpmail:to", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameICalendarRecurrenceDate                              , NULL                                                             , 0x0000, "urn:schemas:calendar:rdate", PT_MV_SYSTIME  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameICalendarRecurrenceRule                              , NULL                                                             , 0x0000, "urn:schemas:calendar:rrule", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameKeywords                                             , NULL                                                             , 0x0000, "Keywords", PT_MV_UNICODE  , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameLastAuthor                                           , NULL                                                             , 0x0000, "LastAuthor", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameLastPrinted                                          , NULL                                                             , 0x0000, "LastPrinted", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameLastSaveDateTime                                     , NULL                                                             , 0x0000, "LastSaveDtm", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameLineCount                                            , NULL                                                             , 0x0000, "LineCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameLinksDirty                                           , NULL                                                             , 0x0000, "LinksDirty", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameMailSubmissionUri                                    , NULL                                                             , 0x0000, "MAIL:submissionuri", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameManager                                              , NULL                                                             , 0x0000, "Manager", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameMultimediaClipCount                                  , NULL                                                             , 0x0000, "MMClipCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameNoteCount                                            , NULL                                                             , 0x0000, "NoteCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameOMSAccountGuid                                       , NULL                                                             , 0x0000, "OMSAccountGuid", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameOMSMobileModel                                       , NULL                                                             , 0x0000, "OMSMobileModel", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameOMSScheduleTime                                      , NULL                                                             , 0x0000, "OMSScheduleTime", PT_SYSTIME     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameOMSServiceType                                       , NULL                                                             , 0x0000, "OMSServiceType", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameOMSSourceType                                        , NULL                                                             , 0x0000, "OMSSourceType", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNamePageCount                                            , NULL                                                             , 0x0000, "PageCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameParagraphCount                                       , NULL                                                             , 0x0000, "ParCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNamePhishingStamp                                        , NULL                                                             , 0x0000, "http://schemas.microsoft.com/outlook/phishingstamp";, PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNamePresentationFormat                                   , NULL                                                             , 0x0000, "PresFormat", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameQuarantineOriginalSender                             , NULL                                                             , 0x0000, "quarantine-original-sender", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameRevisionNumber                                       , NULL                                                             , 0x0000, "RevNumber", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameRightsManagementLicense                              , NULL                                                             , 0x0000, "DRMLicense", PT_MV_BINARY   , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameScale                                                , NULL                                                             , 0x0000, "Scale", PT_BOOLEAN     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameSecurity                                             , NULL                                                             , 0x0000, "Security", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameSlideCount                                           , NULL                                                             , 0x0000, "SlideCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameSubject                                              , NULL                                                             , 0x0000, "Subject", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameTemplate                                             , NULL                                                             , 0x0000, "Template", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameThumbnail                                            , NULL                                                             , 0x0000, "Thumbnail", PT_BINARY      , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameTitle                                                , NULL                                                             , 0x0000, "Title", PT_UNICODE     , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ PidNameWordCount                                            , NULL                                                             , 0x0000, "WordCount", PT_LONG        , MNID_STRING, PS_PUBLIC_STRINGS, 0x0 },
+{ 0x00000000                                                  , NULL                                                             , 0x0000, NULL, PT_UNSPECIFIED , 0x0, NULL, 0x0 }
+};
+
+static void
+set_errno (enum MAPISTATUS status)
+{
+	errno = status;
+}
+
+enum MAPISTATUS
+e_mapi_nameid_lid_lookup_canonical (uint16_t lid, const char *OLEGUID, uint32_t *propTag)
+{
+	uint32_t	i;
+
+	/* Sanity checks */
+	OPENCHANGE_RETVAL_IF(!lid, MAPI_E_INVALID_PARAMETER, NULL);
+	OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
+	OPENCHANGE_RETVAL_IF(!propTag, MAPI_E_INVALID_PARAMETER, NULL);
+
+	for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
+		if (mapi_nameid_tags[i].lid == lid &&
+		    !strcmp(mapi_nameid_tags[i].OLEGUID, OLEGUID)) {
+			*propTag = mapi_nameid_tags[i].proptag;
+			return MAPI_E_SUCCESS;
+		}
+	}
+
+	OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
+}
+
+enum MAPISTATUS
+e_mapi_nameid_string_lookup_canonical(const char *Name, const char *OLEGUID, uint32_t *propTag)
+{
+	uint32_t	i;
+
+	/* Sanity checks */
+	OPENCHANGE_RETVAL_IF(!Name, MAPI_E_INVALID_PARAMETER, NULL);
+	OPENCHANGE_RETVAL_IF(!OLEGUID, MAPI_E_INVALID_PARAMETER, NULL);
+	OPENCHANGE_RETVAL_IF(!propTag, MAPI_E_INVALID_PARAMETER, NULL);
+
+	for (i = 0; mapi_nameid_tags[i].OLEGUID; i++) {
+		if (mapi_nameid_tags[i].Name &&
+		    !strcmp(mapi_nameid_tags[i].Name, Name) &&
+		    !strcmp(mapi_nameid_tags[i].OLEGUID, OLEGUID)) {
+			*propTag = mapi_nameid_tags[i].proptag;
+			return MAPI_E_SUCCESS;
+		}
+	}
+
+	OPENCHANGE_RETVAL_ERR(MAPI_E_NOT_FOUND, NULL);
+}
diff --git a/src/libexchangemapi/e-mapi-openchange.h b/src/libexchangemapi/e-mapi-openchange.h
new file mode 100644
index 0000000..0a1d6e5
--- /dev/null
+++ b/src/libexchangemapi/e-mapi-openchange.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Authors:
+ *    Milan Crha <mcrha redhat com>
+ *
+ * Copyright (C) 2011 Red Hat, Inc. (www.redhat.com)
+ *
+ */
+
+/* till it's available in OpenChange's API */
+
+#ifndef E_MAPI_OPENCHANGE_H
+#define E_MAPI_OPENCHANGE_H
+
+#include <glib.h>
+
+#include <libmapi/libmapi.h>
+
+G_BEGIN_DECLS
+
+enum MAPISTATUS e_mapi_nameid_lid_lookup_canonical (uint16_t lid, const char *OLEGUID, uint32_t *propTag);
+enum MAPISTATUS e_mapi_nameid_string_lookup_canonical(const char *Name, const char *OLEGUID, uint32_t *propTag);
+
+G_END_DECLS
+
+#endif /* E_MAPI_OPENCHANGE_H */
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index 1071b8d..416a73d 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -37,6 +37,7 @@
 #include "exchange-mapi-folder.h"
 #include "exchange-mapi-utils.h"
 #include "exchange-mapi-mail-utils.h"
+#include "e-mapi-fast-transfer.h"
 #include <param.h>
 
 #define DEFAULT_PROF_NAME "mapi-profiles.ldb"
@@ -1644,6 +1645,143 @@ cleanup:
 	return mids;
 }
 
+typedef gboolean (*ForeachTableRowCB) (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, struct SRow *srow, guint32 row_index, guint32 rows_total, gpointer user_data, GError **perror);
+
+static gboolean
+foreach_tablerow (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, mapi_object_t *obj_table, ForeachTableRowCB cb, gpointer user_data, GError **perror)
+{
+	enum MAPISTATUS ms;
+	struct SRowSet SRowSet;
+	uint32_t count, i, cursor_pos = 0;
+
+	CHECK_CORRECT_CONN_AND_GET_PRIV (conn, FALSE);
+	e_return_val_mapi_error_if_fail (priv->session != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (mem_ctx != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (obj_table != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (cb != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+
+	do {
+		/* Number of items in the container */
+		ms = QueryPosition (obj_table, &cursor_pos, &count);
+		if (ms != MAPI_E_SUCCESS) {
+			make_mapi_error (perror, "QueryPosition", ms);
+			break;
+		}
+
+		if (!count)
+			break;
+
+		/* Fill the table columns with data from the rows */
+		ms = QueryRows (obj_table, count, TBL_ADVANCE, &SRowSet);
+		if (ms != MAPI_E_SUCCESS) {
+			make_mapi_error (perror, "QueryRows", ms);
+			break;
+		}
+
+		for (i = 0; i < SRowSet.cRows && ms == MAPI_E_SUCCESS; i++) {
+			if (!cb (conn, fid, mem_ctx, &SRowSet.aRow[i], cursor_pos + i + 1, count, user_data, perror))
+				ms = MAPI_E_RESERVED;
+		}
+	} while (cursor_pos < count && ms == MAPI_E_SUCCESS);
+
+	return ms == MAPI_E_SUCCESS;
+}
+
+struct ListItemsInternalData
+{
+	ListItemsCB cb;
+	gpointer user_data;
+};
+
+static gboolean
+list_items_internal_cb (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, struct SRow *srow, guint32 row_index, guint32 rows_total, gpointer user_data, GError **perror)
+{
+	struct ListItemsInternalData *lii_data = user_data;
+	ListItemsData lid;
+	const mapi_id_t	*pmid;
+	const uint32_t *pmsg_flags;
+	struct SPropValue *last_modified;
+	struct timeval t;
+
+	CHECK_CORRECT_CONN_AND_GET_PRIV (conn, FALSE);
+	e_return_val_mapi_error_if_fail (priv->session != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (mem_ctx != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (srow != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+
+	pmid = get_SPropValue_SRow_data (srow, PR_MID);
+	pmsg_flags = get_SPropValue_SRow_data (srow, PR_MESSAGE_FLAGS);
+	last_modified = get_SPropValue_SRow (srow, PR_LAST_MODIFICATION_TIME);
+
+	lid.mid = pmid ? *pmid : 0;
+	lid.msg_flags = pmsg_flags ? *pmsg_flags : 0;
+
+	if (last_modified && get_mapi_SPropValue_date_timeval (&t, *last_modified) == MAPI_E_SUCCESS)
+		lid.last_modified = t.tv_sec;
+	else
+		lid.last_modified = 0;
+
+	return lii_data->cb (conn, fid, mem_ctx, &lid, row_index, rows_total, lii_data->user_data, perror);
+}
+
+gboolean
+exchange_mapi_connection_list_items (ExchangeMapiConnection *conn, mapi_id_t fid, guint32 options, ListItemsCB cb, gpointer user_data, GError **perror)
+{
+	enum MAPISTATUS ms;
+	TALLOC_CTX *mem_ctx;
+	mapi_object_t obj_folder;
+	mapi_object_t obj_table;
+	gboolean result = FALSE;
+	struct SPropTagArray *propTagArray;
+	struct ListItemsInternalData lii_data;
+
+	CHECK_CORRECT_CONN_AND_GET_PRIV (conn, FALSE);
+	e_return_val_mapi_error_if_fail (priv->session != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+	e_return_val_mapi_error_if_fail (cb != NULL, MAPI_E_INVALID_PARAMETER, FALSE);
+
+	LOCK ();
+	mem_ctx = talloc_init ("ExchangeMAPI_ListItems");
+	mapi_object_init (&obj_folder);
+	mapi_object_init (&obj_table);
+
+	/* Attempt to open the folder */
+	ms = open_folder (conn, 0, &fid, options, &obj_folder, perror);
+	if (ms != MAPI_E_SUCCESS) {
+		goto cleanup;
+	}
+
+	/* Get a handle on the container */
+	ms = GetContentsTable (&obj_folder, &obj_table, TableFlags_UseUnicode, NULL);
+	if (ms != MAPI_E_SUCCESS) {
+		make_mapi_error (perror, "GetContentsTable", ms);
+		goto cleanup;
+	}
+
+	propTagArray = set_SPropTagArray (mem_ctx, 0x3,
+					  PR_MID,
+					  PR_MESSAGE_FLAGS,
+					  PR_LAST_MODIFICATION_TIME);
+
+	/* Set primary columns to be fetched */
+	ms = SetColumns (&obj_table, propTagArray);
+	if (ms != MAPI_E_SUCCESS) {
+		make_mapi_error (perror, "SetColumns", ms);
+		goto cleanup;
+	}
+
+	lii_data.cb = cb;
+	lii_data.user_data = user_data;
+
+	result = foreach_tablerow (conn, fid, mem_ctx, &obj_table, list_items_internal_cb, &lii_data, perror);
+
+ cleanup:
+	mapi_object_release (&obj_folder);
+	mapi_object_release (&obj_table);
+	talloc_free (mem_ctx);
+	UNLOCK ();
+
+	return result;
+}
+
 gboolean
 exchange_mapi_connection_fetch_items   (ExchangeMapiConnection *conn, mapi_id_t fid,
 					struct mapi_SRestriction *res, struct SSortOrderSet *sort_order,
@@ -2059,6 +2197,7 @@ exchange_mapi_connection_fetch_item (ExchangeMapiConnection *conn, mapi_id_t fid
 	if (ms != MAPI_E_SUCCESS) {
 		goto cleanup;
 	}
+
 	/* Open the item */
 	ms = OpenMessage (&obj_folder, fid, mid, &obj_message, 0x0);
 	if (ms != MAPI_E_SUCCESS) {
diff --git a/src/libexchangemapi/exchange-mapi-connection.h b/src/libexchangemapi/exchange-mapi-connection.h
index e2d0427..bce144c 100644
--- a/src/libexchangemapi/exchange-mapi-connection.h
+++ b/src/libexchangemapi/exchange-mapi-connection.h
@@ -141,10 +141,17 @@ typedef struct {
 	uint32_t propid;	/* resolved prop ID; equals to MAPI_E_RESERVED when not found or other error */
 } ResolveNamedIDsData;
 
+typedef struct {
+	mapi_id_t mid; /* message ID, from PR_MID */
+	uint32_t msg_flags; /* MAPI MSGFLAG_* bit OR, from PR_MESSAGE_FLAGS */
+	time_t last_modified; /* PR_LAST_MODIFICATION_TIME as UTC */
+} ListItemsData;
+
 typedef gboolean (*FetchCallback)	(FetchItemsCallbackData *item_data, gpointer data);
 typedef gboolean (*FetchGALCallback)	(ExchangeMapiConnection *conn, uint32_t row_index, uint32_t n_rows, struct SRow *aRow, gpointer data);
 typedef gboolean (*BuildWritePropsCB)	(ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, struct SPropValue **values, uint32_t *n_values, gpointer data);
 typedef gboolean (*BuildReadPropsCB)	(ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, struct SPropTagArray *props, gpointer data);
+typedef gboolean (*ListItemsCB)		(ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, const ListItemsData *item_data, guint32 item_index, guint32 items_total, gpointer user_data, GError **perror);
 
 struct _ExchangeMapiConnection {
 	GObject parent;
@@ -165,6 +172,9 @@ gboolean		exchange_mapi_connection_reconnect (ExchangeMapiConnection *conn, cons
 gboolean		exchange_mapi_connection_close (ExchangeMapiConnection *conn);
 gboolean		exchange_mapi_connection_connected (ExchangeMapiConnection *conn);
 
+gboolean		exchange_mapi_connection_list_items (ExchangeMapiConnection *conn, mapi_id_t fid, guint32 options,
+					ListItemsCB cb, gpointer user_data, GError **perror);
+
 gboolean		exchange_mapi_connection_fetch_object_props (
 					ExchangeMapiConnection *conn, mapi_object_t *obj_folder, mapi_id_t fid, mapi_id_t mid, mapi_object_t *obj_message,
 					BuildReadPropsCB build_props, gpointer brp_data,
diff --git a/src/libexchangemapi/exchange-mapi-debug.c b/src/libexchangemapi/exchange-mapi-debug.c
index 8290f3a..244fdd9 100644
--- a/src/libexchangemapi/exchange-mapi-debug.c
+++ b/src/libexchangemapi/exchange-mapi-debug.c
@@ -51,17 +51,17 @@ exchange_mapi_debug_print (const gchar *format, ...)
 }
 
 static void
-dump_bin (const uint8_t *bin, uint32_t bin_sz, const gchar *line_prefix)
+dump_bin (const uint8_t *bin, uint32_t bin_sz, gint indent)
 {
 	gint k, l, last;
 
+	g_print ("%*s", indent, "");
+
 	if (!bin) {
 		g_print ("NULL");
 		return;
 	}
 
-	g_print ("%s", line_prefix);
-
 	last = 0;
 	for (k = 0; k < bin_sz; k++) {
 		if ((k > 0 && (k % 16) == 0)) {
@@ -78,7 +78,7 @@ dump_bin (const uint8_t *bin, uint32_t bin_sz, const gchar *line_prefix)
 			}
 
 			last = l;
-			g_print ("\n%s", line_prefix);
+			g_print ("\n%*s", indent, "");
 		} else if (k > 0 && (k % 8) == 0) {
 			g_print ("  ");
 		}
@@ -706,7 +706,7 @@ get_namedid_name (ExchangeMapiConnection *conn, mapi_id_t fid, uint32_t proptag)
 }
 
 void
-exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid, struct mapi_SPropValue_array *properties)
+exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid, struct mapi_SPropValue_array *properties, gint indent)
 {
 	gint i = 0;
 
@@ -714,7 +714,7 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 
 	for (i = 0; i < properties->cValues; i++) {
 		struct mapi_SPropValue *lpProp = &properties->lpProps[i];
-		const gchar *tmp =  get_proptag_name (lpProp->ulPropTag);
+		const gchar *tmp = get_proptag_name (lpProp->ulPropTag);
 		gchar t_str[26];
 		gint j = 0;
 
@@ -722,9 +722,9 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 			tmp = get_namedid_name (conn, fid, lpProp->ulPropTag);
 
 		if (tmp && *tmp)
-			g_print ("   %s   ",tmp);
+			g_print ("%*s%s ", indent, "", tmp);
 		else
-			g_print ("   0x%08X   ", lpProp->ulPropTag);
+			g_print ("%*s0x%08X   ", indent, "", lpProp->ulPropTag);
 		switch (lpProp->ulPropTag & 0xFFFF) {
 		case PT_UNSPECIFIED:
 			g_print (" PT_UNSPECIFIED");
@@ -769,11 +769,11 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 			g_print (" (error) - "/* , lpProp->value.err */);
 			break;
 		case PT_STRING8:
-			g_print (" (string) - %s", lpProp->value.lpszA ? lpProp->value.lpszA : "null");
+			g_print (" (string) - '%s'", lpProp->value.lpszA ? lpProp->value.lpszA : "null");
 			break;
 		case PT_UNICODE:
 			if (lpProp)
-				g_print (" (unicodestring) - %s", lpProp->value.lpszW ? lpProp->value.lpszW : lpProp->value.lpszA ? lpProp->value.lpszA : "null");
+				g_print (" (unicodestring) - '%s'", lpProp->value.lpszW ? lpProp->value.lpszW : lpProp->value.lpszA ? lpProp->value.lpszA : "null");
 			break;
 		case PT_OBJECT:
 			g_print (" PT_OBJECT");
@@ -791,13 +791,13 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 			g_print (" PT_ACTIONS");
 			break;
 		case PT_BINARY:
-			g_print (" (struct SBinary_short *) - %p Binary data follows (size %d): \n", &lpProp->value.bin, lpProp->value.bin.cb);
-			dump_bin (lpProp->value.bin.lpb, lpProp->value.bin.cb, "        ");
+			g_print (" (struct SBinary_short *) - %p Binary data follows (size %d): %s", &lpProp->value.bin, lpProp->value.bin.cb, lpProp->value.bin.cb > 0 ? "\n" : "");
+			dump_bin (lpProp->value.bin.lpb, lpProp->value.bin.cb, indent + 3);
 			break;
 		case PT_MV_STRING8:
 			g_print (" (struct mapi_SLPSTRArray *) (%d items)", lpProp->value.MVszA.cValues);
 			for (j = 0; j < lpProp->value.MVszA.cValues; j++) {
-				g_print ("\n      item[%d] = '%s'", j, lpProp->value.MVszA.strings[j].lppszA ? lpProp->value.MVszA.strings[j].lppszA : "[NULL]");
+				g_print ("\n%*sitem[%d] = '%s'", indent + 2, "", j, lpProp->value.MVszA.strings[j].lppszA ? lpProp->value.MVszA.strings[j].lppszA : "[NULL]");
 			}
 			break;
 		case PT_MV_SHORT:
@@ -824,7 +824,7 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 		case PT_MV_UNICODE:
 			g_print (" PT_MV_UNICODE (%d items)", lpProp->value.MVszW.cValues);
 			for (j = 0; j < lpProp->value.MVszW.cValues; j++) {
-				g_print ("\n      item[%d] = '%s'", j, lpProp->value.MVszW.strings[j].lppszW ? lpProp->value.MVszW.strings[j].lppszW : "[NULL]");
+				g_print ("\n%*sitem[%d] = '%s'", indent + 2, "", j, lpProp->value.MVszW.strings[j].lppszW ? lpProp->value.MVszW.strings[j].lppszW : "[NULL]");
 			}
 			break;
 		case PT_MV_SYSTIME:
@@ -836,8 +836,8 @@ exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid
 		case PT_MV_BINARY:
 			g_print (" PT_MV_BINARY (%d items)", lpProp->value.MVbin.cValues);
 			for (j = 0; j < lpProp->value.MVbin.cValues; j++) {
-				g_print ("\n      item[%d] (size %d)\n", j, lpProp->value.MVbin.bin[j].cb);
-				dump_bin (lpProp->value.MVbin.bin[j].lpb, lpProp->value.MVbin.bin[j].cb, "        ");
+				g_print ("\n%*sitem[%d] (size %d)\n", indent + 2, "", j, lpProp->value.MVbin.bin[j].cb);
+				dump_bin (lpProp->value.MVbin.bin[j].lpb, lpProp->value.MVbin.bin[j].cb, indent + 3);
 			}
 			break;
 		default:
diff --git a/src/libexchangemapi/exchange-mapi-debug.h b/src/libexchangemapi/exchange-mapi-debug.h
index ba86421..8d00be8 100644
--- a/src/libexchangemapi/exchange-mapi-debug.h
+++ b/src/libexchangemapi/exchange-mapi-debug.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
 
 gboolean	exchange_mapi_debug_is_enabled (void);
 void		exchange_mapi_debug_print (const gchar *format, ...);
-void		exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid, struct mapi_SPropValue_array *properties);
+void		exchange_mapi_debug_dump_properties (ExchangeMapiConnection *conn, mapi_id_t fid, struct mapi_SPropValue_array *properties, gint indent);
 
 G_END_DECLS
 
diff --git a/src/libexchangemapi/exchange-mapi-mail-utils.c b/src/libexchangemapi/exchange-mapi-mail-utils.c
index 1697af3..4809eb6 100644
--- a/src/libexchangemapi/exchange-mapi-mail-utils.c
+++ b/src/libexchangemapi/exchange-mapi-mail-utils.c
@@ -73,7 +73,7 @@ fetch_props_to_mail_item_cb (FetchItemsCallbackData *item_data, gpointer data)
 	g_return_val_if_fail (data != NULL, FALSE);
 
 	if (camel_debug_start("mapi:folder")) {
-		exchange_mapi_debug_dump_properties (item_data->conn, item_data->fid, item_data->properties);
+		exchange_mapi_debug_dump_properties (item_data->conn, item_data->fid, item_data->properties, 3);
 		camel_debug_end();
 	}
 



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