FBSDKBridgeAPIResponse.h 1.9 KB

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