diff options
author | Paul Young <paulyoungonline@gmail.com> | 2013-07-10 13:06:41 -0400 |
---|---|---|
committer | Paul Young <paulyoungonline@gmail.com> | 2013-07-10 13:06:41 -0400 |
commit | fa8bacfdbb628dbca258f2b94c459801a3384e1f (patch) | |
tree | 2a9f9fdea7e66beebc80744398d576125dedfc9a | |
parent | 82bc67c1ec8955a40b7cc7d54ce2cb059ba064a8 (diff) |
Removed simple rendering methods from MCOIMAPMessage.
* This is to address concerns with not being able to cancel the
asynchronous operations behind them.
-rw-r--r-- | src/objc/imap/MCOIMAPMessage.h | 25 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPMessage.mm | 57 |
2 files changed, 0 insertions, 82 deletions
diff --git a/src/objc/imap/MCOIMAPMessage.h b/src/objc/imap/MCOIMAPMessage.h index c70342a0..4feb55b3 100644 --- a/src/objc/imap/MCOIMAPMessage.h +++ b/src/objc/imap/MCOIMAPMessage.h @@ -71,31 +71,6 @@ - (NSString *) htmlRenderingWithFolder:(NSString *)folder delegate:(id <MCOHTMLRendererIMAPDelegate>)delegate; -/** HTML rendering of the message to be displayed in a web view.*/ -- (NSString *) htmlRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock; - -/** HTML rendering of the body of the message to be displayed in a web view.*/ -- (NSString *) htmlBodyRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock; - -/** Text rendering of the message.*/ -- (NSString *) plainTextRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock; - -/** 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 *) plainTextBodyRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock; - @end #endif diff --git a/src/objc/imap/MCOIMAPMessage.mm b/src/objc/imap/MCOIMAPMessage.mm index bf2618ca..c9bfcbb9 100644 --- a/src/objc/imap/MCOIMAPMessage.mm +++ b/src/objc/imap/MCOIMAPMessage.mm @@ -15,7 +15,6 @@ #import "MCOAbstractMessageRendererCallback.h" #import "MCOHTMLRendererDelegate.h" #import "MCOHTMLRendererIMAPDelegate.h" -#import "MCOIMAPMessageRenderingOperation.h" @implementation MCOIMAPMessage { mailcore::IMAPMessage * _message; @@ -66,60 +65,4 @@ MCO_OBJC_SYNTHESIZE_SCALAR(uint64_t, uint64_t, setGmailMessageID, gmailMessageID return result; } -- (NSString *) htmlRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock -{ - MCOIMAPMessageRenderingOperation * op = [session renderingOperationWithMessage:self - folder:folder - type:MCOIMAPMessageRenderingTypeHTML]; - - [op start:^(NSString * htmlString, NSError * error) ] { - completionBlock(htmlString, error); - }]; -} - -- (NSString *) htmlBodyRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock -{ - MCOIMAPMessageRenderingOperation * op = [session renderingOperationWithMessage:self - folder:folder - type:MCOIMAPMessageRenderingTypeHTMLBody]; - - [op start:^(NSString * htmlString, NSError * error) ] { - completionBlock(htmlString, error); - }]; -} - -- (NSString *) plainTextRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock -{ - MCOIMAPMessageRenderingOperation * op = [session renderingOperationWithMessage:self - folder:folder - type:MCOIMAPMessageRenderingTypePlainText]; - - [op start:^(NSString * htmlString, NSError * error) ] { - completionBlock(htmlString, error); - }]; -} - -- (NSString *) plainTextBodyRenderingWithSession:(MCOIMAPSession *)session - folder:(NSString *)folder - done:(void (^)(NSString * htmlString, - NSError * error))completionBlock -{ - MCOIMAPMessageRenderingOperation * op = [session renderingOperationWithMessage:self - folder:folder - type:MCOIMAPMessageRenderingTypePlainTextBody]; - - [op start:^(NSString * htmlString, NSError * error) ] { - completionBlock(htmlString, error); - }]; -} - @end |