lpw
2024-04-15 97fc0a41111c5a929ee8be9d6511775697ffa760
commit | author | age
e0ec42 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/FBSDKURLSessionTask.h>
12
13 NS_ASSUME_NONNULL_BEGIN
14
15 @interface FBSDKURLSession : NSObject
16
17 @property (nullable, atomic, strong) NSURLSession *session;
18 @property (nullable, nonatomic, weak) id<NSURLSessionDataDelegate> delegate;
19 @property (nullable, nonatomic, retain) NSOperationQueue *delegateQueue;
20
21 - (instancetype)init NS_UNAVAILABLE;
22 + (instancetype)new NS_UNAVAILABLE;
23
24 - (instancetype)initWithDelegate:(id<NSURLSessionDataDelegate>)delegate
25                    delegateQueue:(NSOperationQueue *)delegateQueue;
26
27 - (void)executeURLRequest:(NSURLRequest *)request
28         completionHandler:(FBSDKURLSessionTaskBlock)handler;
29
30 - (void)updateSessionWithBlock:(dispatch_block_t)block;
31
32 - (void)invalidateAndCancel;
33
34 - (BOOL)valid;
35
36 @end
37
38 NS_ASSUME_NONNULL_END