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