text: //
  //  O2MC.h
  //  O2MC
  //
  //  Created by Nicky Romeijn on 16-06-16.
  //  Copyright © 2016 Adversitement. All rights reserved.
  //
  
  #import <Foundation/Foundation.h>
  
  
  @interface O2MC : NSObject {
  }
  
  #pragma mark - Constructors
  
  +(nonnull instancetype) sharedInstance;
  
  
  #pragma mark - Configuration methods
  
  /**
   * Returns configured endpoint.
   * @return endpoint
   */
  -(nonnull NSString*) getEndpoint;
  
  /**
   * Configures the dispatch interval in seconds.
   * Defining a lower interval results in more realtime and lower chance of
   * data loss. On the other hand a lower interval will result in more data
   * usage and resource usage from the end user's device.
   * @param dispatchInterval interval of sending data to the server (defaults to 10)
   */
  -(void) setDispatchInterval:(nonnull NSNumber*)dispatchInterval;
  
  /**
   * Configures an end point where the events will be dispatched to.
   * @param endpoint http(s) URL which should be publicly reachable
   */
  -(void) setEndpoint:(nonnull NSString *)endpoint;
  
  /**
   * The max amount of connection retries before stopping dispatching.
   * @param maxRetries retry amount (defaults to 5)
   */
  -(void) setMaxRetries:(NSInteger)maxRetries;
  
  #pragma mark - Control methods
  
  /**
   * Stops tracking of events.
   */
  -(void) stop;
  
  /**
   * Stops tracking of events.
   * @param clearFunnel clears any existing events
   */
  -(void) stop:(BOOL)clearFunnel;
  
  /**
   * Resumes tracking when stopped.
   */
  -(void) resume;
  
  #pragma mark - Tracking methods
  
  /**
   * Sets an identifier for a user. This identifier will be sent along the tracked events.
   * This could be useful to correlate various batches with each other.
   *
   * @param uniqueIdentifier unique string which identifies a user.
   */
  -(void)setIdentifier:(nullable NSString*) uniqueIdentifier;
  
  /**
   * Sets a random session identifier to identify a user.
   * The identifier is based on a UUID.
   */
  -(void)setSessionIdentifier;
  
  /**
   * Tracks an event.
   * Essentially adds a new event with the String parameter as name to be dispatched on the next dispatch interval.
   * @param eventName name of tracked event
   */
  -(void)track:(nonnull NSString*)eventName;
  
  /**
   * Tracks an event with additional data.
   * Essentially adds a new event with the String parameter as name and any additional properties.
   * @param properties anything you'd like to keep track of
   * @param eventName name of tracked event
   */
  -(void)trackWithProperties:(nonnull NSDictionary*)properties eventName:(nonnull NSString*)eventName;
  
  /**
   * Tracks an event with a boolean value.
   * Adds a new event with name and a boolean value.
   * @param eventValue boolean value
   * @param eventName name of tracked event
   */
  -(void)trackWithBool:(BOOL)eventValue eventName:(nonnull NSString*)eventName;
  
  /**
   * Tracks an event with a string value.
   * Adds a new event with name and a string value.
   * @param eventValue any kind of string
   * @param eventName name of tracked event
   */
  -(void)trackWithString:(nonnull NSString*)eventValue eventName:(nonnull NSString*)eventName;
  
  /**
   * Tracks an event with a number value.
   * Adds a new event with name and any kind of numeric value.
   * @param eventValue any kind of number
   * @param eventName name of tracked event
   */
  -(void)trackWithNumber:(nonnull NSNumber*)eventValue eventName:(nonnull NSString*)eventName;
  
  @end
  