FPRConfigurations+Private.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import "FirebasePerformance/Sources/Configurations/FPRConfigurations.h"
  15. #import "FirebasePerformance/Sources/Configurations/FPRRemoteConfigFlags.h"
  16. NS_ASSUME_NONNULL_BEGIN
  17. @class GULUserDefaults;
  18. /** List of gauges the gauge manager controls. */
  19. typedef NS_OPTIONS(NSUInteger, FPRConfigurationSource) {
  20. FPRConfigurationSourceNone = 0,
  21. FPRConfigurationSourceRemoteConfig = (1 << 1),
  22. };
  23. /** This extension should only be used for testing. */
  24. @interface FPRConfigurations ()
  25. /** @brief Different configuration sources managed by the object. */
  26. @property(nonatomic) FPRConfigurationSource sources;
  27. /** @brief Instance of remote config flags. */
  28. @property(nonatomic) FPRRemoteConfigFlags *remoteConfigFlags;
  29. /** @brief The class to use when FIRApp is referenced. */
  30. @property(nonatomic) Class FIRAppClass;
  31. /** @brief User defaults used for user preference config fetches . */
  32. @property(nonatomic) GULUserDefaults *userDefaults;
  33. /** @brief The main bundle identifier used by config system. */
  34. @property(nonatomic) NSString *mainBundleIdentifier;
  35. /** @brief The infoDictionary provided by the main bundle. */
  36. @property(nonatomic) NSDictionary<NSString *, id> *infoDictionary;
  37. /** @brief Configurations update queue. */
  38. @property(nonatomic) dispatch_queue_t updateQueue;
  39. /**
  40. * Creates an instance of the FPRConfigurations class with the specified sources.
  41. *
  42. * @param source Source that needs to be enabled for fetching configurations.
  43. * @return Instance of FPRConfiguration.
  44. */
  45. - (instancetype)initWithSources:(FPRConfigurationSource)source NS_DESIGNATED_INITIALIZER;
  46. /**
  47. * Returns the list of SDK versions that are disabled. SDK Versions are ';' separated. If no
  48. * versions are disabled, an empty set is returned.
  49. *
  50. * @return The set of disabled SDK versions.
  51. */
  52. - (nonnull NSSet<NSString *> *)sdkDisabledVersions;
  53. /**
  54. * Resets this class by changing the onceToken back to 0, allowing a new singleton to be created,
  55. * while the old one is dealloc'd. This should only be used for testing.
  56. */
  57. + (void)reset;
  58. @end
  59. NS_ASSUME_NONNULL_END