Monotone-Parent: 9682b5d4938d5bbaa2b7c8f83e89ae64c63c63f8

Monotone-Revision: 46649664a69096329e067562e94ad7e4e07e1db4

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-09-22T19:11:17
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-09-22 19:11:17 +00:00
parent c0c0d94387
commit 619154b3d0
3 changed files with 71 additions and 16 deletions

View File

@@ -64,6 +64,22 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
: [super objectVersion]);
}
- (void) _fetchHeaderData
{
[sogoObject fetchInfo];
ASSIGN (headerMimeType, [sogoObject isHTML] ? @"text/html" : @"text/plain");
ASSIGN (headerEncoding, @"8bit");
ASSIGN (headerCharset, @"utf-8");
headerSetup = YES;
}
- (void) _fetchBodyData
{
ASSIGN (bodyContent,
[[sogoObject text] dataUsingEncoding: NSUTF8StringEncoding]);
bodySetup = YES;
}
- (void) getMessageData: (struct mapistore_message **) dataPtr
inMemCtx: (TALLOC_CTX *) memCtx
{
@@ -87,10 +103,7 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
/* Retrieve recipients from the message */
if (!headerSetup)
{
[sogoObject fetchInfo];
headerSetup = YES;
}
[self _fetchHeaderData];
headers = [sogoObject headers];
to = [headers objectForKey: @"to"];
@@ -174,10 +187,7 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
if ([sogoObject isKindOfClass: SOGoDraftObjectK])
{
if (!headerSetup)
{
[sogoObject fetchInfo];
headerSetup = YES;
}
[self _fetchHeaderData];
s = [[sogoObject headers] objectForKey: @"X-Priority"];
v = 0x1;
@@ -232,6 +242,30 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
: [super getPrFollowupIcon: data inMemCtx: memCtx]);
}
- (int) getPrChangeKey: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
return MAPISTORE_ERR_NOT_FOUND;
}
- (int) getPrPredecessorChangeList: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
return MAPISTORE_ERR_NOT_FOUND;
}
- (int) getPidLidImapDeleted: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
return MAPISTORE_ERR_NOT_FOUND;
}
- (int) getPrInternetMessageId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
return MAPISTORE_ERR_NOT_FOUND;
}
- (void) _saveAttachment: (NSString *) attachmentKey
{
NSDictionary *properties, *metadata;
@@ -376,10 +410,7 @@ e)
id to;
if (!headerSetup)
{
[sogoObject fetchInfo];
headerSetup = YES;
}
[self _fetchHeaderData];
stringValue = @"";
@@ -537,10 +568,7 @@ e)
if (!subject)
{
if (!headerSetup)
{
[sogoObject fetchInfo];
headerSetup = YES;
}
[self _fetchHeaderData];
subject = [[sogoObject headers] objectForKey: @"subject"];
}
}