Last active
March 27, 2017 13:50
-
-
Save lukele/2f96d165f0a72b52ddc203c32287b4f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)MAParsedMessage { | |
// This method is called, when a message is opened from outside the library (an .eml is loaded.) | |
id messageData = [((MCMessage *)self) messageDataIncludingFromSpace:0x0 newDocumentID:0x0 fetchIfNotAvailable:0x1]; | |
id parsedMessage = nil; | |
if (messageData) { | |
MCMimePart *topLevelPart = [[MCMimePart alloc] initWithEncodedData:messageData]; | |
MCMimeBody *body = [MCMimeBody new]; | |
[body setIvar:kMimeBodyMessageKey value:self]; | |
[topLevelPart setIvar:kMimePartAllowPGPProcessingKey value:@(YES)]; | |
[topLevelPart setIvar:@"MimeBody" value:body]; | |
[body setTopLevelPart:topLevelPart]; | |
[(MCMimePart *)topLevelPart parse]; | |
parsedMessage = [body parsedMessage]; | |
} | |
return parsedMessage; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void * -[MCMessage parsedMessage](void * self, void * _cmd) { | |
r12 = 0x0; | |
r14 = [[self messageDataIncludingFromSpace:0x0 newDocumentID:0x0 fetchIfNotAvailable:0x1] retain]; | |
if (r14 != 0x0) { | |
r15 = [[MCMimePart alloc] initWithEncodedData:r14]; | |
rbx = [MCMimeBody new]; | |
[rbx setTopLevelPart:r15]; | |
[r15 parse]; | |
r12 = [[rbx parsedMessage] retain]; | |
[rbx release]; | |
[r15 release]; | |
} | |
[r14 release]; | |
rax = [r12 autorelease]; | |
return rax; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment