Monotone-Parent: cdceff0f0c850bdd8d0af588d8e4b75eb75634a5
Monotone-Revision: 09b0d503bdecee3c305021b5aa23a3b7372aefb0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-30T14:51:35 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
999c469a3e
commit
e3924e0f09
|
@ -1,5 +1,9 @@
|
|||
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/SOGoMAPIFSFolder.m (-initWithURL:andTableType:):
|
||||
accepts a new "tableType" parameter to store messages in a
|
||||
different place of the fs folder hierarchy.
|
||||
|
||||
* OpenChange/NSValue+MAPIStore.m (-asDoubleInMemCtx): really
|
||||
returns a double rather than an uint64_t.
|
||||
|
||||
|
|
|
@ -35,8 +35,10 @@
|
|||
BOOL directoryIsSane;
|
||||
}
|
||||
|
||||
+ (id) folderWithURL: (NSURL *) url;
|
||||
- (id) initWithURL: (NSURL *) url;
|
||||
+ (id) folderWithURL: (NSURL *) url
|
||||
andTableType: (uint8_t) tableType;
|
||||
- (id) initWithURL: (NSURL *) url
|
||||
andTableType: (uint8_t) tableType;
|
||||
|
||||
- (NSString *) directory;
|
||||
|
||||
|
|
|
@ -58,10 +58,12 @@ static NSString *privateDir = nil;
|
|||
}
|
||||
|
||||
+ (id) folderWithURL: (NSURL *) url
|
||||
andTableType: (uint8_t) tableType
|
||||
{
|
||||
SOGoMAPIFSFolder *newFolder;
|
||||
|
||||
newFolder = [[self alloc] initWithURL: url];
|
||||
newFolder = [[self alloc] initWithURL: url
|
||||
andTableType: tableType];
|
||||
[newFolder autorelease];
|
||||
|
||||
return newFolder;
|
||||
|
@ -85,16 +87,29 @@ static NSString *privateDir = nil;
|
|||
}
|
||||
|
||||
- (id) initWithURL: (NSURL *) url
|
||||
andTableType: (uint8_t) tableType
|
||||
{
|
||||
NSString *path;
|
||||
NSString *path, *tableParticle;
|
||||
|
||||
if ((self = [self init]))
|
||||
{
|
||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||
tableParticle = @"message";
|
||||
else if (tableType == MAPISTORE_FAI_TABLE)
|
||||
tableParticle = @"fai";
|
||||
else
|
||||
{
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"unsupported table type: %d", tableType];
|
||||
tableParticle = nil;
|
||||
}
|
||||
|
||||
path = [url path];
|
||||
if (![path hasSuffix: @"/"])
|
||||
path = [NSString stringWithFormat: @"%@/", path];
|
||||
directory = [NSString stringWithFormat: @"%@/mapistore/SOGo/%@/%@%@",
|
||||
privateDir, [url user], [url host], path];
|
||||
directory = [NSString stringWithFormat: @"%@/mapistore/SOGo/%@/%@/%@%@",
|
||||
privateDir, [url user], tableParticle,
|
||||
[url host], path];
|
||||
[self logWithFormat: @"directory: %@", directory];
|
||||
[directory retain];
|
||||
ASSIGN (nameInContainer, [path stringByDeletingLastPathComponent]);
|
||||
|
|
Loading…
Reference in a new issue