FIRIAMRuntimeManager.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2017 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 <Foundation/Foundation.h>
  17. #import "FIRIAMActivityLogger.h"
  18. #import "FIRIAMBookKeeper.h"
  19. #import "FIRIAMDisplayExecutor.h"
  20. #import "FIRIAMMessageClientCache.h"
  21. #import "FIRIAMSDKSettings.h"
  22. #import "FIRIAMServerMsgFetchStorage.h"
  23. NS_ASSUME_NONNULL_BEGIN
  24. // A class for managing the objects/dependencies for supporting different fiam flows at runtime
  25. @interface FIRIAMRuntimeManager : NSObject
  26. @property(nonatomic, nonnull) FIRIAMSDKSettings *currentSetting;
  27. @property(nonatomic, nonnull) FIRIAMActivityLogger *activityLogger;
  28. @property(nonatomic, nonnull) FIRIAMBookKeeperViaUserDefaults *bookKeeper;
  29. @property(nonatomic, nonnull) FIRIAMMessageClientCache *messageCache;
  30. @property(nonatomic, nonnull) FIRIAMServerMsgFetchStorage *fetchResultStorage;
  31. @property(nonatomic, nonnull) FIRIAMDisplayExecutor *displayExecutor;
  32. // Initialize fiam SDKs and start various flows with specified settings.
  33. - (void)startRuntimeWithSDKSettings:(FIRIAMSDKSettings *)settings;
  34. // Pause runtime flows/functions to disable SDK functions at runtime
  35. - (void)pause;
  36. // Resume runtime flows/functions.
  37. - (void)resume;
  38. // allows app to programmatically turn on/off auto data collection for fiam, which also implies
  39. // running/stopping fiam functionalities
  40. @property(nonatomic) BOOL automaticDataCollectionEnabled;
  41. // Get the global singleton instance
  42. + (FIRIAMRuntimeManager *)getSDKRuntimeInstance;
  43. // a method used to suppress or allow message being displayed based on the parameter
  44. // @param shouldSuppress if true, no new message is rendered by the sdk.
  45. - (void)setShouldSuppressMessageDisplay:(BOOL)shouldSuppress;
  46. @end
  47. NS_ASSUME_NONNULL_END