/* * CLLocationManagerDelegate.h * CoreLocation * * Copyright (c) 2008-2010 Apple Inc. All rights reserved. * */ #import #import #import @class CLLocation; @class CLHeading; @class CLRegion; /* * CLLocationManagerDelegate * * Discussion: * Delegate for CLLocationManager. */ @protocol CLLocationManagerDelegate @optional /* * locationManager:didUpdateToLocation:fromLocation: * * Discussion: * Invoked when a new location is available. oldLocation may be nil if there is no previous location * available. */ - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation; /* * locationManager:didUpdateHeading: * * Discussion: * Invoked when a new heading is available. */ - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); /* * locationManager:shouldDisplayHeadingCalibrationForDuration: * * Discussion: * Invoked when a new heading is available. Return YES to display heading calibration info. The display * will remain until heading is calibrated, unless dismissed early via dismissHeadingCalibrationDisplay. */ - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); /* * locationManager:didEnterRegion: * * Discussion: * Invoked when the user enters a monitored region. This callback will be invoked for every allocated * CLLocationManager instance with a non-nil delegate that implements this method. */ - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); /* * locationManager:didExitRegion: * * Discussion: * Invoked when the user exits a monitored region. This callback will be invoked for every allocated * CLLocationManager instance with a non-nil delegate that implements this method. */ - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); /* * locationManager:didFailWithError: * * Discussion: * Invoked when an error has occurred. Error types are defined in "CLError.h". */ - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error; /* * locationManager:monitoringDidFailForRegion:withError: * * Discussion: * Invoked when a region monitoring error has occurred. Error types are defined in "CLError.h". */ - (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); /* * locationManager:didChangeAuthorizationStatus: * * Discussion: * Invoked when the authorization status changes for this application. */ - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_2); /* * locationManager:didStartMonitoringForRegion: * * Discussion: * Invoked when a monitoring for a region started successfully. */ - (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); @end