topical media & game development

talk show tell print

#mobile-application-10-DerbyApp-build-iphone-Classes-GeolocationModule.h / h



  
Appcelerator Titanium Mobile Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved. Licensed under the terms of the Apache Public License Please see the LICENSE included with this distribution for details. WARNING: This is generated code. Modify at your own risk and without support.

  
  #import <TiModule.h>
  
  ifdef USE_TI_GEOLOCATION
  
  #import <CoreLocation/CoreLocation.h>
  
  @interface GeolocationModule : TiModule<CLLocationManagerDelegate> {
          CLLocationManager *locationManager;
          CLLocationManager *tempManager; // Our 'fakey' manager for handling certain <=3.2 requests
          
          CLLocationAccuracy accuracy;
          CLLocationDistance distance;
          CLLocationDegrees heading;
          BOOL calibration;
          NSMutableArray *singleHeading;
          NSMutableArray *singleLocation;
          NSString *purpose;
          BOOL trackingHeading;
          BOOL trackingLocation;
          
          NSRecursiveLock* lock;
  }
  
  @property(nonatomic,readonly,getter=hasCompass) NSNumber *compass;
  @property(nonatomic,readwrite,assign) NSNumber *accuracy;
  @property(nonatomic,readwrite,assign) NSNumber *highAccuracy;
  @property(nonatomic,readwrite,assign) NSNumber *showCalibration;
  @property(nonatomic,readwrite,assign) NSNumber *distanceFilter;
  @property(nonatomic,readwrite,assign) NSNumber *headingFilter;
  @property(nonatomic,readonly) NSNumber *locationServicesEnabled;
  @property(nonatomic,readonly) NSNumber* locationServicesAuthorization;
  
  // Error codes
  @property(nonatomic, readonly) NSNumber* ERROR_LOCATION_UNKNOWN;
  @property(nonatomic, readonly) NSNumber* ERROR_DENIED;
  @property(nonatomic, readonly) NSNumber* ERROR_NETWORK;
  @property(nonatomic, readonly) NSNumber* ERROR_HEADING_FAILURE;
  // iOS 4.0+ only
  if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
  @property(nonatomic, readonly) NSNumber* ERROR_REGION_MONITORING_DENIED;
  @property(nonatomic, readonly) NSNumber* ERROR_REGION_MONITORING_FAILURE;
  @property(nonatomic, readonly) NSNumber* ERROR_REGION_MONITORING_DELAYED;
  endif
  
  // the reason for using Location services - now required in 3.2+
  if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
  @property(nonatomic,readwrite,assign) NSString *purpose;
  endif
  
  @property(nonatomic,readonly) NSNumber *ACCURACY_BEST;
  @property(nonatomic,readonly) NSNumber *ACCURACY_NEAREST_TEN_METERS;
  @property(nonatomic,readonly) NSNumber *ACCURACY_HUNDRED_METERS;
  @property(nonatomic,readonly) NSNumber *ACCURACY_KILOMETER;
  @property(nonatomic,readonly) NSNumber *ACCURACY_THREE_KILOMETERS;
  
  // Authorization to use location, 4.2+ only
  if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_2
  @property(nonatomic,readonly) NSNumber* AUTHORIZATION_AUTHORIZED;
  @property(nonatomic,readonly) NSNumber* AUTHORIZATION_DENIED;
  @property(nonatomic,readonly) NSNumber* AUTHORIZATION_RESTRICTED;
  endif
  @property(nonatomic,readonly) NSNumber* AUTHORIZATION_UNKNOWN; // We still need the 'authorization unknown' constant, though.
  
  @end
  
  endif


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.