diff options
Diffstat (limited to 'src/objc/imap')
-rw-r--r-- | src/objc/imap/MCOIMAPMessage.h | 13 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPMessage.mm | 20 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/objc/imap/MCOIMAPMessage.h b/src/objc/imap/MCOIMAPMessage.h index 06e437d8..22823891 100644 --- a/src/objc/imap/MCOIMAPMessage.h +++ b/src/objc/imap/MCOIMAPMessage.h @@ -70,6 +70,19 @@ - (NSString *) htmlRenderingWithFolder:(NSString *)folder delegate:(id <MCOHTMLRendererIMAPDelegate>)delegate; +/** HTML rendering of the message to be displayed in a web view.*/ +- (NSString *) htmlRenderingWithFolder:(NSString *)folder; + +/** HTML rendering of the body of the message to be displayed in a web view.*/ +- (NSString *) htmlBodyRenderingWithFolder:(NSString *)folder; + +/** Text rendering of the message.*/ +- (NSString *) plainTextRenderingWithFolder:(NSString *)folder; + +/** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message.*/ +- (NSString *) plainTextBodyRenderingWithFolder:(NSString *)folder; + @end #endif diff --git a/src/objc/imap/MCOIMAPMessage.mm b/src/objc/imap/MCOIMAPMessage.mm index c9bfcbb9..5ba4ef1f 100644 --- a/src/objc/imap/MCOIMAPMessage.mm +++ b/src/objc/imap/MCOIMAPMessage.mm @@ -65,4 +65,24 @@ MCO_OBJC_SYNTHESIZE_SCALAR(uint64_t, uint64_t, setGmailMessageID, gmailMessageID return result; } +- (NSString *) htmlRenderingWithFolder:(NSString *)folder +{ + return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->htmlRendering([folder mco_mcString])); +} + +- (NSString *) htmlBodyRenderingWithFolder:(NSString *)folder +{ + return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->htmlBodyRendering([folder mco_mcString])); +} + +- (NSString *) plainTextRenderingWithFolder:(NSString *)folder +{ + return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->plainTextRendering([folder mco_mcString])); +} + +- (NSString *) plainTextBodyRenderingWithFolder:(NSString *)folder +{ + return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->plainTextBodyRendering([folder mco_mcString])); +} + @end |