Monotone-Parent: 5599b85afd7e2707325836a3b533b900d96b8b0c

Monotone-Revision: 570b17715b63da450bef9fde6d9c95288911034f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T01:02:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2012-08-15 01:02:08 +00:00
parent dac62b634c
commit 45974ec74b
12 changed files with 284 additions and 71 deletions

View File

@@ -425,6 +425,41 @@ rtf2html (NSData *compressedRTF)
andType: MAPISTORE_MESSAGE_TABLE];
}
- (void) copyToMessage: (MAPIStoreMessage *) newMessage
{
TALLOC_CTX *memCtx;
struct mapistore_message *messageData;
NSArray *keys;
NSUInteger count, max;
NSString *key;
MAPIStoreAttachment *attachment, *newAttachment;
memCtx = talloc_zero (NULL, TALLOC_CTX);
/* message headers and recipients */
[self getMessageData: &messageData inMemCtx: memCtx];
[newMessage modifyRecipientsWithRecipients: messageData->recipients
andCount: messageData->recipients_count
andColumns: messageData->columns];
/* properties */
[self copyPropertiesToObject: newMessage];
/* attachments */
keys = [self attachmentKeys];
max = [keys count];
for (count = 0; count < max; count++)
{
key = [keys objectAtIndex: count];
attachment = [self lookupAttachment: key];
newAttachment = [newMessage createAttachment];
[attachment copyToAttachment: newAttachment];
}
talloc_free (memCtx);
}
- (enum mapistore_error) saveMessage
{
enum mapistore_error rc;