(iOS/OSX) Stub location functions

This commit is contained in:
twinaphex 2013-12-15 18:11:21 +01:00
parent 432c0be30f
commit 99db8ca731
1 changed files with 32 additions and 0 deletions

View File

@ -20,6 +20,10 @@
#include "gfx/gfx_common.h" #include "gfx/gfx_common.h"
#include "gfx/gfx_context.h" #include "gfx/gfx_context.h"
#include <CoreLocation/CoreLocation.h>
static CLLocationManager *locationManager;
// Define compatibility symbols and categories // Define compatibility symbols and categories
#ifdef IOS #ifdef IOS
#include <AVFoundation/AVCaptureSession.h> #include <AVFoundation/AVCaptureSession.h>
@ -308,6 +312,34 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
} }
#endif #endif
- (void)onLocationInit
{
// Create the location manager if this object does not
// already have one.
if (nil == locationManager)
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
// Set a movement threshold for new events.
locationManager.distanceFilter = 500; // meters - TODO - make configurable
}
- (void)onLocationStart
{
[locationManager startUpdatingLocation];
}
- (void)onLocationStop
{
[locationManager stopUpdatingLocation];
}
- (void)onLocationFree
{
}
@end @end
static RAScreen* get_chosen_screen() static RAScreen* get_chosen_screen()