From 650c3978c741b23c76eae0b769c30d675be68906 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 18 Nov 2010 22:29:01 +0000 Subject: [PATCH] Monotone-Parent: 973fe32880e7a6c8ee42f07c740d7b15dd65c069 Monotone-Revision: 370528148dcfe73230eb0ec3b4d64eaa15a3fd9b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-11-18T22:29:01 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++ OpenChange/MAPIStoreMailContext.m | 58 ++----------------------------- 2 files changed, 7 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28b492fd9..2b362e6c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-11-18 Wolfgang Sourdeau + * OpenChange/MAPIStoreMailContext.m + (-getMessageProperties:inRow:atURL:): moved method into + MAPIStoreContext.m since it's generic enough to apply to all the + stores. + * OpenChange/MAPIStoreSOGo.m (sogo_create_context): we now make sure that the MAPIStoreContext class has been loaded. Otherwise we return MAPISTORE_ERROR. diff --git a/OpenChange/MAPIStoreMailContext.m b/OpenChange/MAPIStoreMailContext.m index 46c55a67c..f11a598d5 100644 --- a/OpenChange/MAPIStoreMailContext.m +++ b/OpenChange/MAPIStoreMailContext.m @@ -46,30 +46,14 @@ #include #include -static Class SOGoUserFolderK; - -// @implementation SOGoObject (ZombieD) - -// - (void) dealloc -// { -// [super dealloc]; -// } - -// @end - @implementation MAPIStoreMailContext -+ (void) initialize -{ - SOGoUserFolderK = [SOGoUserFolder class]; -} - - (void) setupModuleFolder { id userFolder, accountsFolder; - userFolder = [SOGoUserFolderK objectWithName: [authenticator username] - inContainer: MAPIApp]; + userFolder = [SOGoUserFolder objectWithName: [authenticator username] + inContainer: MAPIApp]; [woContext setClientObject: userFolder]; [userFolder retain]; // LEAK @@ -514,42 +498,4 @@ static Class SOGoUserFolderK; return rc; } -- (int) getMessageProperties: (struct SPropTagArray *) sPropTagArray - inRow: (struct SRow *) aRow - atURL: (NSString *) childURL -{ - id child; - NSInteger count; - void *propValue; - uint32_t tag; - int rc; - - child = [self lookupObject: childURL]; - if (child) - { - aRow->lpProps = talloc_array (aRow, struct SPropValue, - sPropTagArray->cValues); - for (count = 0; count < sPropTagArray->cValues; count++) - { - tag = sPropTagArray->aulPropTag[count]; - if ([self getMessageTableChildproperty: &propValue - atURL: childURL - withTag: tag - inFolder: nil - withFID: 0] - == MAPI_E_SUCCESS) - { - set_SPropValue_proptag (&(aRow->lpProps[aRow->cValues]), - tag, propValue); - aRow->cValues++; - } - } - rc = MAPI_E_SUCCESS; - } - else - rc = MAPI_E_NOT_FOUND; - - return rc; -} - @end