From 71b44545c035071aac86c6db1ef4c5d0d92d2afd Mon Sep 17 00:00:00 2001 From: hank <hank.zhang@proficientcity.com> Date: Tue, 22 Jan 2019 10:55:29 +0800 Subject: [PATCH] 添加V3.8.0 --- frameworks/AFNetworking.framework/Headers/AFURLSessionManager.h | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/frameworks/AFNetworking.framework/Headers/AFURLSessionManager.h b/frameworks/AFNetworking.framework/Headers/AFURLSessionManager.h old mode 100755 new mode 100644 index d2b28ce..4b54aad --- a/frameworks/AFNetworking.framework/Headers/AFURLSessionManager.h +++ b/frameworks/AFNetworking.framework/Headers/AFURLSessionManager.h @@ -25,6 +25,7 @@ #import "AFURLResponseSerialization.h" #import "AFURLRequestSerialization.h" #import "AFSecurityPolicy.h" +#import "AFCompatibilityMacros.h" #if !TARGET_OS_WATCH #import "AFNetworkReachabilityManager.h" #endif @@ -195,7 +196,15 @@ @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 @@ -377,6 +386,14 @@ */ - (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 ///------------------------------------------- @@ -414,7 +431,7 @@ @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 @@ -497,4 +514,9 @@ */ 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 -- Gitblit v1.8.0