diff options
author | Romain Pouclet <romain.pouclet@gmail.com> | 2016-10-13 20:02:32 -0400 |
---|---|---|
committer | HoĆ V. DINH <dinh.viet.hoa@gmail.com> | 2016-10-13 17:02:32 -0700 |
commit | efce413258a838818a39a12f0f86d563c8488468 (patch) | |
tree | 891827ec620cc305730a78c1e5c9526608cf3633 | |
parent | abedd87bb02f975b0b1ee9c4cf2f0e6adde31366 (diff) |
Add type annotations to some operations and MCPIMAPSession (#1531)
* Add type annotations to MCOIMAPSession
* Add type annotations to some operations
-rw-r--r-- | src/objc/imap/MCOIMAPFetchFoldersOperation.h | 3 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPFetchFoldersOperation.mm | 2 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPFetchMessagesOperation.h | 5 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPFetchMessagesOperation.mm | 2 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPSession.h | 12 |
5 files changed, 13 insertions, 11 deletions
diff --git a/src/objc/imap/MCOIMAPFetchFoldersOperation.h b/src/objc/imap/MCOIMAPFetchFoldersOperation.h index a2954d29..b69a24fe 100644 --- a/src/objc/imap/MCOIMAPFetchFoldersOperation.h +++ b/src/objc/imap/MCOIMAPFetchFoldersOperation.h @@ -13,6 +13,7 @@ /** This class implements an operation to fetch a list of folders. */ #import <MailCore/MCOIMAPBaseOperation.h> +@class MCOIMAPFolder; NS_ASSUME_NONNULL_BEGIN @interface MCOIMAPFetchFoldersOperation : MCOIMAPBaseOperation @@ -27,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN - On failure, `error` will be set with `MCOErrorDomain` as domain and an error code available in `MCOConstants.h`, `folders` will be nil */ -- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPFolder */ __nullable folders))completionBlock; +- (void) start:(void (^)(NSError * __nullable error, NSArray<MCOIMAPFolder *> * __nullable folders))completionBlock; @end NS_ASSUME_NONNULL_END diff --git a/src/objc/imap/MCOIMAPFetchFoldersOperation.mm b/src/objc/imap/MCOIMAPFetchFoldersOperation.mm index b0965401..28b907b2 100644 --- a/src/objc/imap/MCOIMAPFetchFoldersOperation.mm +++ b/src/objc/imap/MCOIMAPFetchFoldersOperation.mm @@ -43,7 +43,7 @@ typedef void (^CompletionType)(NSError *error, NSArray *folder); [super dealloc]; } -- (void) start:(void (^)(NSError *error, NSArray * /* MCOIMAPFolder */ folders))completionBlock +- (void) start:(void (^)(NSError *error, NSArray<MCOIMAPFolder *> * folders))completionBlock { _completionBlock = [completionBlock copy]; [self start]; diff --git a/src/objc/imap/MCOIMAPFetchMessagesOperation.h b/src/objc/imap/MCOIMAPFetchMessagesOperation.h index ac1506c0..1958da63 100644 --- a/src/objc/imap/MCOIMAPFetchMessagesOperation.h +++ b/src/objc/imap/MCOIMAPFetchMessagesOperation.h @@ -16,6 +16,7 @@ /** This class implements an operation to fetch a list of messages from a folder */ @class MCOIndexSet; +@class MCOIMAPMessage; NS_ASSUME_NONNULL_BEGIN @interface MCOIMAPFetchMessagesOperation : MCOIMAPBaseOperation @@ -24,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) MCOIMAPBaseOperationItemProgressBlock progress; /** Extra headers to request. Must set requestKind | IMAPMessagesRequestKindExtraHeaders */ -@property (nonatomic, copy) NSArray * extraHeaders; +@property (nonatomic, copy) NSArray<NSString *> * extraHeaders; /** Starts the asynchronous fetch operation. @@ -39,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN If you are not supporting QRESYNC you can safely ignore `vanishedMessages`. */ -- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPMessage */ __nullable messages, MCOIndexSet * __nullable vanishedMessages))completionBlock; +- (void) start:(void (^)(NSError * __nullable error, NSArray<MCOIMAPMessage *> * __nullable messages, MCOIndexSet * __nullable vanishedMessages))completionBlock; @end NS_ASSUME_NONNULL_END diff --git a/src/objc/imap/MCOIMAPFetchMessagesOperation.mm b/src/objc/imap/MCOIMAPFetchMessagesOperation.mm index 83012ca5..a29a05fb 100644 --- a/src/objc/imap/MCOIMAPFetchMessagesOperation.mm +++ b/src/objc/imap/MCOIMAPFetchMessagesOperation.mm @@ -41,7 +41,7 @@ typedef void (^CompletionType)(NSError *error, NSArray * messages, MCOIndexSet * [super dealloc]; } -- (void) start:(void (^)(NSError *error, NSArray * messages, MCOIndexSet * vanishedMessages))completionBlock +- (void) start:(void (^)(NSError *error, NSArray<MCOIMAPMessage *> * messages, MCOIndexSet * vanishedMessages))completionBlock { _completionBlock = [completionBlock copy]; [self start]; diff --git a/src/objc/imap/MCOIMAPSession.h b/src/objc/imap/MCOIMAPSession.h index 2e2d55a9..661ce79c 100644 --- a/src/objc/imap/MCOIMAPSession.h +++ b/src/objc/imap/MCOIMAPSession.h @@ -305,7 +305,7 @@ - (MCOIMAPAppendMessageOperation *)appendMessageOperationWithFolder:(NSString *)folder messageData:(NSData *)messageData flags:(MCOMessageFlag)flags - customFlags:(NSArray *)customFlags; + customFlags:(NSArray<NSString *> *)customFlags; /** Returns an operation to add a message with custom flags to a folder. @@ -323,7 +323,7 @@ - (MCOIMAPAppendMessageOperation *)appendMessageOperationWithFolder:(NSString *)folder contentsAtPath:(NSString *)path flags:(MCOMessageFlag)flags - customFlags:(NSArray *)customFlags; + customFlags:(NSArray<NSString *> *)customFlags; /** Returns an operation to copy messages to a folder. @@ -407,7 +407,7 @@ uids:(MCOIndexSet *)uids kind:(MCOIMAPStoreFlagsRequestKind)kind flags:(MCOMessageFlag)flags - customFlags:(NSArray *)customFlags; + customFlags:(NSArray<NSString *> *)customFlags; /** @@ -428,7 +428,7 @@ numbers:(MCOIndexSet *)numbers kind:(MCOIMAPStoreFlagsRequestKind)kind flags:(MCOMessageFlag)flags - customFlags:(NSArray *)customFlags; + customFlags:(NSArray<NSString *> *)customFlags; /** Returns an operation to change labels of messages. Intended for Gmail @@ -446,7 +446,7 @@ - (MCOIMAPOperation *) storeLabelsOperationWithFolder:(NSString *)folder numbers:(MCOIndexSet *)numbers kind:(MCOIMAPStoreFlagsRequestKind)kind - labels:(NSArray *)labels; + labels:(NSArray<NSString *> *)labels; /** Returns an operation to change labels of messages. Intended for Gmail @@ -464,7 +464,7 @@ - (MCOIMAPOperation *) storeLabelsOperationWithFolder:(NSString *)folder uids:(MCOIndexSet *)uids kind:(MCOIMAPStoreFlagsRequestKind)kind - labels:(NSArray *)labels; + labels:(NSArray<NSString *> *)labels; /** @name Fetching Messages */ |