[evolution-mapi] Bug #642450 - Does not build against openchange trunk
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Bug #642450 - Does not build against openchange trunk
- Date: Thu, 17 Feb 2011 08:08:58 +0000 (UTC)
commit 5758aac57e128e7a069532700703d1c600555785
Author: Sean Finney <seanius seanius net>
Date: Thu Feb 17 09:08:05 2011 +0100
Bug #642450 - Does not build against openchange trunk
These changes should still be API-compatible with the previous release
of openchange, but in trunk a few key properties have changed names and
this needs to be conditionally reflected here.
src/libexchangemapi/exchange-mapi-cal-utils.c | 7 ++++++-
src/libexchangemapi/exchange-mapi-connection.c | 16 ++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index f947bf4..a3c87ce 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -34,6 +34,11 @@
#define O_BINARY 0
#endif
+/* This property changed names in openchange, try to support both */
+#ifndef PidLidTaskAcceptanceState
+ #define PidLidTaskAcceptanceState PidLidAcceptanceState
+#endif
+
#define d(x)
static gboolean appt_build_name_id (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem_ctx, struct SPropTagArray *props);
@@ -1252,7 +1257,7 @@ task_build_name_id (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *mem
{ PidLidTaskFRecurring, 0 },
{ PidLidTaskRole, 0 },
{ PidLidTaskOwnership, 0 },
- { PidLidAcceptanceState, 0 }
+ { PidLidTaskAcceptanceState, 0 }
};
if (!props)
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index fd2faa8..92dbda5 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -3079,8 +3079,16 @@ cleanup:
return result;
}
-/* TODO : Find a right place for this. */
-#define PR_ADDITIONAL_REN_ENTRYIDS PROP_TAG(PT_MV_BINARY, 0x36D8)
+/* TODO : Find a right place for this.
+ * The following are only defined in openchange fairly recently, so
+ * we will conditionally define them here otherwise
+ */
+#ifndef PR_ADDITIONAL_REN_ENTRYIDS
+ #define PR_ADDITIONAL_REN_ENTRYIDS PROP_TAG(PT_MV_BINARY, 0x36D8)
+#endif
+#ifndef PidTagMailboxOwnerName
+ #define PidTagMailboxOwnerName PR_USER_NAME_UNICODE
+#endif
/*NOTE : This should be called when you hold the connection lock*/
/*NOTE : IsMailboxFolder doesn't support this yet. */
@@ -3255,7 +3263,7 @@ exchange_mapi_connection_get_folders_list (ExchangeMapiConnection *conn, GSList
PR_DISPLAY_NAME_UNICODE,
PR_MAILBOX_OWNER_NAME_UNICODE,
PR_MESSAGE_SIZE,
- PR_USER_NAME_UNICODE);
+ PidTagMailboxOwnerName);
lpProps = talloc_zero(mem_ctx, struct SPropValue);
ms = GetProps (&priv->msg_store, SPropTagArray, &lpProps, &count);
@@ -3274,7 +3282,7 @@ exchange_mapi_connection_get_folders_list (ExchangeMapiConnection *conn, GSList
/* betting that these will never fail */
mailbox_name = (const gchar *) exchange_mapi_util_find_row_propval (&aRow, PR_DISPLAY_NAME_UNICODE);
mailbox_owner_name = (const gchar *) exchange_mapi_util_find_row_propval (&aRow, PR_MAILBOX_OWNER_NAME_UNICODE);
- mailbox_user_name = (const gchar *) exchange_mapi_util_find_row_propval (&aRow, PR_USER_NAME_UNICODE);
+ mailbox_user_name = (const gchar *) exchange_mapi_util_find_row_propval (&aRow, PidTagMailboxOwnerName);
mailbox_size = (const uint32_t *)exchange_mapi_util_find_row_propval (&aRow, PR_MESSAGE_SIZE);
/* Prepare the directory listing */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]