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 #if !TARGET_OS_TV
10
11 #import <Foundation/Foundation.h>
12
13 @protocol FBSDKBridgeAPIRequest;
14 @class FBSDKBridgeAPIResponse;
15
16 NS_ASSUME_NONNULL_BEGIN
17
18 /**
19  Internal Type exposed to facilitate transition to Swift.
20  API Subject to change or removal without warning. Do not use.
21
22  @warning INTERNAL - DO NOT USE
23  */
24 typedef void (^ FBSDKBridgeAPIResponseBlock)(FBSDKBridgeAPIResponse *response)
25 NS_SWIFT_NAME(BridgeAPIResponseBlock);
26
27 /**
28  Internal Type exposed to facilitate transition to Swift.
29  API Subject to change or removal without warning. Do not use.
30
31  @warning INTERNAL - DO NOT USE
32  */
33 NS_SWIFT_NAME(BridgeAPIResponse)
34 @interface FBSDKBridgeAPIResponse : NSObject <NSCopying, NSObject>
35
36 - (instancetype)init NS_UNAVAILABLE;
37 + (instancetype)new NS_UNAVAILABLE;
38
39 + (instancetype)bridgeAPIResponseWithRequest:(NSObject<FBSDKBridgeAPIRequest> *)request
40                                        error:(nullable NSError *)error;
41 + (nullable instancetype)bridgeAPIResponseWithRequest:(NSObject<FBSDKBridgeAPIRequest> *)request
42                                           responseURL:(NSURL *)responseURL
43                                     sourceApplication:(nullable NSString *)sourceApplication
44                                                 error:(NSError *__autoreleasing *)errorRef;
45 + (instancetype)bridgeAPIResponseCancelledWithRequest:(NSObject<FBSDKBridgeAPIRequest> *)request;
46
47 @property (nonatomic, readonly, getter = isCancelled, assign) BOOL cancelled;
48 @property (nullable, nonatomic, readonly, copy) NSError *error;
49 @property (nonatomic, readonly, copy) NSObject<FBSDKBridgeAPIRequest> *request;
50 @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *responseParameters;
51
52 @end
53
54 NS_ASSUME_NONNULL_END
55
56 #endif