FDLURLComponents+Private.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "FirebaseDynamicLinks/Sources/Public/FirebaseDynamicLinks/FDLURLComponents.h"
  17. /**
  18. * Label exceptions from FDL.
  19. */
  20. FOUNDATION_EXPORT NSString *_Nonnull const kFirebaseDurableDeepLinkErrorDomain;
  21. NS_ASSUME_NONNULL_BEGIN
  22. /// Each of the parameter classes used in FIRDynamicLinkURLComponents needs to be able to
  23. /// provide a dictionary representation of itself to be codified into URL query parameters. This
  24. /// protocol defines that behavior.
  25. @protocol FDLDictionaryRepresenting <NSObject>
  26. @required
  27. @property(nonatomic, readonly) NSDictionary<NSString *, NSString *> *dictionaryRepresentation;
  28. @end
  29. @interface FIRDynamicLinkGoogleAnalyticsParameters () <FDLDictionaryRepresenting>
  30. @end
  31. @interface FIRDynamicLinkIOSParameters () <FDLDictionaryRepresenting>
  32. @end
  33. @interface FIRDynamicLinkItunesConnectAnalyticsParameters () <FDLDictionaryRepresenting>
  34. @end
  35. @interface FIRDynamicLinkAndroidParameters () <FDLDictionaryRepresenting>
  36. @end
  37. @interface FIRDynamicLinkSocialMetaTagParameters () <FDLDictionaryRepresenting>
  38. @end
  39. @interface FIRDynamicLinkNavigationInfoParameters () <FDLDictionaryRepresenting>
  40. @end
  41. @interface FIRDynamicLinkOtherPlatformParameters () <FDLDictionaryRepresenting>
  42. @end
  43. @interface FIRDynamicLinkComponents ()
  44. /// Creates and returns a request based on the url and options. Exposed for testing.
  45. + (NSURLRequest *)shorteningRequestForLongURL:(NSURL *)url
  46. options:(nullable FIRDynamicLinkComponentsOptions *)options;
  47. /// Sends an HTTP request using NSURLSession. Exposed for testing.
  48. + (void)sendHTTPRequest:(NSURLRequest *)request
  49. completion:(void (^)(NSData *_Nullable data, NSError *_Nullable error))completion;
  50. @end
  51. NS_ASSUME_NONNULL_END