FPRConfigurations+Private.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. /** List of gauges the gauge manager controls. */
  18. typedef NS_OPTIONS(NSUInteger, FPRConfigurationSource) {
  19. FPRConfigurationSourceNone = 0,
  20. FPRConfigurationSourceRemoteConfig = (1 << 1),
  21. };
  22. /** This extension should only be used for testing. */
  23. @interface FPRConfigurations ()
  24. /** @brief Different configuration sources managed by the object. */
  25. @property(nonatomic) FPRConfigurationSource sources;
  26. /** @brief Instance of remote config flags. */
  27. @property(nonatomic) FPRRemoteConfigFlags *remoteConfigFlags;
  28. /** @brief The class to use when FIRApp is referenced. */
  29. @property(nonatomic) Class FIRAppClass;
  30. /** @brief User defaults used for user preference config fetches . */
  31. @property(nonatomic) NSUserDefaults *userDefaults;
  32. /** @brief The main bundle identifier used by config system. */
  33. @property(nonatomic) NSString *mainBundleIdentifier;
  34. /** @brief The infoDictionary provided by the main bundle. */
  35. @property(nonatomic) NSDictionary<NSString *, id> *infoDictionary;
  36. /** @brief Configurations update queue. */
  37. @property(nonatomic) dispatch_queue_t updateQueue;
  38. /**
  39. * Creates an instance of the FPRConfigurations class with the specified sources.
  40. *
  41. * @param source Source that needs to be enabled for fetching configurations.
  42. * @return Instance of FPRConfiguration.
  43. */
  44. - (instancetype)initWithSources:(FPRConfigurationSource)source NS_DESIGNATED_INITIALIZER;
  45. /**
  46. * Returns the list of SDK versions that are disabled. SDK Versions are ';' separated. If no
  47. * versions are disabled, an empty set is returned.
  48. *
  49. * @return The set of disabled SDK versions.
  50. */
  51. - (nonnull NSSet<NSString *> *)sdkDisabledVersions;
  52. /**
  53. * Resets this class by changing the onceToken back to 0, allowing a new singleton to be created,
  54. * while the old one is dealloc'd. This should only be used for testing.
  55. */
  56. + (void)reset;
  57. @end
  58. NS_ASSUME_NONNULL_END