aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/nntp
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 /src/objc/nntp
parentb93062e0e918f7924fa48724fdbf53d91aa348bb (diff)
Add nullability annotations
Diffstat (limited to 'src/objc/nntp')
-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
8 files changed, 35 insertions, 20 deletions
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) {
...
}];
*/