lpw
2022-02-15 2e29a3a585524a054640bb6e7bdf26fe77ba1f17
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 #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 error:(NSError *)error;
40 + (nullable instancetype)bridgeAPIResponseWithRequest:(NSObject<FBSDKBridgeAPIRequest> *)request
41                                           responseURL:(NSURL *)responseURL
42                                     sourceApplication:(nullable NSString *)sourceApplication
43                                                 error:(NSError *__autoreleasing *)errorRef;
44 + (instancetype)bridgeAPIResponseCancelledWithRequest:(NSObject<FBSDKBridgeAPIRequest> *)request;
45
46 @property (nonatomic, readonly, getter = isCancelled, assign) BOOL cancelled;
47 @property (nullable, nonatomic, readonly, copy) NSError *error;
48 @property (nonatomic, readonly, copy) NSObject<FBSDKBridgeAPIRequest> *request;
49 @property (nullable, nonatomic, readonly, copy) NSDictionary<NSString *, id> *responseParameters;
50
51 @end
52
53 NS_ASSUME_NONNULL_END
54
55 #endif