mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-30 10:32:47 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user