From 84a0a66c45ecdc9f27a7e9cbb39c4f36dc12b822 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sat, 8 Jan 2011 04:43:48 +0000 Subject: [PATCH] Monotone-Parent: 75fbbbf41d95a388a16c3b3e362766a543bffb0f Monotone-Revision: bc5478c6da74ce0487be5bc0045ffb55f4ff5297 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-01-08T04:43:48 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIStoreContext.m | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 732b93e6f..67ea08d68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-01-07 Wolfgang Sourdeau + * OpenChange/MAPIStoreContext.m (_typeLessTag:): new method + designed to return a known value type for typeless tags that were + requested via getprops. This abstract the missing type from the + call to getChildProperty:... + * OpenChange/MAPIStoreMessageTable.m (-getChildProperty:forKey:withTag:): added generic values for some standard props. diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index e8b8bf841..f072ad9bc 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -1002,6 +1002,22 @@ _prepareContextClass (struct mapistore_context *newMemCtx, save: NO]; } +- (enum MAPITAGS) _typeLessTag: (enum MAPITAGS) tag +{ + if (tag == 0x300b0000) + tag = PR_SEARCH_KEY; + else if (tag == 0x30070000) + tag = PR_CREATION_TIME; + else if (tag == 0x30080000) + tag = PR_LAST_MODIFICATION_TIME; + else if (tag == 0x0e080000) + tag = PR_MESSAGE_SIZE; + else + [self warnWithFormat: @"unknown typeless tag: 0x%.8x", tag]; + + return tag; +} + - (int) getProperties: (struct SPropTagArray *) sPropTagArray ofTableType: (uint8_t) tableType inRow: (struct SRow *) aRow @@ -1040,6 +1056,8 @@ _prepareContextClass (struct mapistore_context *newMemCtx, for (count = 0; count < sPropTagArray->cValues; count++) { tag = sPropTagArray->aulPropTag[count]; + if ((tag & 0x0000ffff) == 0) + tag = [self _typeLessTag: tag]; propValue = NULL; propRc = [table getChildProperty: &propValue