aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Romain Pouclet <romain.pouclet@gmail.com>2016-10-13 19:42:06 -0400
committerGravatar Hoà V. DINH <dinh.viet.hoa@gmail.com>2016-10-13 16:42:06 -0700
commitabedd87bb02f975b0b1ee9c4cf2f0e6adde31366 (patch)
treeacc88b3199cf069f3876685e69664da8a21a3806
parentf9471a7cace7ef0ddae8790021933b1c6cd963d8 (diff)
Type annotations (#1530)
* Add type annotations on MCOMessageBuilder * Add type annotations on MCOAbstractMessage * Add Type annotations on MCOAbstractPart * Add type annotations to MCOMessageHeader * Add type annotatins to MCOAddress
-rw-r--r--src/objc/abstract/MCOAbstractMessage.h6
-rw-r--r--src/objc/abstract/MCOAbstractPart.h2
-rw-r--r--src/objc/abstract/MCOAddress.h4
-rw-r--r--src/objc/abstract/MCOMessageHeader.h26
-rw-r--r--src/objc/rfc822/MCOMessageBuilder.h4
5 files changed, 21 insertions, 21 deletions
diff --git a/src/objc/abstract/MCOAbstractMessage.h b/src/objc/abstract/MCOAbstractMessage.h
index ed858808..71d74c84 100644
--- a/src/objc/abstract/MCOAbstractMessage.h
+++ b/src/objc/abstract/MCOAbstractMessage.h
@@ -40,19 +40,19 @@ namespace mailcore {
It will return an array of MCOIMAPPart for MCOIMAPMessage.
It will return an array of MCOAttachment for MCOMessageParser.
It will return an array of MCOAttachment for MCOMessageBuilder. */
-- (NSArray * /* MCOAbstractPart */) attachments;
+- (NSArray<MCOAbstractPart *> *) attachments;
/** All image attachments included inline in the message through cid: URLs.
It will return an array of MCOIMAPPart for MCOIMAPMessage.
It will return an array of MCOAttachment for MCOMessageParser.
It will return an array of MCOAttachment for MCOMessageBuilder. */
-- (NSArray * /* MCOAbstractPart */) htmlInlineAttachments;
+- (NSArray<MCOAbstractPart *> * /* MCOAbstractPart */) htmlInlineAttachments;
/**
Returns parts required to render the message as plain text or html.
This does not include inline images and attachments, but only the text content
*/
-- (NSArray *) requiredPartsForRendering;
+- (NSArray<MCOAbstractPart *> *) requiredPartsForRendering;
@end
diff --git a/src/objc/abstract/MCOAbstractPart.h b/src/objc/abstract/MCOAbstractPart.h
index 8bff41dd..625bd748 100644
--- a/src/objc/abstract/MCOAbstractPart.h
+++ b/src/objc/abstract/MCOAbstractPart.h
@@ -105,7 +105,7 @@ namespace mailcore {
- (NSString *) contentTypeParameterValueForName:(NSString *)name;
/** Returns an array with the names of all content type parameters.*/
-- (NSArray * /* NSString */) allContentTypeParametersNames;
+- (NSArray<NSString *> *) allContentTypeParametersNames;
@end
diff --git a/src/objc/abstract/MCOAddress.h b/src/objc/abstract/MCOAddress.h
index 6c3284e8..8a2a307f 100644
--- a/src/objc/abstract/MCOAddress.h
+++ b/src/objc/abstract/MCOAddress.h
@@ -40,14 +40,14 @@
forms of the RFC822 encoded addresses.
For example: @[ @"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>" ]*/
-+ (NSArray *) addressesWithRFC822String:(NSString *)string;
++ (NSArray<MCOAddress *> *) addressesWithRFC822String:(NSString *)string;
/**
Returns an NSArray of MCOAddress objects that contain the parsed
forms of non-encoded RFC822 addresses.
For example: @[ "DINH Viêt Hoà <hoa@etpan.org>" ]*/
-+ (NSArray *) addressesWithNonEncodedRFC822String:(NSString *)string;
++ (NSArray<MCOAddress *> *) addressesWithNonEncodedRFC822String:(NSString *)string;
/** Returns the display name of the address.*/
diff --git a/src/objc/abstract/MCOMessageHeader.h b/src/objc/abstract/MCOMessageHeader.h
index e68cf33c..ba426bd0 100644
--- a/src/objc/abstract/MCOMessageHeader.h
+++ b/src/objc/abstract/MCOMessageHeader.h
@@ -25,10 +25,10 @@
@property (nonatomic, readonly, getter=isMessageIDAutoGenerated) BOOL messageIDAutoGenerated;
/** References field. It's an array of message-ids.*/
-@property (nonatomic, copy) NSArray * /* NSString */ references;
+@property (nonatomic, copy) NSArray<NSString *> * references;
/** In-Reply-To field. It's an array of message-ids.*/
-@property (nonatomic, copy) NSArray * /* NSString */ inReplyTo;
+@property (nonatomic, copy) NSArray<NSString *> * inReplyTo;
/** Date field: sent date of the message.*/
@property (nonatomic, strong) NSDate * date;
@@ -42,17 +42,17 @@
/** From field: address of the sender of the message.*/
@property (nonatomic, copy) MCOAddress * from;
-/** To field: recipient of the message. It's an array of MCOAddress.*/
-@property (nonatomic, copy) NSArray * /* MCOAddress */ to;
+/** To field: recipient of the message.*/
+@property (nonatomic, copy) NSArray<MCOAddress *> *to;
-/** Cc field: cc recipient of the message. It's an array of MCOAddress.*/
-@property (nonatomic, copy) NSArray * /* MCOAddress */ cc;
+/** Cc field: cc recipient of the message.*/
+@property (nonatomic, copy) NSArray<MCOAddress *> * cc;
-/** Bcc field: bcc recipient of the message. It's an array of MCOAddress.*/
-@property (nonatomic, copy) NSArray * /* MCOAddress */ bcc;
+/** Bcc field: bcc recipient of the message.*/
+@property (nonatomic, copy) NSArray<MCOAddress *> * bcc;
-/** Reply-To field. It's an array of MCOAddress.*/
-@property (nonatomic, copy) NSArray * /* MCOAddress */ replyTo;
+/** Reply-To field.*/
+@property (nonatomic, copy) NSArray<MCOAddress *> * replyTo;
/** Subject of the message.*/
@property (nonatomic, copy) NSString * subject;
@@ -76,7 +76,7 @@
- (NSString *) extraHeaderValueForName:(NSString *)name;
/** Returns an array with the names of all custom headers.*/
-- (NSArray * /* NSString */) allExtraHeadersNames;
+- (NSArray<NSString *> *) allExtraHeadersNames;
/** Extracted subject (also remove square brackets).*/
- (NSString *) extractedSubject;
@@ -88,10 +88,10 @@
- (void) importHeadersData:(NSData *)data;
/** Returns a header that can be used as a base for a reply message.*/
-- (MCOMessageHeader *) replyHeaderWithExcludedRecipients:(NSArray * /* MCOAddress */)excludedRecipients;
+- (MCOMessageHeader *) replyHeaderWithExcludedRecipients:(NSArray<MCOAddress *> *)excludedRecipients;
/** Returns a header that can be used as a base for a reply all message.*/
-- (MCOMessageHeader *) replyAllHeaderWithExcludedRecipients:(NSArray * /* MCOAddress */)excludedRecipients;
+- (MCOMessageHeader *) replyAllHeaderWithExcludedRecipients:(NSArray<MCOAddress *> *)excludedRecipients;
/** Returns a header that can be used as a base for a forward message.*/
- (MCOMessageHeader *) forwardHeader;
diff --git a/src/objc/rfc822/MCOMessageBuilder.h b/src/objc/rfc822/MCOMessageBuilder.h
index fbebb7f6..ce46ec2d 100644
--- a/src/objc/rfc822/MCOMessageBuilder.h
+++ b/src/objc/rfc822/MCOMessageBuilder.h
@@ -41,10 +41,10 @@
@property (nonatomic, copy) NSString * textBody;
/** List of file attachments.*/
-@property (nonatomic, copy) NSArray * /* MCOAttachment */ attachments;
+@property (nonatomic, copy) NSArray<MCOAttachment *> * attachments;
/** List of related file attachments (included as cid: link in the HTML part).*/
-@property (nonatomic, copy) NSArray * /* MCOAttachment */ relatedAttachments;
+@property (nonatomic, copy) NSArray<MCOAttachment *> * relatedAttachments;
/** Prefix for the boundary identifier. Default value is nil.*/
@property (nonatomic, copy) NSString * boundaryPrefix;