Updated code to reflect cache regorg.
parent
99d49b9bd9
commit
7a4feae8b8
|
@ -58,7 +58,7 @@ static Class MAPIStoreDBFolderK;
|
||||||
|
|
||||||
- (void) ensureContextFolder
|
- (void) ensureContextFolder
|
||||||
{
|
{
|
||||||
SOGoMAPIDBFolder *currentFolder;
|
SOGoCacheGCSFolder *currentFolder;
|
||||||
NSArray *parts;
|
NSArray *parts;
|
||||||
NSMutableArray *folders;
|
NSMutableArray *folders;
|
||||||
NSString *folderName;
|
NSString *folderName;
|
||||||
|
@ -76,7 +76,7 @@ static Class MAPIStoreDBFolderK;
|
||||||
folderName = [parts objectAtIndex: count];
|
folderName = [parts objectAtIndex: count];
|
||||||
if ([folderName length] > 0)
|
if ([folderName length] > 0)
|
||||||
{
|
{
|
||||||
currentFolder = [SOGoMAPIDBFolder objectWithName: folderName
|
currentFolder = [SOGoCacheGCSFolder objectWithName: folderName
|
||||||
inContainer: currentFolder];
|
inContainer: currentFolder];
|
||||||
[folders addObject: currentFolder];
|
[folders addObject: currentFolder];
|
||||||
}
|
}
|
||||||
|
@ -96,11 +96,11 @@ static Class MAPIStoreDBFolderK;
|
||||||
|
|
||||||
- (id) rootSOGoFolder
|
- (id) rootSOGoFolder
|
||||||
{
|
{
|
||||||
SOGoMAPIDBFolder *folder;
|
SOGoCacheGCSFolder *folder;
|
||||||
|
|
||||||
[userContext ensureFolderTableExists];
|
[userContext ensureFolderTableExists];
|
||||||
|
|
||||||
folder = [SOGoMAPIDBFolder objectWithName: [isa MAPIModuleName]
|
folder = [SOGoCacheGCSFolder objectWithName: [isa MAPIModuleName]
|
||||||
inContainer: nil];
|
inContainer: nil];
|
||||||
[folder setTableUrl: [userContext folderTableURL]];
|
[folder setTableUrl: [userContext folderTableURL]];
|
||||||
// [folder reloadIfNeeded];
|
// [folder reloadIfNeeded];
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#include <mapistore/mapistore.h>
|
#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_errors.h>
|
#include <mapistore/mapistore_errors.h>
|
||||||
|
|
||||||
static Class EOKeyValueQualifierK, SOGoMAPIDBFolderK, MAPIStoreDBFolderK;
|
static Class EOKeyValueQualifierK, SOGoCacheGCSFolderK, MAPIStoreDBFolderK;
|
||||||
|
|
||||||
static NSString *MAPIStoreRightReadItems = @"RightsReadItems";
|
static NSString *MAPIStoreRightReadItems = @"RightsReadItems";
|
||||||
static NSString *MAPIStoreRightCreateItems = @"RightsCreateItems";
|
static NSString *MAPIStoreRightCreateItems = @"RightsCreateItems";
|
||||||
|
@ -66,7 +66,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
EOKeyValueQualifierK = [EOKeyValueQualifier class];
|
EOKeyValueQualifierK = [EOKeyValueQualifier class];
|
||||||
SOGoMAPIDBFolderK = [SOGoMAPIDBFolder class];
|
SOGoCacheGCSFolderK = [SOGoCacheGCSFolder class];
|
||||||
MAPIStoreDBFolderK = [MAPIStoreDBFolder class];
|
MAPIStoreDBFolderK = [MAPIStoreDBFolder class];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||||
{
|
{
|
||||||
enum mapistore_error rc;
|
enum mapistore_error rc;
|
||||||
NSString *folderName, *nameInContainer;
|
NSString *folderName, *nameInContainer;
|
||||||
SOGoMAPIDBFolder *newFolder;
|
SOGoCacheGCSFolder *newFolder;
|
||||||
struct SPropValue *value;
|
struct SPropValue *value;
|
||||||
|
|
||||||
value = get_SPropValue_SRow (aRow, PidTagDisplayName);
|
value = get_SPropValue_SRow (aRow, PidTagDisplayName);
|
||||||
|
@ -111,7 +111,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||||
{
|
{
|
||||||
nameInContainer = [NSString stringWithFormat: @"0x%.16"PRIx64,
|
nameInContainer = [NSString stringWithFormat: @"0x%.16"PRIx64,
|
||||||
(unsigned long long) newFID];
|
(unsigned long long) newFID];
|
||||||
newFolder = [SOGoMAPIDBFolderK objectWithName: nameInContainer
|
newFolder = [SOGoCacheGCSFolderK objectWithName: nameInContainer
|
||||||
inContainer: sogoObject];
|
inContainer: sogoObject];
|
||||||
[newFolder reloadIfNeeded];
|
[newFolder reloadIfNeeded];
|
||||||
[[newFolder properties] setObject: folderName
|
[[newFolder properties] setObject: folderName
|
||||||
|
@ -198,7 +198,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||||
ownerUser = [[self userContext] sogoUser];
|
ownerUser = [[self userContext] sogoUser];
|
||||||
if ([[context activeUser] isEqual: ownerUser]
|
if ([[context activeUser] isEqual: ownerUser]
|
||||||
|| [self subscriberCanReadMessages])
|
|| [self subscriberCanReadMessages])
|
||||||
keys = [(SOGoMAPIDBFolder *) sogoObject childKeysOfType: MAPIMessageCacheObject
|
keys = [(SOGoCacheGCSFolder *) sogoObject childKeysOfType: MAPIMessageCacheObject
|
||||||
includeDeleted: NO
|
includeDeleted: NO
|
||||||
matchingQualifier: qualifier
|
matchingQualifier: qualifier
|
||||||
andSortOrderings: sortOrderings];
|
andSortOrderings: sortOrderings];
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* MAPIStoreFolder.h - this file is part of SOGo
|
/* MAPIStoreFolder.h - 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
|
||||||
|
@ -38,7 +36,7 @@
|
||||||
@class MAPIStoreMessageTable;
|
@class MAPIStoreMessageTable;
|
||||||
@class MAPIStorePermissionsTable;
|
@class MAPIStorePermissionsTable;
|
||||||
@class SOGoFolder;
|
@class SOGoFolder;
|
||||||
@class SOGoMAPIDBFolder;
|
@class SOGoCacheGCSFolder;
|
||||||
@class SOGoMAPIDBMessage;
|
@class SOGoMAPIDBMessage;
|
||||||
|
|
||||||
#import "MAPIStoreSOGoObject.h"
|
#import "MAPIStoreSOGoObject.h"
|
||||||
|
@ -50,7 +48,7 @@
|
||||||
// NSArray *faiMessageKeys;
|
// NSArray *faiMessageKeys;
|
||||||
// NSArray *folderKeys;
|
// NSArray *folderKeys;
|
||||||
|
|
||||||
SOGoMAPIDBFolder *dbFolder;
|
SOGoCacheGCSFolder *dbFolder;
|
||||||
// SOGoMAPIDBFolder *faiFolder;
|
// SOGoMAPIDBFolder *faiFolder;
|
||||||
// SOGoMAPIDBFolder *propsFolder;
|
// SOGoMAPIDBFolder *propsFolder;
|
||||||
// SOGoMAPIDBMessage *propsMessage;
|
// SOGoMAPIDBMessage *propsMessage;
|
||||||
|
@ -60,7 +58,7 @@
|
||||||
|
|
||||||
- (void) setupAuxiliaryObjects;
|
- (void) setupAuxiliaryObjects;
|
||||||
|
|
||||||
- (SOGoMAPIDBFolder *) dbFolder;
|
- (SOGoCacheGCSFolder *) dbFolder;
|
||||||
|
|
||||||
- (NSArray *) activeMessageTables;
|
- (NSArray *) activeMessageTables;
|
||||||
- (NSArray *) activeFAIMessageTables;
|
- (NSArray *) activeFAIMessageTables;
|
||||||
|
|
|
@ -119,7 +119,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
[userContext ensureFolderTableExists];
|
[userContext ensureFolderTableExists];
|
||||||
|
|
||||||
ASSIGN (dbFolder,
|
ASSIGN (dbFolder,
|
||||||
[SOGoMAPIDBFolder objectWithName: folderName
|
[SOGoCacheGCSFolder objectWithName: folderName
|
||||||
inContainer: [container dbFolder]]);
|
inContainer: [container dbFolder]]);
|
||||||
[dbFolder setTableUrl: [userContext folderTableURL]];
|
[dbFolder setTableUrl: [userContext folderTableURL]];
|
||||||
if (!container && [path length] > 0)
|
if (!container && [path length] > 0)
|
||||||
|
@ -191,7 +191,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SOGoMAPIDBFolder *) dbFolder
|
- (SOGoCacheGCSFolder *) dbFolder
|
||||||
{
|
{
|
||||||
return dbFolder;
|
return dbFolder;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue