old mode 100755
new mode 100644
| | |
| | | #import "AFURLResponseSerialization.h" |
| | | #import "AFURLRequestSerialization.h" |
| | | #import "AFSecurityPolicy.h" |
| | | #import "AFCompatibilityMacros.h" |
| | | #if !TARGET_OS_WATCH |
| | | #import "AFNetworkReachabilityManager.h" |
| | | #endif |
| | |
| | | |
| | | @param cancelPendingTasks Whether or not to cancel pending tasks. |
| | | */ |
| | | - (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks; |
| | | - (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks DEPRECATED_ATTRIBUTE; |
| | | |
| | | /** |
| | | Invalidates the managed session, optionally canceling pending tasks and optionally resets given session. |
| | | |
| | | @param cancelPendingTasks Whether or not to cancel pending tasks. |
| | | @param resetSession Whether or not to reset the session of the manager. |
| | | */ |
| | | - (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks resetSession:(BOOL)resetSession; |
| | | |
| | | ///------------------------- |
| | | /// @name Running Data Tasks |
| | |
| | | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. |
| | | */ |
| | | - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request |
| | | completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; |
| | | completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler DEPRECATED_ATTRIBUTE; |
| | | |
| | | /** |
| | | Creates an `NSURLSessionDataTask` with the specified request. |
| | |
| | | |
| | | @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. |
| | | */ |
| | | - (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; |
| | | - (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * _Nullable (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; |
| | | |
| | | /** |
| | | Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. |
| | |
| | | */ |
| | | - (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block; |
| | | |
| | | /** |
| | | Sets a block to be executed when metrics are finalized related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didFinishCollectingMetrics:`. |
| | | |
| | | @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any metrics that were collected in the process of executing the task. |
| | | */ |
| | | #if AF_CAN_INCLUDE_SESSION_TASK_METRICS |
| | | - (void)setTaskDidFinishCollectingMetricsBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSURLSessionTaskMetrics * _Nullable metrics))block; |
| | | #endif |
| | | ///------------------------------------------- |
| | | /// @name Setting Data Task Delegate Callbacks |
| | | ///------------------------------------------- |
| | |
| | | |
| | | @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. |
| | | */ |
| | | - (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block; |
| | | - (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block AF_API_UNAVAILABLE(macos); |
| | | |
| | | ///----------------------------------------------- |
| | | /// @name Setting Download Task Delegate Callbacks |
| | |
| | | */ |
| | | FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey; |
| | | |
| | | /** |
| | | The session task metrics taken from the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteSessionTaskMetrics` |
| | | */ |
| | | FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSessionTaskMetrics; |
| | | |
| | | NS_ASSUME_NONNULL_END |