aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc')
-rw-r--r--src/objc/abstract/MCOConstants.h2
-rw-r--r--src/objc/imap/MCOIMAPSearchExpression.h9
-rw-r--r--src/objc/imap/MCOIMAPSearchExpression.mm5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/objc/abstract/MCOConstants.h b/src/objc/abstract/MCOConstants.h
index 32a1b1bb..53406727 100644
--- a/src/objc/abstract/MCOConstants.h
+++ b/src/objc/abstract/MCOConstants.h
@@ -182,6 +182,8 @@ typedef NS_ENUM(NSInteger, MCOIMAPSearchKind) {
MCOIMAPSearchKindSubject,
/** Match content of the message.*/
MCOIMAPSearchKindContent,
+ /** Match body of the message.*/
+ MCOIMAPSearchKindBody,
/** Match uids */
MCOIMAPSearchKindUids,
/** Match headers of the message.*/
diff --git a/src/objc/imap/MCOIMAPSearchExpression.h b/src/objc/imap/MCOIMAPSearchExpression.h
index fbffb8f3..5161a6ee 100644
--- a/src/objc/imap/MCOIMAPSearchExpression.h
+++ b/src/objc/imap/MCOIMAPSearchExpression.h
@@ -91,6 +91,15 @@
+ (MCOIMAPSearchExpression *) searchContent:(NSString *)value;
/**
+ Creates a search expression that matches the body of an email.
+
+ Example:
+
+ MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchBody:@"building"]
+ */
++ (MCOIMAPSearchExpression *) searchBody:(NSString *)value;
+
+/**
Creates a search expression that matches the uids specified.
Example:
diff --git a/src/objc/imap/MCOIMAPSearchExpression.mm b/src/objc/imap/MCOIMAPSearchExpression.mm
index f395596c..57ae8455 100644
--- a/src/objc/imap/MCOIMAPSearchExpression.mm
+++ b/src/objc/imap/MCOIMAPSearchExpression.mm
@@ -96,6 +96,11 @@
return MCO_TO_OBJC(mailcore::IMAPSearchExpression::searchContent([value mco_mcString]));
}
++ (MCOIMAPSearchExpression *) searchBody:(NSString *)value
+{
+ return MCO_TO_OBJC(mailcore::IMAPSearchExpression::searchBody([value mco_mcString]));
+}
+
+ (MCOIMAPSearchExpression *) searchUIDs:(MCOIndexSet *) uids
{
return MCO_TO_OBJC(mailcore::IMAPSearchExpression::searchUIDs(MCO_FROM_OBJC(mailcore::IndexSet, uids)));