diff options
author | Justin R. Miller <incanus@users.noreply.github.com> | 2015-03-26 23:20:20 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@users.noreply.github.com> | 2015-03-26 23:20:20 -0700 |
commit | 4a4d9c1a2d2b4e11735f8e5ccf0d0d7df567679b (patch) | |
tree | d6d68372ec918cf82481ddc77af19c90b3cd932e /include | |
parent | e42dab756cd86042afea2f883e5f465e202ca694 (diff) | |
parent | 29cd6b49789cb4b39beb107e4721948dc9c2cfa4 (diff) | |
download | qtlocation-mapboxgl-4a4d9c1a2d2b4e11735f8e5ccf0d0d7df567679b.tar.gz |
Merge pull request #1132 from mapbox/metrics-stability-squash
fixes #1116: metrics stability & performance refactor
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 4 | ||||
-rw-r--r-- | include/mbgl/ios/MGLMapboxEvents.h | 53 | ||||
-rw-r--r-- | include/mbgl/ios/MGLMetricsLocationManager.h | 21 |
3 files changed, 41 insertions, 37 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index b41e2f5d72..aa92b0c822 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -1,8 +1,8 @@ +#import "MGLTypes.h" + #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> -#import "MGLTypes.h" - @class MGLUserLocation; @protocol MGLMapViewDelegate; diff --git a/include/mbgl/ios/MGLMapboxEvents.h b/include/mbgl/ios/MGLMapboxEvents.h index bb28ec26c5..541f21df43 100644 --- a/include/mbgl/ios/MGLMapboxEvents.h +++ b/include/mbgl/ios/MGLMapboxEvents.h @@ -1,26 +1,43 @@ -// -// MapboxEvents.h -// MapboxEvents -// -// Created by Brad Leege on 3/5/15. -// Copyright (c) 2015 Mapbox. All rights reserved. -// - #import <Foundation/Foundation.h> +extern NSString *const MGLEventMapLoad; +extern NSString *const MGLEventMapTap; +extern NSString *const MGLEventMapSingleTap; +extern NSString *const MGLEventMapDoubleTap; +extern NSString *const MGLEventMapTwoFingerSingleTap; +extern NSString *const MGLEventMapQuickZoom; +extern NSString *const MGLEventMapPanStart; +extern NSString *const MGLEventMapPanEnd; +extern NSString *const MGLEventMapPinchStart; +extern NSString *const MGLEventMapRotateStart; +extern NSString *const MGLEventMapLocation; + @interface MGLMapboxEvents : NSObject -@property (atomic) NSInteger flushAt; -@property (atomic) NSInteger flushAfter; -@property (atomic) NSString *api; -@property (atomic) NSString *token; -@property (atomic) NSString *appName; -@property (atomic) NSString *appVersion; +// You must call these methods from the main thread. +// ++ (void) setToken:(NSString *)token; ++ (void) setAppName:(NSString *)appName; ++ (void) setAppVersion:(NSString *)appVersion; -+ (id)sharedManager; +// You can call this method from any thread. Significant work will +// be dispatched to a low-priority background queue and all +// resulting calls are guaranteed threadsafe. +// +// Events or attributes passed could be accessed on non-main threads, +// so you must not reference UI elements from within any arguments. +// Copy any values needed first or create dedicated methods in this +// class for threadsafe access to UIKit classes. +// ++ (void) pushEvent:(NSString *)event withAttributes:(NSDictionary *)attributeDictionary; -- (void) pushEvent:(NSString *)event withAttributes:(NSDictionary *)attributeDictionary; +// You can call these methods from any thread. +// ++ (NSString *) checkEmailEnabled; ++ (BOOL) checkPushEnabled; -- (void) flush; +// You can call this method from any thread. +// ++ (void) flush; -@end
\ No newline at end of file +@end diff --git a/include/mbgl/ios/MGLMetricsLocationManager.h b/include/mbgl/ios/MGLMetricsLocationManager.h index ce04ae9ef6..7281d05010 100644 --- a/include/mbgl/ios/MGLMetricsLocationManager.h +++ b/include/mbgl/ios/MGLMetricsLocationManager.h @@ -1,22 +1,9 @@ -// -// MBLocationManager.h -// Hermes -// -// Created by Brad Leege on 3/8/15. -// Copyright (c) 2015 Mapbox. All rights reserved. -// - #import <Foundation/Foundation.h> -#import "CoreLocation/CoreLocation.h" -@interface MGLMetricsLocationManager : NSObject <CLLocationManagerDelegate> +@interface MGLMetricsLocationManager : NSObject -+ (id)sharedManager; - -- (BOOL) isAuthorizedStatusDetermined; -- (void) requestAlwaysAuthorization; - -- (void) startUpdatingLocation; -- (void) stopUpdatingLocation; +// This method can be called from any thread. +// ++ (instancetype)sharedManager; @end |