summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-05-26 11:13:08 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-05-26 11:13:08 +0200
commitf11a9f8fd9f4a53195168518f6ef1efe782f1cf8 (patch)
tree5ad9a28dd9d4b12a7bf1f29ce119f21ac02ca041 /platform
parentba3a6ea2b0ab60ac66db0add9f98a042c8c62477 (diff)
downloadqtlocation-mapboxgl-f11a9f8fd9f4a53195168518f6ef1efe782f1cf8.tar.gz
prefix Reachability with "MGL" to avoid linking conflicts and app store rejections
Diffstat (limited to 'platform')
-rw-r--r--platform/darwin/reachability.m10
-rw-r--r--platform/ios/MGLMapView.mm4
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/darwin/reachability.m b/platform/darwin/reachability.m
index b0818b8838..d1413321b7 100644
--- a/platform/darwin/reachability.m
+++ b/platform/darwin/reachability.m
@@ -25,7 +25,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-#import "Reachability.h"
+#import <mbgl/platform/darwin/reachability.h>
#import <sys/socket.h>
#import <netinet/in.h>
@@ -38,7 +38,7 @@
NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";
-@interface Reachability ()
+@interface MGLReachability ()
@property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef;
@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue;
@@ -73,7 +73,7 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
{
#pragma unused (target)
- Reachability *reachability = ((__bridge Reachability*)info);
+ MGLReachability *reachability = ((__bridge MGLReachability*)info);
// We probably don't need an autoreleasepool here, as GCD docs state each queue has its own autorelease pool,
// but what the heck eh?
@@ -84,13 +84,13 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
}
-@implementation Reachability
+@implementation MGLReachability
#pragma mark - Class Constructor Methods
+(instancetype)reachabilityWithHostName:(NSString*)hostname
{
- return [Reachability reachabilityWithHostname:hostname];
+ return [MGLReachability reachabilityWithHostname:hostname];
}
+(instancetype)reachabilityWithHostname:(NSString*)hostname
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index a0ec6774d7..bdbfbd0722 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -270,7 +270,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
name:kReachabilityChangedNotification
object:nil];
- Reachability* reachability = [Reachability reachabilityForInternetConnection];
+ MGLReachability* reachability = [MGLReachability reachabilityForInternetConnection];
[reachability startNotifier];
// setup annotations
@@ -399,7 +399,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
-(void)reachabilityChanged:(NSNotification*)notification
{
- Reachability *reachability = [notification object];
+ MGLReachability *reachability = [notification object];
if ([reachability isReachable]) {
mbgl::NetworkStatus::Reachable();
}