FBSDKServerConfigurationProviding.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #import <FBSDKCoreKit/FBSDKGraphRequest.h>
  9. #import <FBSDKCoreKit/FBSDKServerConfiguration.h>
  10. #import <Foundation/Foundation.h>
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. Internal type exposed to facilitate transition to Swift.
  14. API Subject to change or removal without warning. Do not use.
  15. @warning INTERNAL - DO NOT USE
  16. */
  17. NS_SWIFT_NAME(_ServerConfigurationBlock)
  18. typedef void (^FBSDKServerConfigurationBlock)(FBSDKServerConfiguration *_Nullable serverConfiguration, NSError *_Nullable error);
  19. /**
  20. Internal type exposed to facilitate transition to Swift.
  21. API Subject to change or removal without warning. Do not use.
  22. @warning INTERNAL - DO NOT USE
  23. */
  24. NS_SWIFT_NAME(_ServerConfigurationProviding)
  25. @protocol FBSDKServerConfigurationProviding
  26. - (FBSDKServerConfiguration *)cachedServerConfiguration;
  27. /**
  28. Executes the completionBlock with a valid and current configuration when it is available.
  29. This method will use a cached configuration if it is valid and not expired.
  30. */
  31. - (void)loadServerConfigurationWithCompletionBlock:(nullable FBSDKServerConfigurationBlock)completionBlock;
  32. - (void)processLoadRequestResponse:(id)result error:(nullable NSError *)error appID:(NSString *)appID;
  33. - (nullable FBSDKGraphRequest *)requestToLoadServerConfiguration:(NSString *)appID;
  34. @end
  35. NS_ASSUME_NONNULL_END