Monotone-Parent: 77e266118db7711a96eaa7860269a06901b65f60

Monotone-Revision: 1c9f1cddb35ec2af1a800051b41880aec42781be

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-10-14T21:37:39
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-10-14 21:37:39 +00:00
parent 4a9bc9ddb8
commit 7685b34daf
3 changed files with 167 additions and 47 deletions
+34 -23
View File
@@ -208,7 +208,7 @@ static MAPIStoreMapping *mapping = nil;
- (void) dealloc
{
[self logWithFormat: @"-dealloc"];
[self logWithFormat: @"-dealloc: %@", self];
[messageCache release];
[subfolderCache release];
@@ -449,7 +449,7 @@ static MAPIStoreMapping *mapping = nil;
{
[self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__];
return MAPISTORE_SUCCESS;
return MAPISTORE_ERROR;
}
@@ -467,7 +467,7 @@ static MAPIStoreMapping *mapping = nil;
{
[self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__];
return MAPISTORE_SUCCESS;
return MAPISTORE_ERROR;
}
@@ -552,29 +552,34 @@ static MAPIStoreMapping *mapping = nil;
[self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__];
url = [mapping urlFromID: fid];
if (!url)
[self errorWithFormat: @"No url found for FID: %lld", fid];
switch (tableType)
if (url)
{
case MAPISTORE_FOLDER_TABLE:
ids = [self _subfolderKeysForFolderURL: url];
break;
case MAPISTORE_MESSAGE_TABLE:
ids = [self _messageKeysForFolderURL: url];
break;
default:
rc = MAPISTORE_ERR_INVALID_PARAMETER;
ids = nil;
}
if ([ids isKindOfClass: [NSArray class]])
{
rc = MAPI_E_SUCCESS;
*rowCount = [ids count];
switch (tableType)
{
case MAPISTORE_FOLDER_TABLE:
ids = [self _subfolderKeysForFolderURL: url];
break;
case MAPISTORE_MESSAGE_TABLE:
ids = [self _messageKeysForFolderURL: url];
break;
default:
rc = MAPISTORE_ERR_INVALID_PARAMETER;
ids = nil;
}
if ([ids isKindOfClass: [NSArray class]])
{
rc = MAPI_E_SUCCESS;
*rowCount = [ids count];
}
else
rc = MAPISTORE_ERR_NO_DIRECTORY;
}
else
rc = MAPISTORE_ERR_NO_DIRECTORY;
{
[self errorWithFormat: @"No url found for FID: %lld", fid];
rc = MAPISTORE_ERR_NOT_FOUND;
}
return rc;
}
@@ -649,6 +654,12 @@ static MAPIStoreMapping *mapping = nil;
case PR_DEPTH: // TODO: DOUBT
*data = MAPILongLongValue (memCtx, 0);
break;
case PR_ACCESS: // TODO
*data = MAPILongValue (memCtx, 0x02);
break;
case PR_ACCESS_LEVEL: // TODO
*data = MAPILongValue (memCtx, 0x00000000);
break;
case PR_VD_VERSION:
/* mandatory value... wtf? */
*data = MAPILongValue (memCtx, 8);