aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/utils
diff options
context:
space:
mode:
authorGravatar Ken Grigsby <grigsby@thursby.com>2013-04-18 12:45:28 -0500
committerGravatar Ken Grigsby <grigsby@thursby.com>2013-04-18 12:45:28 -0500
commit004d86cb211b364d98e7efb0e299bcde9c7329b9 (patch)
tree64c30f0b82e2cff0563d0d322ee19e17d517a913 /src/objc/utils
parent6216eee4d6c6514c2b1e324d1a999b0d7018ab7a (diff)
brought forward some methods to ObjC interface
Diffstat (limited to 'src/objc/utils')
-rw-r--r--src/objc/utils/NSString+MCO.h7
-rw-r--r--src/objc/utils/NSString+MCO.mm27
2 files changed, 34 insertions, 0 deletions
diff --git a/src/objc/utils/NSString+MCO.h b/src/objc/utils/NSString+MCO.h
index b459a846..8e6bbf6b 100644
--- a/src/objc/utils/NSString+MCO.h
+++ b/src/objc/utils/NSString+MCO.h
@@ -28,6 +28,13 @@ namespace mailcore {
- (mailcore::String *) mco_mcString;
#endif
+- (NSString *) mco_flattenHTML;
+- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote;
+- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote showLink:(BOOL)showLink;
+
+- (NSString *) mco_htmlEncodedString;
+- (NSString *) mco_cleanedHTMLString;
+
@end
#endif
diff --git a/src/objc/utils/NSString+MCO.mm b/src/objc/utils/NSString+MCO.mm
index 3b8253ce..e9933fab 100644
--- a/src/objc/utils/NSString+MCO.mm
+++ b/src/objc/utils/NSString+MCO.mm
@@ -39,4 +39,31 @@
return mailcore::String::stringWithCharacters(characters, (unsigned int) [self length]);
}
+- (NSString *) mco_flattenHTML
+{
+ return [NSString mco_stringWithMCString:[self mco_mcString]->flattenHTML()];
+}
+
+- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote
+{
+ return [NSString mco_stringWithMCString:[self mco_mcString]->flattenHTMLAndShowBlockquote(showBlockquote)];
+}
+
+- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote showLink:(BOOL)showLink
+{
+ return [NSString mco_stringWithMCString:[self mco_mcString]->flattenHTMLAndShowBlockquoteAndLink(showBlockquote, showLink)];
+}
+
+
+- (NSString *) mco_htmlEncodedString
+{
+ return [NSString mco_stringWithMCString:[self mco_mcString]->htmlEncodedString()];
+}
+
+- (NSString *) mco_cleanedHTMLString
+{
+ return [NSString mco_stringWithMCString:[self mco_mcString]->cleanedHTMLString()];
+}
+
+
@end