Big refactor for new caching mechanism.
parent
ef2188962a
commit
5f9fb4e1c4
|
@ -46,11 +46,7 @@ $(SOGOBACKEND)_OBJC_FILES += \
|
||||||
MAPIStoreSamDBUtils.m \
|
MAPIStoreSamDBUtils.m \
|
||||||
MAPIStoreUserContext.m \
|
MAPIStoreUserContext.m \
|
||||||
\
|
\
|
||||||
SOGoMAPIObject.m \
|
|
||||||
\
|
|
||||||
SOGoMAPIDBObject.m \
|
|
||||||
SOGoMAPIDBMessage.m \
|
SOGoMAPIDBMessage.m \
|
||||||
SOGoMAPIDBFolder.m \
|
|
||||||
\
|
\
|
||||||
MAPIStoreAppointmentWrapper.m \
|
MAPIStoreAppointmentWrapper.m \
|
||||||
MAPIStoreAttachment.m \
|
MAPIStoreAttachment.m \
|
||||||
|
@ -123,13 +119,6 @@ $(SOGOBACKEND)_OBJC_FILES += \
|
||||||
iCalEvent+MAPIStore.m \
|
iCalEvent+MAPIStore.m \
|
||||||
iCalTimeZone+MAPIStore.m \
|
iCalTimeZone+MAPIStore.m \
|
||||||
\
|
\
|
||||||
GCSSpecialQueries+OpenChange.m\
|
|
||||||
\
|
|
||||||
EOQualifier+MAPI.m \
|
|
||||||
\
|
|
||||||
EOBitmaskQualifier.m \
|
|
||||||
\
|
|
||||||
BSONCodec.m \
|
|
||||||
RTFHandler.m
|
RTFHandler.m
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* MAPIStoreDBBaseContext.m - this file is part of SOGo
|
/* MAPIStoreDBBaseContext.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc.
|
* Copyright (C) 2012-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -32,7 +30,7 @@
|
||||||
#import "MAPIStoreDBFolder.h"
|
#import "MAPIStoreDBFolder.h"
|
||||||
#import "MAPIStoreMapping.h"
|
#import "MAPIStoreMapping.h"
|
||||||
#import "MAPIStoreUserContext.h"
|
#import "MAPIStoreUserContext.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
|
|
||||||
#import "MAPIStoreDBBaseContext.h"
|
#import "MAPIStoreDBBaseContext.h"
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#import <EOControl/EOQualifier.h>
|
#import <EOControl/EOQualifier.h>
|
||||||
#import <SOGo/SOGoFolder.h>
|
#import <SOGo/SOGoFolder.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import "EOQualifier+MAPI.h"
|
#import <SOGo/EOQualifier+SOGoCacheObject.h>
|
||||||
#import "MAPIStoreContext.h"
|
#import "MAPIStoreContext.h"
|
||||||
#import "MAPIStoreDBFolderTable.h"
|
#import "MAPIStoreDBFolderTable.h"
|
||||||
#import "MAPIStoreDBMessage.h"
|
#import "MAPIStoreDBMessage.h"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
#import "MAPIStoreMapping.h"
|
#import "MAPIStoreMapping.h"
|
||||||
#import "MAPIStoreTypes.h"
|
#import "MAPIStoreTypes.h"
|
||||||
#import "MAPIStoreUserContext.h"
|
#import "MAPIStoreUserContext.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
#import "SOGoMAPIDBMessage.h"
|
#import "SOGoMAPIDBMessage.h"
|
||||||
|
|
||||||
#import "MAPIStoreDBFolder.h"
|
#import "MAPIStoreDBFolder.h"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* MAPIStoreFallbackContext.m - this file is part of SOGo
|
/* MAPIStoreFallbackContext.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Inverse inc.
|
* Copyright (C) 2011-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -26,7 +24,7 @@
|
||||||
|
|
||||||
#import "MAPIStoreUserContext.h"
|
#import "MAPIStoreUserContext.h"
|
||||||
#import "NSString+MAPIStore.h"
|
#import "NSString+MAPIStore.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
|
|
||||||
#import "MAPIStoreFallbackContext.h"
|
#import "MAPIStoreFallbackContext.h"
|
||||||
|
|
||||||
|
@ -51,7 +49,7 @@
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
struct mapistore_contexts_list *firstContext = NULL, *context;
|
struct mapistore_contexts_list *firstContext = NULL, *context;
|
||||||
SOGoMAPIDBFolder *root;
|
SOGoCacheGCSFolder *root;
|
||||||
NSArray *names;
|
NSArray *names;
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
NSString *baseURL, *url, *name;
|
NSString *baseURL, *url, *name;
|
||||||
|
@ -70,7 +68,7 @@
|
||||||
|
|
||||||
/* Maybe emsmdbp_provisioning should be fixed in order to only take the uri
|
/* Maybe emsmdbp_provisioning should be fixed in order to only take the uri
|
||||||
returned above to avoid deleting its entries... */
|
returned above to avoid deleting its entries... */
|
||||||
root = [SOGoMAPIDBFolder objectWithName: [self MAPIModuleName]
|
root = [SOGoCacheGCSFolder objectWithName: [self MAPIModuleName]
|
||||||
inContainer: nil];
|
inContainer: nil];
|
||||||
[root setOwner: userName];
|
[root setOwner: userName];
|
||||||
userContext = [MAPIStoreUserContext userContextWithUsername: userName
|
userContext = [MAPIStoreUserContext userContextWithUsername: userName
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* MAPIStoreFolder.m - this file is part of SOGo
|
/* MAPIStoreFolder.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Inverse inc
|
* Copyright (C) 2011-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -51,7 +49,7 @@
|
||||||
#import "NSDate+MAPIStore.h"
|
#import "NSDate+MAPIStore.h"
|
||||||
#import "NSString+MAPIStore.h"
|
#import "NSString+MAPIStore.h"
|
||||||
#import "NSObject+MAPIStore.h"
|
#import "NSObject+MAPIStore.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
#import "SOGoMAPIDBMessage.h"
|
#import "SOGoMAPIDBMessage.h"
|
||||||
|
|
||||||
#include <gen_ndr/exchange.h>
|
#include <gen_ndr/exchange.h>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#import "NSData+MAPIStore.h"
|
#import "NSData+MAPIStore.h"
|
||||||
#import "NSString+MAPIStore.h"
|
#import "NSString+MAPIStore.h"
|
||||||
#import "SOGoMAPIDBMessage.h"
|
#import "SOGoMAPIDBMessage.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
|
|
||||||
#import "MAPIStoreMailVolatileMessage.h"
|
#import "MAPIStoreMailVolatileMessage.h"
|
||||||
|
|
||||||
|
@ -1172,9 +1172,9 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||||
|
|
||||||
- (MAPIStoreMessage *) createMessage
|
- (MAPIStoreMessage *) createMessage
|
||||||
{
|
{
|
||||||
SOGoMAPIObject *childObject;
|
SOGoCacheObject *childObject;
|
||||||
|
|
||||||
childObject = [SOGoMAPIObject objectWithName: [SOGoMAPIObject
|
childObject = [SOGoCacheObject objectWithName: [SOGoCacheObject
|
||||||
globallyUniqueObjectId]
|
globallyUniqueObjectId]
|
||||||
inContainer: sogoObject];
|
inContainer: sogoObject];
|
||||||
return [MAPIStoreMailVolatileMessage
|
return [MAPIStoreMailVolatileMessage
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
#import "NSData+MAPIStore.h"
|
#import "NSData+MAPIStore.h"
|
||||||
#import "NSObject+MAPIStore.h"
|
#import "NSObject+MAPIStore.h"
|
||||||
#import "NSString+MAPIStore.h"
|
#import "NSString+MAPIStore.h"
|
||||||
#import "SOGoMAPIObject.h"
|
#import <SOGo/SOGoCacheObject.h>
|
||||||
|
|
||||||
#import "MAPIStoreMailVolatileMessage.h"
|
#import "MAPIStoreMailVolatileMessage.h"
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <EOControl/EOQualifier.h>
|
#import <EOControl/EOQualifier.h>
|
||||||
|
|
||||||
#import "EOBitmaskQualifier.h"
|
#import <SOGo/EOBitmaskQualifier.h>
|
||||||
#import "MAPIStoreActiveTables.h"
|
#import "MAPIStoreActiveTables.h"
|
||||||
#import "MAPIStoreObject.h"
|
#import "MAPIStoreObject.h"
|
||||||
#import "MAPIStoreTypes.h"
|
#import "MAPIStoreTypes.h"
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#import <Mailer/SOGoMailAccount.h>
|
#import <Mailer/SOGoMailAccount.h>
|
||||||
#import <Mailer/SOGoMailAccounts.h>
|
#import <Mailer/SOGoMailAccounts.h>
|
||||||
|
|
||||||
#import "GCSSpecialQueries+OpenChange.h"
|
#import <SOGo/GCSSpecialQueries+SOGoCacheObject.h>
|
||||||
#import "MAPIApplication.h"
|
#import "MAPIApplication.h"
|
||||||
#import "MAPIStoreAuthenticator.h"
|
#import "MAPIStoreAuthenticator.h"
|
||||||
#import "MAPIStoreMapping.h"
|
#import "MAPIStoreMapping.h"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* dbmsgdump.m - this file is part of SOGo
|
/* dbmsgdump.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Inverse inc
|
* Copyright (C) 2011-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +31,7 @@
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
#import <NGExtensions/NSNull+misc.h>
|
#import <NGExtensions/NSNull+misc.h>
|
||||||
|
|
||||||
#import "BSONCodec.h"
|
#import <SOGo/BSONCodec.h>
|
||||||
|
|
||||||
const char *indentationStep = " ";
|
const char *indentationStep = " ";
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include <SOGo/SOGoCacheGCSObject.h>
|
||||||
|
|
||||||
|
@interface SOGoCacheGCSObject (MAPIStore)
|
||||||
|
|
||||||
|
- (Class) mapistoreMessageClass;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,42 @@
|
||||||
|
#include "SOGoCacheGCSObject+MAPIStore.h"
|
||||||
|
|
||||||
|
@implementation SOGoCacheGCSObject (MAPIStore)
|
||||||
|
|
||||||
|
- (Class) mapistoreMessageClass
|
||||||
|
{
|
||||||
|
NSString *className, *mapiMsgClass;
|
||||||
|
|
||||||
|
switch (objectType)
|
||||||
|
{
|
||||||
|
case MAPIMessageCacheObject:
|
||||||
|
mapiMsgClass = [properties
|
||||||
|
objectForKey: MAPIPropertyKey (PidTagMessageClass)];
|
||||||
|
if (mapiMsgClass)
|
||||||
|
{
|
||||||
|
if ([mapiMsgClass isEqualToString: @"IPM.StickyNote"])
|
||||||
|
className = @"MAPIStoreNotesMessage";
|
||||||
|
else
|
||||||
|
className = @"MAPIStoreDBMessage";
|
||||||
|
//[self logWithFormat: @"PidTagMessageClass = '%@', returning '%@'",
|
||||||
|
// mapiMsgClass, className];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//[self warnWithFormat: @"PidTagMessageClass is not set, falling back"
|
||||||
|
// @" to 'MAPIStoreDBMessage'"];
|
||||||
|
className = @"MAPIStoreDBMessage";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MAPIFAICacheObject:
|
||||||
|
className = @"MAPIStoreFAIMessage";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
[NSException raise: @"MAPIStoreIOException"
|
||||||
|
format: @"message class should not be queried for objects"
|
||||||
|
@" of type '%d'", objectType];
|
||||||
|
}
|
||||||
|
|
||||||
|
return NSClassFromString (className);
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIDBMessage.h - this file is part of SOGo
|
/* SOGoMAPIDBMessage.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc.
|
* Copyright (C) 2012-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,12 +21,12 @@
|
||||||
#ifndef SOGOMAPIDBMESSAGE_H
|
#ifndef SOGOMAPIDBMESSAGE_H
|
||||||
#define SOGOMAPIDBMESSAGE_H
|
#define SOGOMAPIDBMESSAGE_H
|
||||||
|
|
||||||
#import "SOGoMAPIDBObject.h"
|
#import <SOGo/SOGoCacheGCSObject.h>
|
||||||
|
|
||||||
@class NSDate;
|
@class NSDate;
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
|
||||||
@interface SOGoMAPIDBMessage : SOGoMAPIDBObject
|
@interface SOGoMAPIDBMessage : SOGoCacheGCSObject
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* SOGOMAPIDBMESSAGE_H */
|
#endif /* SOGOMAPIDBMESSAGE_H */
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
|
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import <SOGo/SOGoCacheGCSFolder.h>
|
||||||
|
|
||||||
#import "SOGoMAPIDBMessage.h"
|
#import "SOGoMAPIDBMessage.h"
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#import <SOGo/SOGoSystemDefaults.h>
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
|
|
||||||
#import "MAPIStoreUserContext.h"
|
#import "MAPIStoreUserContext.h"
|
||||||
#import "SOGoMAPIDBObject.h"
|
#import <SOGo/SOGoCacheGCSObject.h>
|
||||||
|
|
||||||
#import "NSObject+PropertyList.m"
|
#import "NSObject+PropertyList.m"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* EOBitmaskQualifier.h - this file is part of SOGo
|
/* EOBitmaskQualifier.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Inverse inc
|
* Copyright (C) 2010-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
|
@ -1,8 +1,6 @@
|
||||||
/* EOBitmaskQualifier.m - this file is part of SOGo
|
/* EOBitmaskQualifier.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Inverse inc
|
* Copyright (C) 2010-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
|
@ -1,8 +1,6 @@
|
||||||
/* EOQualifier+MAPI.h - this file is part of SOGo
|
/* EOQualifier+SOGoCacheObject.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Inverse inc.
|
* Copyright (C) 2010-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,17 +18,17 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef EOQUALIFIER_MAPI_H
|
#ifndef EOQUALIFIER_SOGOCACHEOBJECT_H
|
||||||
#define EOQUALIFIER_MAPI_H
|
#define EOQUALIFIER_SOGOCACHEOBJECT_H
|
||||||
|
|
||||||
#import <EOControl/EOQualifier.h>
|
#import <EOControl/EOQualifier.h>
|
||||||
|
|
||||||
@class SOGoMAPIDBObject;
|
@class SOGoCacheGCSObject;
|
||||||
|
|
||||||
@interface EOQualifier (MAPIStoreRestrictions)
|
@interface EOQualifier (SOGoCacheObjectRestrictions)
|
||||||
|
|
||||||
- (BOOL) evaluateSOGoMAPIDBObject: (SOGoMAPIDBObject *) object;
|
- (BOOL) evaluateSOGoMAPIDBObject: (SOGoCacheGCSObject *) object;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* EOQUALIFIER_MAPI_H */
|
#endif /* EOQUALIFIER_CACHEOBJECT_H */
|
|
@ -1,8 +1,6 @@
|
||||||
/* EOQualifier+MAPI.m - this file is part of SOGo
|
/* EOQualifier+SOGoCacheObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Inverse inc
|
* Copyright (C) 2010-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -29,11 +27,11 @@
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
|
|
||||||
#import "EOBitmaskQualifier.h"
|
#import "EOBitmaskQualifier.h"
|
||||||
#import "SOGoMAPIDBObject.h"
|
#import "SOGoCacheGCSObject.h"
|
||||||
|
|
||||||
#import "EOQualifier+MAPI.h"
|
#import "EOQualifier+SOGoCacheObject.h"
|
||||||
|
|
||||||
@implementation EOQualifier (MAPIStoreRestrictions)
|
@implementation EOQualifier (SOGoCacheObjectRestrictions)
|
||||||
|
|
||||||
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
||||||
{
|
{
|
||||||
|
@ -41,7 +39,7 @@
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) evaluateSOGoMAPIDBObject: (SOGoMAPIDBObject *) object
|
- (BOOL) evaluateSOGoMAPIDBObject: (SOGoCacheGCSObject *) object
|
||||||
{
|
{
|
||||||
NSDictionary *properties;
|
NSDictionary *properties;
|
||||||
BOOL rc;
|
BOOL rc;
|
||||||
|
@ -58,7 +56,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation EOAndQualifier (MAPIStoreRestrictionsPrivate)
|
@implementation EOAndQualifier (SOGoCacheRestrictionsPrivate)
|
||||||
|
|
||||||
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
||||||
{
|
{
|
||||||
|
@ -76,7 +74,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation EOOrQualifier (MAPIStoreRestrictionsPrivate)
|
@implementation EOOrQualifier (SOGoCacheObjectRestrictionsPrivate)
|
||||||
|
|
||||||
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
||||||
{
|
{
|
||||||
|
@ -94,7 +92,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation EONotQualifier (MAPIStoreRestrictionsPrivate)
|
@implementation EONotQualifier (SOGoCacheObjectRestrictionsPrivate)
|
||||||
|
|
||||||
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
||||||
{
|
{
|
||||||
|
@ -103,7 +101,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation EOKeyValueQualifier (MAPIStoreRestrictionsPrivate)
|
@implementation EOKeyValueQualifier (SOGoCacheObjectRestrictionsPrivate)
|
||||||
|
|
||||||
typedef BOOL (*EOComparator) (id, SEL, id);
|
typedef BOOL (*EOComparator) (id, SEL, id);
|
||||||
|
|
||||||
|
@ -134,7 +132,7 @@ typedef BOOL (*EOComparator) (id, SEL, id);
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation EOBitmaskQualifier (MAPIStoreRestrictionsPrivate)
|
@implementation EOBitmaskQualifier (SOGoCacheObjectRestrictionsPrivate)
|
||||||
|
|
||||||
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
- (BOOL) _evaluateSOGoMAPIDBObject: (NSDictionary *) properties
|
||||||
{
|
{
|
|
@ -1,8 +1,6 @@
|
||||||
/* GCSSpecialQueries+OpenChange.h - this file is part of SOGo
|
/* GCSSpecialQueries+SOGoCacheObject.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,15 +18,15 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GCSSPECIALQUERIES_OPENCHANGE_H
|
#ifndef GCSSPECIALQUERIES_SOGOCACHEOBJECT_H
|
||||||
#define GCSSPECIALQUERIES_OPENCHANGE_H
|
#define GCSSPECIALQUERIES_SOGOCACHEOBJECT_H
|
||||||
|
|
||||||
#import <GDLContentStore/GCSSpecialQueries.h>
|
#import <GDLContentStore/GCSSpecialQueries.h>
|
||||||
|
|
||||||
@interface GCSSpecialQueries (OpenChangeHelpers)
|
@interface GCSSpecialQueries (SOGoCacheObject)
|
||||||
|
|
||||||
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName;
|
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* GCSSPECIALQUERIES_OPENCHANGE_H */
|
#endif /* GCSSPECIALQUERIES_SOGOCACHEOBJECT_H */
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* GCSSpecialQueries+OpenChange.m - this file is part of SOGo
|
/* GCSSpecialQueries+SOGoCacheObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -22,18 +20,18 @@
|
||||||
|
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import "GCSSpecialQueries+OpenChange.h"
|
#import "GCSSpecialQueries+SOGoCacheObject.h"
|
||||||
|
|
||||||
@interface GCSPostgreSQLSpecialQueries (OpenChangeHelpers)
|
@interface GCSPostgreSQLSpecialQueries (SOGoObjectCache)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface GCSMySQLSpecialQueries (OpenChangeHelpers)
|
@interface GCSMySQLSpecialQueries (SOGoObjectCache)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface GCSOracleSpecialQueries (OpenChangeHelpers)
|
@interface GCSOracleSpecialQueries (SOGoObjectCache)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation GCSSpecialQueries (OpenChangeHelpers)
|
@implementation GCSSpecialQueries (SOGoObjectCache)
|
||||||
|
|
||||||
/* FIXME: c_parent_path should be indexed */
|
/* FIXME: c_parent_path should be indexed */
|
||||||
|
|
||||||
|
@ -46,7 +44,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation GCSPostgreSQLSpecialQueries (OpenChangeHelpers)
|
@implementation GCSPostgreSQLSpecialQueries (SOGoObjectCache)
|
||||||
|
|
||||||
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
||||||
{
|
{
|
||||||
|
@ -66,7 +64,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation GCSMySQLSpecialQueries (OpenChangeHelpers)
|
@implementation GCSMySQLSpecialQueries (SOGoObjectCache)
|
||||||
|
|
||||||
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
||||||
{
|
{
|
||||||
|
@ -86,7 +84,7 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation GCSOracleSpecialQueries (OpenChangeHelpers)
|
@implementation GCSOracleSpecialQueries (SOGoObjectCache)
|
||||||
|
|
||||||
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
- (NSString *) createOpenChangeFSTableWithName: (NSString *) tableName
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,14 @@ SOGo_HEADER_FILES = \
|
||||||
SOGoBuild.h \
|
SOGoBuild.h \
|
||||||
SOGoProductLoader.h \
|
SOGoProductLoader.h \
|
||||||
\
|
\
|
||||||
|
BSONCodec.h \
|
||||||
|
EOBitmaskQualifier.h \
|
||||||
|
EOQualifier+SOGoCacheObject.h \
|
||||||
|
GCSSpecialQueries+SOGoCacheObject.h \
|
||||||
SOGoCache.h \
|
SOGoCache.h \
|
||||||
|
SOGoCacheGCSFolder.h \
|
||||||
|
SOGoCacheGCSObject.h \
|
||||||
|
SOGoCacheObject.h \
|
||||||
SOGoConstants.h \
|
SOGoConstants.h \
|
||||||
SOGoObject.h \
|
SOGoObject.h \
|
||||||
SOGoContentObject.h \
|
SOGoContentObject.h \
|
||||||
|
@ -80,7 +87,14 @@ SOGo_OBJC_FILES = \
|
||||||
SOGoBuild.m \
|
SOGoBuild.m \
|
||||||
SOGoProductLoader.m \
|
SOGoProductLoader.m \
|
||||||
\
|
\
|
||||||
|
BSONCodec.m \
|
||||||
|
EOBitmaskQualifier.m \
|
||||||
|
EOQualifier+SOGoCacheObject.m \
|
||||||
|
GCSSpecialQueries+SOGoCacheObject.m \
|
||||||
SOGoCache.m \
|
SOGoCache.m \
|
||||||
|
SOGoCacheGCSFolder.m \
|
||||||
|
SOGoCacheGCSObject.m \
|
||||||
|
SOGoCacheObject.m \
|
||||||
SOGoConstants.m \
|
SOGoConstants.m \
|
||||||
SOGoObject.m \
|
SOGoObject.m \
|
||||||
SOGoContentObject.m \
|
SOGoContentObject.m \
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIDBFolder.h - this file is part of SOGo
|
/* SOGoCacheGCSFolder.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc.
|
* Copyright (C) 2012-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,10 +18,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SOGOMAPIDBFOLDER_H
|
#ifndef SOGOCACHEGCSFOLDER_H
|
||||||
#define SOGOMAPIDBFOLDER_H
|
#define SOGOCACHEGCSFOLDER_H
|
||||||
|
|
||||||
#import "SOGoMAPIDBObject.h"
|
#import "SOGoCacheGCSObject.h"
|
||||||
|
|
||||||
@class NSArray;
|
@class NSArray;
|
||||||
@class NSMutableString;
|
@class NSMutableString;
|
||||||
|
@ -32,12 +30,10 @@
|
||||||
|
|
||||||
@class EOQualifier;
|
@class EOQualifier;
|
||||||
|
|
||||||
@class SOGoMAPIDBMessage;
|
@interface SOGoCacheGCSFolder : SOGoCacheGCSObject
|
||||||
|
|
||||||
@interface SOGoMAPIDBFolder : SOGoMAPIDBObject
|
|
||||||
{
|
{
|
||||||
NSString *pathPrefix; /* for root folders */
|
NSString *pathPrefix; /* for root folders */
|
||||||
SOGoMAPIDBObject *aclMessage;
|
SOGoCacheGCSObject *aclMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setPathPrefix: (NSString *) newPathPrefix;
|
- (void) setPathPrefix: (NSString *) newPathPrefix;
|
||||||
|
@ -56,4 +52,4 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* SOGOMAPIDBFOLDER_H */
|
#endif /* SOGOCACHEGCSFOLDER_H */
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIDBFolder.m - this file is part of SOGo
|
/* SOGoCacheGCSFolder.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc.
|
* Copyright (C) 2012-2014 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -38,28 +36,27 @@
|
||||||
#import <SOGo/NSString+Utilities.h>
|
#import <SOGo/NSString+Utilities.h>
|
||||||
#import <SOGo/SOGoDomainDefaults.h>
|
#import <SOGo/SOGoDomainDefaults.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import "EOQualifier+MAPI.h"
|
#import "EOQualifier+SOGoCacheObject.h"
|
||||||
#import "GCSSpecialQueries+OpenChange.h"
|
#import "GCSSpecialQueries+SOGoCacheObject.h"
|
||||||
#import "SOGoMAPIDBMessage.h"
|
|
||||||
|
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import "SOGoCacheGCSFolder.h"
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
#include <stdbool.h>
|
//#include <stdbool.h>
|
||||||
#include <talloc.h>
|
//#include <talloc.h>
|
||||||
#include <util/time.h>
|
//#include <util/time.h>
|
||||||
#include <mapistore/mapistore.h>
|
//#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_errors.h>
|
//#include <mapistore/mapistore_errors.h>
|
||||||
#include <libmapiproxy.h>
|
//#include <libmapiproxy.h>
|
||||||
#include <param.h>
|
//#include <param.h>
|
||||||
|
|
||||||
Class SOGoMAPIDBObjectK = Nil;
|
Class SOGoCacheGCSObjectK = Nil;
|
||||||
|
|
||||||
@implementation SOGoMAPIDBFolder
|
@implementation SOGoCacheGCSFolder
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
SOGoMAPIDBObjectK = [SOGoMAPIDBObject class];
|
SOGoCacheGCSObjectK = [SOGoCacheGCSObject class];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
@ -77,7 +74,7 @@ Class SOGoMAPIDBObjectK = Nil;
|
||||||
if ((self = [super initWithName: name inContainer: newContainer]))
|
if ((self = [super initWithName: name inContainer: newContainer]))
|
||||||
{
|
{
|
||||||
objectType = MAPIFolderCacheObject;
|
objectType = MAPIFolderCacheObject;
|
||||||
aclMessage = [SOGoMAPIDBObject objectWithName: @"permissions"
|
aclMessage = [SOGoCacheGCSObject objectWithName: @"permissions"
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
[aclMessage setObjectType: MAPIInternalCacheObject];
|
[aclMessage setObjectType: MAPIInternalCacheObject];
|
||||||
[aclMessage retain];
|
[aclMessage retain];
|
||||||
|
@ -147,7 +144,7 @@ Class SOGoMAPIDBObjectK = Nil;
|
||||||
NSArray *records;
|
NSArray *records;
|
||||||
NSDictionary *record;
|
NSDictionary *record;
|
||||||
NSUInteger childPathPrefixLen, count, max;
|
NSUInteger childPathPrefixLen, count, max;
|
||||||
SOGoMAPIDBObject *currentChild;
|
SOGoCacheGCSObject *currentChild;
|
||||||
|
|
||||||
/* query construction */
|
/* query construction */
|
||||||
sql = [NSMutableString stringWithCapacity: 256];
|
sql = [NSMutableString stringWithCapacity: 256];
|
||||||
|
@ -181,7 +178,7 @@ Class SOGoMAPIDBObjectK = Nil;
|
||||||
{
|
{
|
||||||
if (qualifier)
|
if (qualifier)
|
||||||
{
|
{
|
||||||
currentChild = [SOGoMAPIDBObject objectWithName: childKey
|
currentChild = [SOGoCacheGCSObject objectWithName: childKey
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
[currentChild setupFromRecord: record];
|
[currentChild setupFromRecord: record];
|
||||||
if ([qualifier evaluateSOGoMAPIDBObject: currentChild])
|
if ([qualifier evaluateSOGoMAPIDBObject: currentChild])
|
||||||
|
@ -361,7 +358,7 @@ Class SOGoMAPIDBObjectK = Nil;
|
||||||
if ([[record objectForKey: @"c_type"] intValue] == MAPIFolderCacheObject)
|
if ([[record objectForKey: @"c_type"] intValue] == MAPIFolderCacheObject)
|
||||||
objectClass = isa;
|
objectClass = isa;
|
||||||
else
|
else
|
||||||
objectClass = SOGoMAPIDBObjectK;
|
objectClass = SOGoCacheGCSObjectK;
|
||||||
|
|
||||||
object = [objectClass objectWithName: childName
|
object = [objectClass objectWithName: childName
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
|
@ -378,7 +375,7 @@ Class SOGoMAPIDBObjectK = Nil;
|
||||||
{
|
{
|
||||||
id object;
|
id object;
|
||||||
|
|
||||||
object = [SOGoMAPIDBFolder objectWithName: folderName
|
object = [SOGoCacheGCSFolder objectWithName: folderName
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
[object reloadIfNeeded];
|
[object reloadIfNeeded];
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIDBObject.h - this file is part of SOGo
|
/* SOGoCacheGCSObject.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,10 +18,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SOGOMAPIDBOBJECT_H
|
#ifndef SOGOCACHEGCSOBJECT_H
|
||||||
#define SOGOMAPIDBOBJECT_H
|
#define SOGOCACHEGCSOBJECT_H
|
||||||
|
|
||||||
#import "SOGoMAPIObject.h"
|
#import "SOGoCacheObject.h"
|
||||||
|
|
||||||
@class NSArray;
|
@class NSArray;
|
||||||
@class NSMutableDictionary;
|
@class NSMutableDictionary;
|
||||||
|
@ -40,7 +38,7 @@ typedef enum {
|
||||||
MAPIInternalCacheObject = 99 /* object = property list */
|
MAPIInternalCacheObject = 99 /* object = property list */
|
||||||
} SOGoCacheObjectType;
|
} SOGoCacheObjectType;
|
||||||
|
|
||||||
@interface SOGoMAPIDBObject : SOGoMAPIObject
|
@interface SOGoCacheGCSObject : SOGoCacheObject
|
||||||
{
|
{
|
||||||
NSURL *tableUrl;
|
NSURL *tableUrl;
|
||||||
|
|
||||||
|
@ -82,4 +80,4 @@ typedef enum {
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* SOGOMAPIDBOBJECT_H */
|
#endif /* SOGOCACHEGCSOBJECT_H */
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIDBObject.m - this file is part of SOGo
|
/* SOGoCacheGCSObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -43,16 +41,16 @@
|
||||||
#import <SOGo/SOGoDomainDefaults.h>
|
#import <SOGo/SOGoDomainDefaults.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
|
|
||||||
#import "GCSSpecialQueries+OpenChange.h"
|
#import "GCSSpecialQueries+SOGoCacheObject.h"
|
||||||
#import "MAPIStoreTypes.h"
|
//#import "MAPIStoreTypes.h"
|
||||||
#import "SOGoMAPIDBFolder.h"
|
#import "SOGoCacheGCSFolder.h"
|
||||||
#import "BSONCodec.h"
|
#import "BSONCodec.h"
|
||||||
|
|
||||||
#import "SOGoMAPIDBObject.h"
|
#import "SOGoCacheGCSObject.h"
|
||||||
|
|
||||||
static EOAttribute *textColumn = nil;
|
static EOAttribute *textColumn = nil;
|
||||||
|
|
||||||
@implementation SOGoMAPIDBObject
|
@implementation SOGoCacheGCSObject
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
|
@ -221,43 +219,6 @@ static EOAttribute *textColumn = nil;
|
||||||
return deleted;
|
return deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (Class) mapistoreMessageClass
|
|
||||||
{
|
|
||||||
NSString *className, *mapiMsgClass;
|
|
||||||
|
|
||||||
switch (objectType)
|
|
||||||
{
|
|
||||||
case MAPIMessageCacheObject:
|
|
||||||
mapiMsgClass = [properties
|
|
||||||
objectForKey: MAPIPropertyKey (PidTagMessageClass)];
|
|
||||||
if (mapiMsgClass)
|
|
||||||
{
|
|
||||||
if ([mapiMsgClass isEqualToString: @"IPM.StickyNote"])
|
|
||||||
className = @"MAPIStoreNotesMessage";
|
|
||||||
else
|
|
||||||
className = @"MAPIStoreDBMessage";
|
|
||||||
//[self logWithFormat: @"PidTagMessageClass = '%@', returning '%@'",
|
|
||||||
// mapiMsgClass, className];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//[self warnWithFormat: @"PidTagMessageClass is not set, falling back"
|
|
||||||
// @" to 'MAPIStoreDBMessage'"];
|
|
||||||
className = @"MAPIStoreDBMessage";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MAPIFAICacheObject:
|
|
||||||
className = @"MAPIStoreFAIMessage";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
[NSException raise: @"MAPIStoreIOException"
|
|
||||||
format: @"message class should not be queried for objects"
|
|
||||||
@" of type '%d'", objectType];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NSClassFromString (className);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* actions */
|
/* actions */
|
||||||
- (void) setNameInContainer: (NSString *) newNameInContainer
|
- (void) setNameInContainer: (NSString *) newNameInContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIObject.h - this file is part of SOGo
|
/* SOGoCacheObject.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,14 +18,14 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SOGOMAPIOBJECT_H
|
#ifndef SOGOCACHEOBJECT_H
|
||||||
#define SOGOMAPIOBJECT_H
|
#define SOGOCACHEOBJECT_H
|
||||||
|
|
||||||
#import <SOGo/SOGoObject.h>
|
#import <SOGo/SOGoObject.h>
|
||||||
|
|
||||||
@class NSMutableDictionary;
|
@class NSMutableDictionary;
|
||||||
|
|
||||||
@interface SOGoMAPIObject : SOGoObject
|
@interface SOGoCacheObject : SOGoObject
|
||||||
{
|
{
|
||||||
BOOL isNew;
|
BOOL isNew;
|
||||||
NSMutableDictionary *properties;
|
NSMutableDictionary *properties;
|
||||||
|
@ -46,4 +44,4 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* SOGOMAPIOBJECT_H */
|
#endif /* SOGOCACHEOBJECT_H */
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoMAPIObject.m - this file is part of SOGo
|
/* SOGoCacgeObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012-2014 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,9 +21,9 @@
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
|
|
||||||
#import "SOGoMAPIObject.h"
|
#import "SOGoCacheObject.h"
|
||||||
|
|
||||||
@implementation SOGoMAPIObject
|
@implementation SOGoCacheObject
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue