| 1 | 
           efrain | 
           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 | 
              | 
        
        
            | 
            | 
           17 | 
           #import <Foundation/Foundation.h>
  | 
        
        
            | 
            | 
           18 | 
              | 
        
        
            | 
            | 
           19 | 
           @protocol FIRAnalyticsInteropListener;
  | 
        
        
            | 
            | 
           20 | 
              | 
        
        
            | 
            | 
           21 | 
           NS_ASSUME_NONNULL_BEGIN
  | 
        
        
            | 
            | 
           22 | 
              | 
        
        
            | 
            | 
           23 | 
           /// Block typedef callback parameter to `getUserProperties(with:)`.
  | 
        
        
            | 
            | 
           24 | 
           typedef void (^FIRAInteropUserPropertiesCallback)(NSDictionary<NSString *, id> *userProperties);
  | 
        
        
            | 
            | 
           25 | 
              | 
        
        
            | 
            | 
           26 | 
           /// Connector for bridging communication between Firebase SDKs and FirebaseAnalytics APIs.
  | 
        
        
            | 
            | 
           27 | 
           @protocol FIRAnalyticsInterop
  | 
        
        
            | 
            | 
           28 | 
              | 
        
        
            | 
            | 
           29 | 
           /// Sets user property when trigger event is logged. This API is only available in the SDK.
  | 
        
        
            | 
            | 
           30 | 
           - (void)setConditionalUserProperty:(NSDictionary<NSString *, id> *)conditionalUserProperty;
  | 
        
        
            | 
            | 
           31 | 
              | 
        
        
            | 
            | 
           32 | 
           /// Clears user property if set.
  | 
        
        
            | 
            | 
           33 | 
           - (void)clearConditionalUserProperty:(NSString *)userPropertyName
  | 
        
        
            | 
            | 
           34 | 
                                      forOrigin:(NSString *)origin
  | 
        
        
            | 
            | 
           35 | 
                                 clearEventName:(NSString *)clearEventName
  | 
        
        
            | 
            | 
           36 | 
                           clearEventParameters:(NSDictionary<NSString *, NSString *> *)clearEventParameters;
  | 
        
        
            | 
            | 
           37 | 
              | 
        
        
            | 
            | 
           38 | 
           /// Returns currently set user properties.
  | 
        
        
            | 
            | 
           39 | 
           - (NSArray<NSDictionary<NSString *, NSString *> *> *)conditionalUserProperties:(NSString *)origin
  | 
        
        
            | 
            | 
           40 | 
                                                                       propertyNamePrefix:
  | 
        
        
            | 
            | 
           41 | 
                                                                           (NSString *)propertyNamePrefix;
  | 
        
        
            | 
            | 
           42 | 
              | 
        
        
            | 
            | 
           43 | 
           /// Returns the maximum number of user properties.
  | 
        
        
            | 
            | 
           44 | 
           - (NSInteger)maxUserProperties:(NSString *)origin;
  | 
        
        
            | 
            | 
           45 | 
              | 
        
        
            | 
            | 
           46 | 
           /// Returns the user properties to a callback function.
  | 
        
        
            | 
            | 
           47 | 
           - (void)getUserPropertiesWithCallback:(FIRAInteropUserPropertiesCallback)callback;
  | 
        
        
            | 
            | 
           48 | 
              | 
        
        
            | 
            | 
           49 | 
           /// Logs events.
  | 
        
        
            | 
            | 
           50 | 
           - (void)logEventWithOrigin:(NSString *)origin
  | 
        
        
            | 
            | 
           51 | 
                                 name:(NSString *)name
  | 
        
        
            | 
            | 
           52 | 
                           parameters:(nullable NSDictionary<NSString *, id> *)parameters;
  | 
        
        
            | 
            | 
           53 | 
              | 
        
        
            | 
            | 
           54 | 
           /// Sets user property.
  | 
        
        
            | 
            | 
           55 | 
           - (void)setUserPropertyWithOrigin:(NSString *)origin name:(NSString *)name value:(id)value;
  | 
        
        
            | 
            | 
           56 | 
              | 
        
        
            | 
            | 
           57 | 
           /// Registers an Analytics listener for the given origin.
  | 
        
        
            | 
            | 
           58 | 
           - (void)registerAnalyticsListener:(id<FIRAnalyticsInteropListener>)listener
  | 
        
        
            | 
            | 
           59 | 
                                  withOrigin:(NSString *)origin;
  | 
        
        
            | 
            | 
           60 | 
              | 
        
        
            | 
            | 
           61 | 
           /// Unregisters an Analytics listener for the given origin.
  | 
        
        
            | 
            | 
           62 | 
           - (void)unregisterAnalyticsListenerWithOrigin:(NSString *)origin;
  | 
        
        
            | 
            | 
           63 | 
              | 
        
        
            | 
            | 
           64 | 
           @end
  | 
        
        
            | 
            | 
           65 | 
              | 
        
        
            | 
            | 
           66 | 
           NS_ASSUME_NONNULL_END
  |