FPRClient+Private.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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/ProtoSupport/PerfMetric.pbobjc.h"
  15. #import "FirebasePerformance/Sources/FPRClient.h"
  16. @class FPRGDTLogger;
  17. @class FPRConfigurations;
  18. @class FIRInstallations;
  19. /**
  20. * Extension that is added on top of the class FPRClient to make the private properties visible
  21. * between the implementation file and the unit tests.
  22. */
  23. @interface FPRClient ()
  24. @property(nonatomic, getter=isConfigured, readwrite) BOOL configured;
  25. /** GDT Logger to transmit Fireperf events to Google Data Transport. */
  26. @property(nonatomic) FPRGDTLogger *gdtLogger;
  27. /** The queue group all FPRClient work will run on. Used for testing only. */
  28. @property(nonatomic, readonly) dispatch_group_t eventsQueueGroup;
  29. /** Serial queue used for processing events. */
  30. @property(nonatomic, readonly) dispatch_queue_t eventsQueue;
  31. /** Firebase Remote Configuration object for FPRClient. */
  32. @property(nonatomic) FPRConfigurations *configuration;
  33. /** Firebase Installations object for FPRClient. */
  34. @property(nonatomic) FIRInstallations *installations;
  35. /**
  36. * Determines the log directory path in the caches directory.
  37. *
  38. * @return The directory in which Clearcut logs are stored.
  39. */
  40. + (NSString *)logDirectoryPath;
  41. /**
  42. * Cleans up the log directory path in the cache directory created for Clearcut logs storage.
  43. *
  44. * @remark This method (cleanup logic) should stay for a while until all of our apps have migrated
  45. * to a version which includes this logic.
  46. */
  47. + (void)cleanupClearcutCacheDirectory;
  48. /** Performs post processing and logs a FPRMSGPerfMetric object to Google Data Transport.
  49. * @param event Reference to a FPRMSGPerfMetric proto object.
  50. */
  51. - (void)processAndLogEvent:(FPRMSGPerfMetric *)event;
  52. @end