aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Lucas Derraugh <lucasderraugh@gmail.com>2015-07-19 03:05:06 -0700
committerGravatar Lucas Derraugh <lucasderraugh@gmail.com>2015-07-19 03:05:06 -0700
commite9389f70b482c33d09d904932d3aa6e8f4bb67ba (patch)
treebdcda09a41c60848feb8a11dbe96237d41f38050
parentb93062e0e918f7924fa48724fdbf53d91aa348bb (diff)
Add nullability annotations
-rw-r--r--src/objc/imap/MCOIMAPAppendMessageOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPCapabilityOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPCopyMessagesOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFetchContentOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFetchFoldersOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFetchMessagesOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFetchNamespaceOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFetchParsedContentOperation.h6
-rw-r--r--src/objc/imap/MCOIMAPFolderInfoOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPFolderStatusOperation.h6
-rw-r--r--src/objc/imap/MCOIMAPIdentityOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPIdleOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPMessageRenderingOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPNoopOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPOperation.h5
-rw-r--r--src/objc/imap/MCOIMAPQuotaOperation.h4
-rw-r--r--src/objc/imap/MCOIMAPSearchOperation.h4
-rwxr-xr-xsrc/objc/imap/MCOIMAPSession.h102
-rw-r--r--src/objc/nntp/MCONNTPFetchAllArticlesOperation.h6
-rw-r--r--src/objc/nntp/MCONNTPFetchArticleOperation.h4
-rw-r--r--src/objc/nntp/MCONNTPFetchHeaderOperation.h6
-rw-r--r--src/objc/nntp/MCONNTPFetchOverviewOperation.h5
-rw-r--r--src/objc/nntp/MCONNTPFetchServerTimeOperation.h6
-rw-r--r--src/objc/nntp/MCONNTPListNewsgroupsOperation.h4
-rw-r--r--src/objc/nntp/MCONNTPOperation.h4
-rw-r--r--src/objc/nntp/MCONNTPSession.h20
-rw-r--r--src/objc/pop/MCOPOPFetchHeaderOperation.h6
-rw-r--r--src/objc/pop/MCOPOPFetchMessageOperation.h4
-rw-r--r--src/objc/pop/MCOPOPFetchMessagesOperation.h6
-rw-r--r--src/objc/pop/MCOPOPNoopOperation.h4
-rw-r--r--src/objc/pop/MCOPOPOperation.h4
-rw-r--r--src/objc/pop/MCOPOPSession.h14
-rw-r--r--src/objc/smtp/MCOSMTPLoginOperation.h4
-rw-r--r--src/objc/smtp/MCOSMTPNoopOperation.h2
-rw-r--r--src/objc/smtp/MCOSMTPOperation.h4
-rw-r--r--src/objc/smtp/MCOSMTPSendOperation.h4
-rw-r--r--src/objc/smtp/MCOSMTPSession.h10
37 files changed, 179 insertions, 113 deletions
diff --git a/src/objc/imap/MCOIMAPAppendMessageOperation.h b/src/objc/imap/MCOIMAPAppendMessageOperation.h
index 1e5fbd39..ec1602a3 100644
--- a/src/objc/imap/MCOIMAPAppendMessageOperation.h
+++ b/src/objc/imap/MCOIMAPAppendMessageOperation.h
@@ -15,6 +15,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
#import <MailCore/MCOConstants.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPAppendMessageOperation : MCOIMAPBaseOperation
@property (nonatomic, assign) time_t date;
@@ -35,8 +36,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `createdUID` will be zero.
*/
-- (void) start:(void (^)(NSError * error, uint32_t createdUID))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, uint32_t createdUID))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPCapabilityOperation.h b/src/objc/imap/MCOIMAPCapabilityOperation.h
index 96314e2a..ab788cee 100644
--- a/src/objc/imap/MCOIMAPCapabilityOperation.h
+++ b/src/objc/imap/MCOIMAPCapabilityOperation.h
@@ -19,6 +19,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPCapabilityOperation : MCOIMAPBaseOperation
@@ -33,8 +34,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `capabilities` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOIndexSet * capabilities))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable capabilities))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPCopyMessagesOperation.h b/src/objc/imap/MCOIMAPCopyMessagesOperation.h
index 4c573a51..4edee9bc 100644
--- a/src/objc/imap/MCOIMAPCopyMessagesOperation.h
+++ b/src/objc/imap/MCOIMAPCopyMessagesOperation.h
@@ -16,6 +16,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPCopyMessagesOperation : MCOIMAPBaseOperation
/**
@@ -30,8 +31,9 @@
error code available in `MCOConstants.h`, `destUids` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSDictionary * uidMapping))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable uidMapping))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFetchContentOperation.h b/src/objc/imap/MCOIMAPFetchContentOperation.h
index 254cd146..d9492eab 100644
--- a/src/objc/imap/MCOIMAPFetchContentOperation.h
+++ b/src/objc/imap/MCOIMAPFetchContentOperation.h
@@ -18,6 +18,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
#import <MailCore/MCOConstants.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchContentOperation : MCOIMAPBaseOperation
/**
@@ -36,8 +37,9 @@
error code available in `MCOConstants.h`, `data` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSData * data))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable data))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFetchFoldersOperation.h b/src/objc/imap/MCOIMAPFetchFoldersOperation.h
index 853c55fc..a2954d29 100644
--- a/src/objc/imap/MCOIMAPFetchFoldersOperation.h
+++ b/src/objc/imap/MCOIMAPFetchFoldersOperation.h
@@ -14,6 +14,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchFoldersOperation : MCOIMAPBaseOperation
/**
@@ -26,8 +27,9 @@
- 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 * error, NSArray * /* MCOIMAPFolder */ folders))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPFolder */ __nullable folders))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFetchMessagesOperation.h b/src/objc/imap/MCOIMAPFetchMessagesOperation.h
index 13dad1b4..ac1506c0 100644
--- a/src/objc/imap/MCOIMAPFetchMessagesOperation.h
+++ b/src/objc/imap/MCOIMAPFetchMessagesOperation.h
@@ -17,6 +17,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchMessagesOperation : MCOIMAPBaseOperation
/** This block will be called each time a new message is downloaded. */
@@ -38,8 +39,9 @@
If you are not supporting QRESYNC you can safely ignore `vanishedMessages`.
*/
-- (void) start:(void (^)(NSError * error, NSArray * /* MCOIMAPMessage */ messages, MCOIndexSet * vanishedMessages))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPMessage */ __nullable messages, MCOIndexSet * __nullable vanishedMessages))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFetchNamespaceOperation.h b/src/objc/imap/MCOIMAPFetchNamespaceOperation.h
index 5d58f052..ea9e4fc2 100644
--- a/src/objc/imap/MCOIMAPFetchNamespaceOperation.h
+++ b/src/objc/imap/MCOIMAPFetchNamespaceOperation.h
@@ -14,6 +14,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchNamespaceOperation : MCOIMAPBaseOperation
/**
@@ -32,8 +33,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in `MCOConstants.h`, `namespaces` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSDictionary * namespaces))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable namespaces))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFetchParsedContentOperation.h b/src/objc/imap/MCOIMAPFetchParsedContentOperation.h
index de2b1663..5ab80058 100644
--- a/src/objc/imap/MCOIMAPFetchParsedContentOperation.h
+++ b/src/objc/imap/MCOIMAPFetchParsedContentOperation.h
@@ -19,6 +19,7 @@
@class MCOMessageParser;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchParsedContentOperation : MCOIMAPBaseOperation
/**
@@ -34,11 +35,12 @@
- On success `error` will be nil and `parser` will contain the requested message
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in `MCOConstants.h`, `data` will be nil
+ error code available in `MCOConstants.h`, `parser` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOMessageParser * parser))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOMessageParser * __nullable parser))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFolderInfoOperation.h b/src/objc/imap/MCOIMAPFolderInfoOperation.h
index e25016c7..20abd206 100644
--- a/src/objc/imap/MCOIMAPFolderInfoOperation.h
+++ b/src/objc/imap/MCOIMAPFolderInfoOperation.h
@@ -19,6 +19,7 @@
@class MCOIMAPFolderInfo;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFolderInfoOperation : MCOIMAPBaseOperation
/**
@@ -32,8 +33,9 @@
error code available in `MCOConstants.h`, `info` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOIMAPFolderInfo * info))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOIMAPFolderInfo * __nullable info))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPFolderStatusOperation.h b/src/objc/imap/MCOIMAPFolderStatusOperation.h
index 2117260f..68259b10 100644
--- a/src/objc/imap/MCOIMAPFolderStatusOperation.h
+++ b/src/objc/imap/MCOIMAPFolderStatusOperation.h
@@ -19,6 +19,7 @@
@class MCOIMAPFolderStatus;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFolderStatusOperation : MCOIMAPBaseOperation
/**
@@ -29,11 +30,12 @@
- On success `error` will be nil and `status` will contain the status metadata
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in `MCOConstants.h`, `info` will be nil
+ error code available in `MCOConstants.h`, `status` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOIMAPFolderStatus * status))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOIMAPFolderStatus * __nullable status))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPIdentityOperation.h b/src/objc/imap/MCOIMAPIdentityOperation.h
index 20b9fc88..2fa6968f 100644
--- a/src/objc/imap/MCOIMAPIdentityOperation.h
+++ b/src/objc/imap/MCOIMAPIdentityOperation.h
@@ -19,6 +19,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPIdentityOperation : MCOIMAPBaseOperation
/**
@@ -32,8 +33,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in `MCOConstants.h`, `serverIdentity` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSDictionary * serverIdentity))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable serverIdentity))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPIdleOperation.h b/src/objc/imap/MCOIMAPIdleOperation.h
index 672a3258..fb83b283 100644
--- a/src/objc/imap/MCOIMAPIdleOperation.h
+++ b/src/objc/imap/MCOIMAPIdleOperation.h
@@ -18,6 +18,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPIdleOperation : MCOIMAPBaseOperation
/** Stop the current IDLE session */
@@ -33,8 +34,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in `MCOConstants.h`
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPMessageRenderingOperation.h b/src/objc/imap/MCOIMAPMessageRenderingOperation.h
index 2c7f56d5..8a2924c8 100644
--- a/src/objc/imap/MCOIMAPMessageRenderingOperation.h
+++ b/src/objc/imap/MCOIMAPMessageRenderingOperation.h
@@ -16,6 +16,7 @@
The class is used to get the HTML string of a message.
*/
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPMessageRenderingOperation : MCOIMAPBaseOperation
/**
@@ -28,8 +29,9 @@
- On failure, `error` will be set and `htmlString` will be nil
*/
-- (void) start:(void (^)(NSString * htmlString, NSError * error))completionBlock;
+- (void) start:(void (^)(NSString * __nullable htmlString, NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPNoopOperation.h b/src/objc/imap/MCOIMAPNoopOperation.h
index 4b3a4b1f..96900bf9 100644
--- a/src/objc/imap/MCOIMAPNoopOperation.h
+++ b/src/objc/imap/MCOIMAPNoopOperation.h
@@ -12,6 +12,7 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+NS_ASSUME_NONNULL_BEGIN
/* The class is used to perform a No-Op operation. */
@interface MCOIMAPNoopOperation : MCOIMAPBaseOperation
@@ -25,8 +26,9 @@
- On failure, `error` will be set
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPOperation.h b/src/objc/imap/MCOIMAPOperation.h
index f8003c07..9d399df3 100644
--- a/src/objc/imap/MCOIMAPOperation.h
+++ b/src/objc/imap/MCOIMAPOperation.h
@@ -14,6 +14,8 @@
#import <MailCore/MCOIMAPBaseOperation.h>
+
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPOperation : MCOIMAPBaseOperation
/**
@@ -26,8 +28,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPQuotaOperation.h b/src/objc/imap/MCOIMAPQuotaOperation.h
index c0463bb0..d3368d49 100644
--- a/src/objc/imap/MCOIMAPQuotaOperation.h
+++ b/src/objc/imap/MCOIMAPQuotaOperation.h
@@ -8,8 +8,10 @@
#import "MCOIMAPBaseOperation.h"
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPQuotaOperation : MCOIMAPBaseOperation
-- (void) start:(void (^)(NSError * error, NSUInteger usage, NSUInteger limit))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSUInteger usage, NSUInteger limit))completionBlock;
@end
+NS_ASSUME_NONNULL_END
diff --git a/src/objc/imap/MCOIMAPSearchOperation.h b/src/objc/imap/MCOIMAPSearchOperation.h
index 1ec3c95c..a594730d 100644
--- a/src/objc/imap/MCOIMAPSearchOperation.h
+++ b/src/objc/imap/MCOIMAPSearchOperation.h
@@ -16,6 +16,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPSearchOperation : MCOIMAPBaseOperation
/**
@@ -29,8 +30,9 @@
error code available in MCOConstants.h, `searchResult` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOIndexSet * searchResult))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable searchResult))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/imap/MCOIMAPSession.h b/src/objc/imap/MCOIMAPSession.h
index f364c159..454def4a 100755
--- a/src/objc/imap/MCOIMAPSession.h
+++ b/src/objc/imap/MCOIMAPSession.h
@@ -187,7 +187,7 @@
Returns an operation that gets the list of subscribed folders.
MCOIMAPFetchFoldersOperation * op = [session fetchSubscribedFoldersOperation];
- [op start:^(NSError * error, NSArray * folders) {
+ [op start:^(NSError * __nullable error, NSArray * folders) {
...
}];
*/
@@ -198,7 +198,7 @@
Returns an operation that gets all folders
MCOIMAPFetchFoldersOperation * op = [session fetchAllFoldersOperation];
- [op start:^(NSError * error, NSArray *folders) {
+ [op start:^(NSError * __nullable error, NSArray *folders) {
...
}];
*/
@@ -208,7 +208,7 @@
Creates an operation for renaming a folder
MCOIMAPOperation * op = [session renameFolderOperation:@"my documents" otherName:@"Documents"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
@@ -219,7 +219,7 @@
Create an operation for deleting a folder
MCOIMAPOperation * op = [session deleteFolderOperation:@"holidays 2009"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}]];
*/
@@ -229,7 +229,7 @@
Returns an operation that creates a new folder
MCOIMAPOperation * op = [session createFolderOperation:@"holidays 2013"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -239,7 +239,7 @@
Returns an operation to subscribe to a folder.
MCOIMAPOperation * op = [session createFolderOperation:@"holidays 2013"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
if (error != nil)
return;
MCOIMAPOperation * op = [session subscribeFolderOperation:@"holidays 2013"];
@@ -252,7 +252,7 @@
Returns an operation to unsubscribe from a folder.
MCOIMAPOperation * op = [session unsubscribeFolderOperation:@"holidays 2009"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
if (error != nil)
return;
MCOIMAPOperation * op = [session deleteFolderOperation:@"holidays 2009"]
@@ -265,7 +265,7 @@
Returns an operation to expunge a folder.
MCOIMAPOperation * op = [session expungeOperation:@"INBOX"];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -277,7 +277,7 @@
Returns an operation to add a message to a folder.
MCOIMAPOperation * op = [session appendMessageOperationWithFolder:@"Sent Mail" messageData:rfc822Data flags:MCOMessageFlagNone];
- [op start:^(NSError * error, uint32_t createdUID) {
+ [op start:^(NSError * __nullable error, uint32_t createdUID) {
if (error == nil) {
NSLog(@"created message with UID %lu", (unsigned long) createdUID);
}
@@ -291,7 +291,7 @@
Returns an operation to add a message with custom flags to a folder.
MCOIMAPOperation * op = [session appendMessageOperationWithFolder:@"Sent Mail" messageData:rfc822Data flags:MCOMessageFlagNone customFlags:@[@"$CNS-Greeting-On"]];
- [op start:^(NSError * error, uint32_t createdUID) {
+ [op start:^(NSError * __nullable error, uint32_t createdUID) {
if (error == nil) {
NSLog(@"created message with UID %lu", (unsigned long) createdUID);
}
@@ -308,7 +308,7 @@
MCOIMAPCopyMessagesOperation * op = [session copyMessagesOperationWithFolder:@"INBOX"
uids:[MCIndexSet indexSetWithIndex:456]
destFolder:@"Cocoa"];
- [op start:^(NSError * error, NSDictionary * uidMapping) {
+ [op start:^(NSError * __nullable error, NSDictionary * uidMapping) {
NSLog(@"copied to folder with UID mapping %@", uidMapping);
}];
*/
@@ -325,7 +325,7 @@
uids:[MCOIndexSet indexSetWithIndex:456]
kind:MCOIMAPStoreFlagsRequestKindAdd
flags:MCOMessageFlagSeen];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -343,7 +343,7 @@
numbers:[MCOIndexSet indexSetWithIndex:42]
kind:MCOIMAPStoreFlagsRequestKindAdd
flags:MCOMessageFlagSeen];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -362,7 +362,7 @@
kind:MCOIMAPStoreFlagsRequestKindAdd
flags:MCOMessageFlagSeen
customFlags:@["$CNS-Greeting-On"]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -383,7 +383,7 @@
kind:MCOIMAPStoreFlagsRequestKindAdd
flags:MCOMessageFlagSeen
customFlags:@["$CNS-Greeting-On"]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -402,7 +402,7 @@
numbers:[MCOIndexSet indexSetWithIndex:42]
kind:MCOIMAPStoreFlagsRequestKindAdd
labels:[NSArray arrayWithObject:@"Home"]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -420,7 +420,7 @@
uids:[MCOIndexSet indexSetWithIndex:456]
kind:MCOIMAPStoreFlagsRequestKindAdd
labels:[NSArray arrayWithObject:@"Home"]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -437,7 +437,7 @@
MCOIMAPFetchMessagesOperation * op = [session fetchMessagesByUIDOperationWithFolder:@"INBOX"
requestKind:MCOIMAPMessagesRequestKindHeaders | MCOIMAPMessagesRequestKindStructure
uids:MCORangeMake(1, UINT64_MAX)];
- [op start:^(NSError * error, NSArray * messages, MCOIndexSet * vanishedMessages) {
+ [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) {
for(MCOIMAPMessage * msg in messages) {
NSLog(@"%lu: %@", [msg uid], [msg header]);
}
@@ -453,7 +453,7 @@
MCOIMAPFetchMessagesOperation * op = [session fetchMessagesOperationWithFolder:@"INBOX"
requestKind:MCOIMAPMessagesRequestKindHeaders | MCOIMAPMessagesRequestKindStructure
uids:MCORangeMake(1, UINT64_MAX)];
- [op start:^(NSError * error, NSArray * messages, MCOIndexSet * vanishedMessages) {
+ [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) {
for(MCOIMAPMessage * msg in messages) {
NSLog(@"%lu: %@", [msg uid], [msg header]);
}
@@ -496,7 +496,7 @@
requestKind:MCOIMAPMessagesRequestKindUID
uids:MCORangeMake(1, UINT64_MAX)
modSeq:lastModSeq];
- [op start:^(NSError * error, NSArray * messages, MCOIndexSet * vanishedMessages) {
+ [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) {
NSLog(@"added or modified messages: %@", messages);
NSLog(@"deleted messages: %@", vanishedMessages);
}];
@@ -516,7 +516,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
requestKind:MCOIMAPMessagesRequestKindUID
uids:MCORangeMake(1, UINT64_MAX)
modSeq:lastModSeq];
- [op start:^(NSError * error, NSArray * messages, MCOIndexSet * vanishedMessages) {
+ [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) {
NSLog(@"added or modified messages: %@", messages);
NSLog(@"deleted messages: %@", vanishedMessages);
}];
@@ -534,7 +534,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
@param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content.
MCOIMAPFetchContentOperation * op = [session fetchMessageByUIDOperationWithFolder:@"INBOX" uid:456 urgent:NO];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -547,7 +547,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the content of a message.
MCOIMAPFetchContentOperation * op = [session fetchMessageByUIDOperationWithFolder:@"INBOX" uid:456];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -560,7 +560,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
@param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content.
MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" uid:456 urgent:NO];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -573,7 +573,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the content of a message.
MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" uid:456];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -586,7 +586,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
@param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content.
MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" number:42 urgent:NO];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -599,7 +599,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the content of a message, using IMAP sequence number.
MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" number:42];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData]
...
}];
@@ -612,7 +612,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
@param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content.
MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" uid:456 urgent:NO];
- [op start:^(NSError * error, MCOMessageParser * parser) {
+ [op start:^(NSError * __nullable error, MCOMessageParser * parser) {
...
}];
@@ -625,7 +625,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the parsed content of a message.
MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" uid:456];
- [op start:^(NSError * error, MCOMessageParser * parser) {
+ [op start:^(NSError * __nullable error, MCOMessageParser * parser) {
...
}];
@@ -638,7 +638,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
@param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content.
MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" number:42 urgent:NO];
- [op start:^(NSError * error, MCOMessageParser * parser) {
+ [op start:^(NSError * __nullable error, MCOMessageParser * parser) {
...
}];
@@ -651,7 +651,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the parsed content of a message, using IMAP sequence number.
MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" number:42];
- [op start:^(NSError * error, MCOMessageParser * parser) {
+ [op start:^(NSError * __nullable error, MCOMessageParser * parser) {
...
}];
@@ -670,7 +670,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
partID:@"1.2"
encoding:MCOEncodingBase64
urgent:YES];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -689,7 +689,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
uid:456
partID:@"1.2"
encoding:MCOEncodingBase64];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
@@ -699,7 +699,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
uid:[message uid]
partID:[part partID]
encoding:[part encoding]];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -717,7 +717,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
partID:@"1.2"
encoding:MCOEncodingBase64
urgent:YES];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -736,7 +736,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
uid:456
partID:@"1.2"
encoding:MCOEncodingBase64];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
@@ -746,7 +746,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
uid:[message uid]
partID:[part partID]
encoding:[part encoding]];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -764,7 +764,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
partID:@"1.2"
encoding:MCOEncodingBase64
urgent:YES];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -783,7 +783,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
number:42
partID:@"1.2"
encoding:MCOEncodingBase64];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
@@ -793,7 +793,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
number:[message sequenceNumber]
partID:[part partID]
encoding:[part encoding]];
- [op start:^(NSError * error, NSData * partData) {
+ [op start:^(NSError * __nullable error, NSData * partData) {
...
}];
*/
@@ -810,7 +810,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
MCOIMAPIdleOperation * op = [session idleOperationWithFolder:@"INBOX"
lastKnownUID:0];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -821,13 +821,13 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation to fetch the list of namespaces.
MCOIMAPFetchNamespaceOperation * op = [session fetchNamespaceOperation];
- [op start:^(NSError * error, NSDictionary * namespaces) {
+ [op start:^(NSError * __nullable error, NSDictionary * namespaces) {
if (error != nil)
return;
MCOIMAPNamespace * ns = [namespace objectForKey:MCOIMAPNamespacePersonal];
NSString * path = [ns pathForComponents:[NSArray arrayWithObject:]];
MCOIMAPOperation * createOp = [session createFolderOperation:foobar];
- [createOp start:^(NSError * error) {
+ [createOp start:^(NSError * __nullable error) {
...
}];
}];
@@ -839,7 +839,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
MCOIMAPIdentity * identity = [MCOIMAPIdentity identityWithVendor:@"Mozilla" name:@"Thunderbird" version:@"17.0.5"];
MCOIMAPIdentityOperation * op = [session identityOperationWithClientIdentity:identity];
- [op start:^(NSError * error, NSDictionary * serverIdentity) {
+ [op start:^(NSError * __nullable error, NSDictionary * serverIdentity) {
...
}];
*/
@@ -850,7 +850,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Useful for checking initial server capabilities.
MCOIMAPOperation * op = [session connectOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -860,7 +860,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation that will perform a No-Op operation on the given IMAP server.
MCOIMAPOperation * op = [session noopOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -870,7 +870,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
Returns an operation that will check whether the IMAP account is valid.
MCOIMAPOperation * op = [session checkAccountOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -883,7 +883,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
canIdle = NO;
MCOIMAPCapabilityOperation * op = [session capabilityOperation];
- [op start:^(NSError * error, MCOIndexSet * capabilities) {
+ [op start:^(NSError * __nullable error, MCOIndexSet * capabilities) {
if ([capabilities containsIndex:MCOIMAPCapabilityIdle]) {
canIdle = YES;
}
@@ -901,7 +901,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
MCOIMAPSearchOperation * op = [session searchOperationWithFolder:@"INBOX"
kind:MCOIMAPSearchKindFrom
searchString:@"laura"];
- [op start:^(NSError * error, MCOIndexSet * searchResult) {
+ [op start:^(NSError * __nullable error, MCOIndexSet * searchResult) {
...
}];
*/
@@ -915,7 +915,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchFrom:@"laura@etpan.org"]
MCOIMAPSearchOperation * op = [session searchExpressionOperationWithFolder:@"INBOX"
expression:expr];
- [op start:^(NSError * error, MCOIndexSet * searchResult) {
+ [op start:^(NSError * __nullable error, MCOIndexSet * searchResult) {
...
}];
*/
@@ -1000,7 +1000,7 @@ vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162
It will disconnect all the sockets created by the session.
MCOIMAPOperation * op = [session disconnectOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
diff --git a/src/objc/nntp/MCONNTPFetchAllArticlesOperation.h b/src/objc/nntp/MCONNTPFetchAllArticlesOperation.h
index 34ccee7e..022ce059 100644
--- a/src/objc/nntp/MCONNTPFetchAllArticlesOperation.h
+++ b/src/objc/nntp/MCONNTPFetchAllArticlesOperation.h
@@ -15,6 +15,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
/** This is an asynchronous operation that will fetch the list of a messages on the NNTP server. */
@interface MCONNTPFetchAllArticlesOperation : MCONNTPOperation
@@ -26,10 +27,11 @@
- On success `error` will be nil and `articles` will be an index set of article numbers.
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in MCOConstants.h, `messages` will be null
+ error code available in MCOConstants.h, `articles` will be null
*/
-- (void) start:(void (^)(NSError * error, MCOIndexSet * articles))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable articles))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPFetchArticleOperation.h b/src/objc/nntp/MCONNTPFetchArticleOperation.h
index b8bffcb0..170f594b 100644
--- a/src/objc/nntp/MCONNTPFetchArticleOperation.h
+++ b/src/objc/nntp/MCONNTPFetchArticleOperation.h
@@ -17,6 +17,7 @@
typedef void (^MCONNTPOperationProgressBlock)(unsigned int current, unsigned int maximum);
+NS_ASSUME_NONNULL_BEGIN
@interface MCONNTPFetchArticleOperation : MCONNTPOperation
/** This block will be called as data is downloaded from the network */
@@ -32,8 +33,9 @@ typedef void (^MCONNTPOperationProgressBlock)(unsigned int current, unsigned int
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `data` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSData * messageData))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable messageData))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPFetchHeaderOperation.h b/src/objc/nntp/MCONNTPFetchHeaderOperation.h
index 63ce7677..d23c278c 100644
--- a/src/objc/nntp/MCONNTPFetchHeaderOperation.h
+++ b/src/objc/nntp/MCONNTPFetchHeaderOperation.h
@@ -20,6 +20,7 @@
@class MCOMessageHeader;
+NS_ASSUME_NONNULL_BEGIN
@interface MCONNTPFetchHeaderOperation : MCONNTPOperation
/**
@@ -30,10 +31,11 @@
- On success `error` will be nil and `header` will contain the message header
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in MCOConstants.h, `header` will be null
+ error code available in MCOConstants.h, `header` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOMessageHeader * header))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOMessageHeader * __nullable header))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPFetchOverviewOperation.h b/src/objc/nntp/MCONNTPFetchOverviewOperation.h
index d63668e8..93a0b31f 100644
--- a/src/objc/nntp/MCONNTPFetchOverviewOperation.h
+++ b/src/objc/nntp/MCONNTPFetchOverviewOperation.h
@@ -13,6 +13,8 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCONNTPOperation.h>
+
+NS_ASSUME_NONNULL_BEGIN
@interface MCONNTPFetchOverviewOperation : MCONNTPOperation
/**
@@ -25,8 +27,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `messages` will be null
*/
-- (void) start:(void (^)(NSError * error, NSArray * /* MCOMessageHeader */ messages))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOMessageHeader */__nullable messages))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPFetchServerTimeOperation.h b/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
index a06dd746..38801810 100644
--- a/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
+++ b/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
@@ -15,6 +15,7 @@
@class MCOIndexSet;
+NS_ASSUME_NONNULL_BEGIN
/** This is an asynchronous operation that will fetch the list of a messages on the NNTP server. */
@interface MCONNTPFetchServerTimeOperation : MCONNTPOperation
@@ -26,10 +27,11 @@
- On success `error` will be nil and `date` will be the server's date and time as an NSDate.
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in MCOConstants.h, `messages` will be null
+ error code available in MCOConstants.h, `date` will be null
*/
-- (void) start:(void (^)(NSError * error, NSDate * date))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSDate * __nullable date))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPListNewsgroupsOperation.h b/src/objc/nntp/MCONNTPListNewsgroupsOperation.h
index ea702b75..9cba21d6 100644
--- a/src/objc/nntp/MCONNTPListNewsgroupsOperation.h
+++ b/src/objc/nntp/MCONNTPListNewsgroupsOperation.h
@@ -13,6 +13,7 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCONNTPOperation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface MCONNTPListNewsgroupsOperation : MCONNTPOperation
/**
@@ -25,8 +26,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `messages` will be null
*/
-- (void) start:(void (^)(NSError * error, NSArray * /* MCONNTPGroupInfo */ messages))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCONNTPGroupInfo */__nullable messages))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPOperation.h b/src/objc/nntp/MCONNTPOperation.h
index 9d4e2fcf..bed8874e 100644
--- a/src/objc/nntp/MCONNTPOperation.h
+++ b/src/objc/nntp/MCONNTPOperation.h
@@ -18,6 +18,7 @@
@see MCONNTPSession
*/
+NS_ASSUME_NONNULL_BEGIN
@interface MCONNTPOperation : MCOOperation
/**
@@ -30,8 +31,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/nntp/MCONNTPSession.h b/src/objc/nntp/MCONNTPSession.h
index 083d973b..0637ec7e 100644
--- a/src/objc/nntp/MCONNTPSession.h
+++ b/src/objc/nntp/MCONNTPSession.h
@@ -100,7 +100,7 @@
Returns an operation that will fetch the list of article numbers.
MCONNTPFetchAllArticlesOperation * op = [session fetchAllArticlesOperation:@"comp.lang.c"];
- [op start:^(NSError * error, MCOIndexSet * articles) {
+ [op start:^(NSError * __nullable error, MCOIndexSet * articles) {
}];
*/
- (MCONNTPFetchAllArticlesOperation *) fetchAllArticlesOperation:(NSString *)group;
@@ -109,7 +109,7 @@
Returns an operation that will fetch the header of the given message.
MCONNTPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx inGroup:@"comp.lang.c"];
- [op start:^(NSError * error, MCOMessageHeader * header) {
+ [op start:^(NSError * __nullable error, MCOMessageHeader * header) {
// header is the parsed header of the message.
}];
*/
@@ -119,7 +119,7 @@
Returns an operation that will fetch an overview (headers) for a set of messages.
MCONNTPFetchHeaderOperation * op = [session fetchOverviewOperationWithIndexes:indexes inGroup:@"comp.lang.c"];
- [op start:^(NSError * error, NSArray * headers) {
+ [op start:^(NSError * __nullable error, NSArray * headers) {
// headers are the parsed headers of each part of the overview.
}];
*/
@@ -129,7 +129,7 @@
Returns an operation that will fetch the content of the given message.
MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithIndex:idx inGroup:@"comp.lang.c"];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
// messageData is the RFC 822 formatted message data.
}];
*/
@@ -139,7 +139,7 @@
Returns an operation that will fetch the content of a message with the given messageID.
MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithMessageID:@"<MessageID123@mail.google.com>" inGroup:@"comp.lang.c"];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
// messageData is the RFC 822 formatted message data.
}];
*/
@@ -149,7 +149,7 @@
Returns an operation that will fetch the server's date and time.
MCONNTPFetchArticleOperation * op = [session fetchServerDateOperation];
- [op start:^(NSError * error, NSDate * serverDate) {
+ [op start:^(NSError * __nullable error, NSDate * serverDate) {
}];
*/
- (MCONNTPFetchServerTimeOperation *) fetchServerDateOperation;
@@ -158,7 +158,7 @@
Returns an operation that will list all available newsgroups.
MCONNTPListNewsgroupsOperation * op = [session listAllNewsgroupsOperation];
- [op start:^(NSError * error, NSArray * subscribedGroups) {
+ [op start:^(NSError * __nullable error, NSArray * subscribedGroups) {
}];
*/
- (MCONNTPListNewsgroupsOperation *) listAllNewsgroupsOperation;
@@ -167,7 +167,7 @@
Returns an operation that will list server-suggested default newsgroups.
MCONNTPListNewsgroupsOperation * op = [session listDefaultNewsgroupsOperation];
- [op start:^(NSError * error, NSArray * defaultGroups) {
+ [op start:^(NSError * __nullable error, NSArray * defaultGroups) {
}];
*/
- (MCONNTPListNewsgroupsOperation *) listDefaultNewsgroupsOperation;
@@ -176,7 +176,7 @@
Returns an operation that will disconnect the session.
MCONNTPOperation * op = [session disconnectOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -186,7 +186,7 @@
Returns an operation that will check whether the NNTP account is valid.
MCONNTPOperation * op = [session checkAccountOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
diff --git a/src/objc/pop/MCOPOPFetchHeaderOperation.h b/src/objc/pop/MCOPOPFetchHeaderOperation.h
index d4735ce4..6df92232 100644
--- a/src/objc/pop/MCOPOPFetchHeaderOperation.h
+++ b/src/objc/pop/MCOPOPFetchHeaderOperation.h
@@ -20,6 +20,7 @@
@class MCOMessageHeader;
+NS_ASSUME_NONNULL_BEGIN
@interface MCOPOPFetchHeaderOperation : MCOPOPOperation
/**
@@ -30,10 +31,11 @@
- On success `error` will be nil and `header` will contain the message header
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in MCOConstants.h, `header` will be null
+ error code available in MCOConstants.h, `header` will be nil
*/
-- (void) start:(void (^)(NSError * error, MCOMessageHeader * header))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, MCOMessageHeader * __nullable header))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/pop/MCOPOPFetchMessageOperation.h b/src/objc/pop/MCOPOPFetchMessageOperation.h
index b97825cf..a20469d4 100644
--- a/src/objc/pop/MCOPOPFetchMessageOperation.h
+++ b/src/objc/pop/MCOPOPFetchMessageOperation.h
@@ -17,6 +17,7 @@
typedef void (^MCOPOPOperationProgressBlock)(unsigned int current, unsigned int maximum);
+NS_ASSUME_NONNULL_BEGIN
@interface MCOPOPFetchMessageOperation : MCOPOPOperation
/** This block will be called as data is downloaded from the network */
@@ -32,8 +33,9 @@ typedef void (^MCOPOPOperationProgressBlock)(unsigned int current, unsigned int
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h, `data` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSData * messageData))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable messageData))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/pop/MCOPOPFetchMessagesOperation.h b/src/objc/pop/MCOPOPFetchMessagesOperation.h
index aef49081..b38f0f08 100644
--- a/src/objc/pop/MCOPOPFetchMessagesOperation.h
+++ b/src/objc/pop/MCOPOPFetchMessagesOperation.h
@@ -15,6 +15,7 @@
/** This is an asynchronous operation that will fetch the list of a messages on the POP3 account. */
+NS_ASSUME_NONNULL_BEGIN
@interface MCOPOPFetchMessagesOperation : MCOPOPOperation
/**
@@ -25,10 +26,11 @@
- On success `error` will be nil and `messages` will be an array of MCOPOPMessageInfo
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
- error code available in MCOConstants.h, `messages` will be null
+ error code available in MCOConstants.h, `messages` will be nil
*/
-- (void) start:(void (^)(NSError * error, NSArray * /* MCOPOPMessageInfo */ messages))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOPOPMessageInfo */__nullable messages))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/pop/MCOPOPNoopOperation.h b/src/objc/pop/MCOPOPNoopOperation.h
index 015a1685..1d08c9fa 100644
--- a/src/objc/pop/MCOPOPNoopOperation.h
+++ b/src/objc/pop/MCOPOPNoopOperation.h
@@ -15,6 +15,7 @@
/** This is an asynchronous operation that will perform a No-Op on the POP3 account. */
+NS_ASSUME_NONNULL_BEGIN
@interface MCOPOPNoopOperation : MCOPOPOperation
/**
@@ -27,8 +28,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/pop/MCOPOPOperation.h b/src/objc/pop/MCOPOPOperation.h
index 30180ccd..0937db76 100644
--- a/src/objc/pop/MCOPOPOperation.h
+++ b/src/objc/pop/MCOPOPOperation.h
@@ -18,6 +18,7 @@
@see MCOPOPSession
*/
+NS_ASSUME_NONNULL_BEGIN
@interface MCOPOPOperation : MCOOperation
/**
@@ -30,8 +31,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/pop/MCOPOPSession.h b/src/objc/pop/MCOPOPSession.h
index bf1f8cf9..6daa2379 100644
--- a/src/objc/pop/MCOPOPSession.h
+++ b/src/objc/pop/MCOPOPSession.h
@@ -102,7 +102,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will fetch the list of messages.
MCOPOPFetchMessagesOperation * op = [session fetchMessagesOperation];
- [op start:^(NSError * error, NSArray * messages) {
+ [op start:^(NSError * __nullable error, NSArray * messages) {
// messages is an array of MCOPOPMessageInfo
// [info index] can be used as reference for a given message in the other operations.
}];
@@ -113,7 +113,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will fetch the header of the given message.
MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx];
- [op start:^(NSError * error, MCOMessageHeader * header) {
+ [op start:^(NSError * __nullable error, MCOMessageHeader * header) {
// header is the parsed header of the message.
}];
*/
@@ -123,7 +123,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will fetch the content of the given message.
MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx];
- [op start:^(NSError * error, NSData * messageData) {
+ [op start:^(NSError * __nullable error, NSData * messageData) {
// messageData is the RFC 822 formatted message data.
}];
*/
@@ -138,7 +138,7 @@ See MCOConnectionType for more information.*/
[indexes addIndex:2];
[indexes addIndex:3];
MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -148,7 +148,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will disconnect the session.
MCOPOPOperation * op = [session disconnectOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -158,7 +158,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will check whether the POP account is valid.
MCOPOPOperation * op = [session checkAccountOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -168,7 +168,7 @@ See MCOConnectionType for more information.*/
Returns an operation that will perform a No-Op operation.
MCOPOPOperation * op = [session noopOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
diff --git a/src/objc/smtp/MCOSMTPLoginOperation.h b/src/objc/smtp/MCOSMTPLoginOperation.h
index e7ffc641..39715cc7 100644
--- a/src/objc/smtp/MCOSMTPLoginOperation.h
+++ b/src/objc/smtp/MCOSMTPLoginOperation.h
@@ -13,6 +13,7 @@
#import <MailCore/MCOSMTPOperation.h>
/** This is an asynchronous operation that will perform a noop operation through SMTP. */
+NS_ASSUME_NONNULL_BEGIN
@interface MCOSMTPLoginOperation : MCOSMTPOperation
/*
@@ -25,8 +26,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/smtp/MCOSMTPNoopOperation.h b/src/objc/smtp/MCOSMTPNoopOperation.h
index 0b22e5d9..e67698b7 100644
--- a/src/objc/smtp/MCOSMTPNoopOperation.h
+++ b/src/objc/smtp/MCOSMTPNoopOperation.h
@@ -25,7 +25,7 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
diff --git a/src/objc/smtp/MCOSMTPOperation.h b/src/objc/smtp/MCOSMTPOperation.h
index 7b92148f..111f386b 100644
--- a/src/objc/smtp/MCOSMTPOperation.h
+++ b/src/objc/smtp/MCOSMTPOperation.h
@@ -14,6 +14,7 @@
/** This is an asynchronous SMTP operation, used for sending messages. */
+NS_ASSUME_NONNULL_BEGIN
@interface MCOSMTPOperation : MCOOperation
/**
@@ -26,8 +27,9 @@
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/smtp/MCOSMTPSendOperation.h b/src/objc/smtp/MCOSMTPSendOperation.h
index 82b238c2..9474c0ef 100644
--- a/src/objc/smtp/MCOSMTPSendOperation.h
+++ b/src/objc/smtp/MCOSMTPSendOperation.h
@@ -16,6 +16,7 @@
typedef void (^MCOSMTPOperationProgressBlock)(unsigned int current, unsigned int maximum);
+NS_ASSUME_NONNULL_BEGIN
@interface MCOSMTPSendOperation : MCOSMTPOperation
/** This block will be called as the message is sent */
@@ -31,8 +32,9 @@ typedef void (^MCOSMTPOperationProgressBlock)(unsigned int current, unsigned int
- On failure, `error` will be set with `MCOErrorDomain` as domain and an
error code available in MCOConstants.h,
*/
-- (void) start:(void (^)(NSError * error))completionBlock;
+- (void) start:(void (^)(NSError * __nullable error))completionBlock;
@end
+NS_ASSUME_NONNULL_END
#endif
diff --git a/src/objc/smtp/MCOSMTPSession.h b/src/objc/smtp/MCOSMTPSession.h
index 64389c14..31055335 100644
--- a/src/objc/smtp/MCOSMTPSession.h
+++ b/src/objc/smtp/MCOSMTPSession.h
@@ -116,7 +116,7 @@
Returns an operation that will perform a login.
MCOSMTPOperation * op = [session loginOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -130,7 +130,7 @@
Generate RFC 822 data using MCOMessageBuilder
MCOSMTPOperation * op = [session sendOperationWithData:rfc822Data];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -146,7 +146,7 @@
MCOSMTPOperation * op = [session sendOperationWithData:rfc822Data
from:[MCOAddress addressWithMailbox:@"hoa@etpan.org"]
recipients:[NSArray arrayWithObject:[MCOAddress addressWithMailbox:@"laura@etpan.org"]]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -158,7 +158,7 @@
Returns an operation that will check whether the SMTP account is valid.
MCOSMTPOperation * op = [session checkAccountOperationWithFrom:[MCOAddress addressWithMailbox:@"hoa@etpan.org"]];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/
@@ -168,7 +168,7 @@
Returns an operation that will perform a No-Op.
MCOSMTPOperation * op = [session noopOperation];
- [op start:^(NSError * error) {
+ [op start:^(NSError * __nullable error) {
...
}];
*/