18
18
19
19
#import " GULNetworkLoggerProtocol.h"
20
20
21
- typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *response,
22
- NSData *data,
23
- NSError *error);
24
- typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *response,
25
- NSData *data,
21
+ NS_ASSUME_NONNULL_BEGIN
22
+
23
+ typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response,
24
+ NSData *_Nullable data,
25
+ NSError *_Nullable error);
26
+ typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response,
27
+ NSData *_Nullable data,
26
28
NSString *sessionID,
27
- NSError *error);
29
+ NSError *_Nullable error);
28
30
typedef void (^GULNetworkSystemCompletionHandler)(void );
29
31
30
32
// / The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses.
@@ -41,19 +43,20 @@ typedef void (^GULNetworkSystemCompletionHandler)(void);
41
43
completionHandler : (GULNetworkSystemCompletionHandler)completionHandler ;
42
44
43
45
// / Initializes with logger delegate.
44
- - (instancetype )initWithNetworkLoggerDelegate : ( id <GULNetworkLoggerDelegate>) networkLoggerDelegate
45
- NS_DESIGNATED_INITIALIZER;
46
+ - (instancetype )initWithNetworkLoggerDelegate :
47
+ (nullable id <GULNetworkLoggerDelegate>) networkLoggerDelegate NS_DESIGNATED_INITIALIZER;
46
48
47
49
- (instancetype )init NS_UNAVAILABLE;
48
50
49
51
// / Sends an asynchronous POST request and calls the provided completion handler when the request
50
52
// / completes or when errors occur, and returns an ID of the session/connection.
51
- - (NSString *)sessionIDFromAsyncPOSTRequest : (NSURLRequest *)request
52
- completionHandler : (GULNetworkURLSessionCompletionHandler)handler ;
53
+ - (nullable NSString *)sessionIDFromAsyncPOSTRequest : (NSURLRequest *)request
54
+ completionHandler : (GULNetworkURLSessionCompletionHandler)handler ;
53
55
54
56
// / Sends an asynchronous GET request and calls the provided completion handler when the request
55
57
// / completes or when errors occur, and returns an ID of the session.
56
- - (NSString *)sessionIDFromAsyncGETRequest : (NSURLRequest *)request
57
- completionHandler : (GULNetworkURLSessionCompletionHandler)handler ;
58
+ - (nullable NSString *)sessionIDFromAsyncGETRequest : (NSURLRequest *)request
59
+ completionHandler : (GULNetworkURLSessionCompletionHandler)handler ;
58
60
61
+ NS_ASSUME_NONNULL_END
59
62
@end
0 commit comments