You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.3 KiB

  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 <Foundation/Foundation.h>
  17. @class FIRAConditionalUserProperty;
  18. @protocol FIRAnalyticsInteropListener;
  19. NS_ASSUME_NONNULL_BEGIN
  20. /// Connector for bridging communication between Firebase SDKs and FirebaseAnalytics API.
  21. @protocol FIRAnalyticsInterop
  22. /// Sets user property when trigger event is logged. This API is only available in the SDK.
  23. - (void)setConditionalUserProperty:(FIRAConditionalUserProperty *)conditionalUserProperty;
  24. /// Clears user property if set.
  25. - (void)clearConditionalUserProperty:(NSString *)userPropertyName
  26. clearEventName:(NSString *)clearEventName
  27. clearEventParameters:(NSDictionary *)clearEventParameters;
  28. /// Returns currently set user properties.
  29. - (NSArray<FIRAConditionalUserProperty *> *)conditionalUserProperties:(NSString *)origin
  30. propertyNamePrefix:
  31. (NSString *)propertyNamePrefix;
  32. /// Returns the maximum number of user properties.
  33. - (NSInteger)maxUserProperties:(NSString *)origin;
  34. /// Logs events.
  35. - (void)logEventWithOrigin:(NSString *)origin
  36. name:(NSString *)name
  37. parameters:(nullable NSDictionary<NSString *, id> *)parameters;
  38. /// Sets user property.
  39. - (void)setUserPropertyWithOrigin:(NSString *)origin name:(NSString *)name value:(id)value;
  40. /// Registers an Analytics listener for the given origin.
  41. - (void)registerAnalyticsListener:(id<FIRAnalyticsInteropListener>)listener
  42. withOrigin:(NSString *)origin;
  43. /// Unregisters an Analytics listener for the given origin.
  44. - (void)unregisterAnalyticsListenerWithOrigin:(NSString *)origin;
  45. @end
  46. NS_ASSUME_NONNULL_END