mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 14:43:31 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user