Monotone-Parent: 37431a093d394dea94622106c07943eca6cb743f

Monotone-Revision: cf0e281b1ddabaa9d9d2254c68173616e13215d0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-11-26T21:48:52
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-11-26 21:48:52 +00:00
parent b82eeddedb
commit 3e9a276b15
4 changed files with 77 additions and 0 deletions
+36
View File
@@ -21,6 +21,7 @@
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSFileHandle.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSThread.h>
@@ -1236,6 +1237,41 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
return rc;
}
- (int) setProperty: (enum MAPITAGS) property
withFMID: (uint64_t) fmid
ofTableType: (uint8_t) tableType
fromFile: (NSFileHandle *) aFile
{
NSMutableDictionary *message;
NSNumber *midNbr;
NSData *fileData;
int rc;
fileData = [aFile readDataToEndOfFile];
switch (tableType)
{
case MAPISTORE_MESSAGE:
midNbr = [NSNumber numberWithUnsignedLongLong: fmid];
message = [messages objectForKey: midNbr];
if (message)
{
[message setObject: NSObjectFromStreamData (property, fileData)
forKey: MAPIPropertyNumber (property)];
rc = MAPISTORE_SUCCESS;
}
else
rc = MAPISTORE_ERR_NOT_FOUND;
break;
case MAPISTORE_FOLDER:
default:
[self errorWithFormat: @"%s: value of tableType not handled: %d",
__FUNCTION__, tableType];
rc = MAPISTORE_ERROR;
}
return rc;
}
- (NSDictionary *) _convertRecipientFromRow: (struct RecipientRow *) row
{
NSMutableDictionary *recipient;