commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
#import <FBSDKCoreKit_Basics/FBSDKSessionProviding.h> |
|
12 |
|
|
13 |
NS_ASSUME_NONNULL_BEGIN |
|
14 |
|
|
15 |
typedef void (^ FBSDKURLSessionTaskBlock)(NSData *_Nullable responseData, |
|
16 |
NSURLResponse *_Nullable response, |
|
17 |
NSError *_Nullable error) |
|
18 |
NS_SWIFT_NAME(UrlSessionTaskBlock); |
|
19 |
|
|
20 |
NS_SWIFT_NAME(UrlSessionTask) |
|
21 |
@interface FBSDKURLSessionTask : NSObject |
|
22 |
|
|
23 |
@property (nonatomic, strong) id<FBSDKSessionDataTask> task; |
|
24 |
@property (atomic, readonly) NSURLSessionTaskState state; |
|
25 |
@property (nonatomic, readonly, strong) NSDate *requestStartDate; |
|
26 |
@property (nullable, nonatomic, copy) FBSDKURLSessionTaskBlock handler; |
|
27 |
@property (nonatomic, assign) uint64_t requestStartTime; |
|
28 |
@property (nonatomic, assign) NSUInteger loggerSerialNumber; |
|
29 |
|
|
30 |
- (instancetype)init NS_UNAVAILABLE; |
|
31 |
+ (instancetype)new NS_UNAVAILABLE; |
|
32 |
|
|
33 |
- (nullable instancetype)initWithRequest:(NSURLRequest *)request |
|
34 |
fromSession:(id<FBSDKSessionProviding>)session |
|
35 |
completionHandler:(nullable FBSDKURLSessionTaskBlock)handler; |
|
36 |
|
|
37 |
- (void)start; |
|
38 |
- (void)cancel; |
|
39 |
|
|
40 |
@end |
|
41 |
|
|
42 |
NS_ASSUME_NONNULL_END |