-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLocator.h
More file actions
executable file
·69 lines (44 loc) · 1.46 KB
/
Locator.h
File metadata and controls
executable file
·69 lines (44 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// Locator.h
// Scvngr
//
// Created by cclaan on 4/27/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>
// This protocol is used to send the text for location updates back to another view controller
@protocol LocatorDelegate <NSObject>
@required
-(void) locationTimedOut;
-(void) newLocationUpdate:(CLLocation*)loc;
-(void) newError:(NSString *)text;
@end
@interface Locator : NSObject < CLLocationManagerDelegate >{
CLLocationManager *locationManager;
CLLocation * location;
id <LocatorDelegate> delegate;
NSString * latString;
NSString * lonString;
BOOL hasReceivedLocation;
BOOL hasReceivedError;
float currentDesiredAccuracy;
NSTimer * timeoutTimer;
NSDate * updatesBeganDate;
}
@property float currentDesiredAccuracy;
@property (readwrite) BOOL hasReceivedLocation;
@property (readwrite) BOOL hasReceivedError;
@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic,assign) id delegate;
@property (nonatomic, retain) CLLocation * location;
@property (nonatomic, retain) NSString * latString;
@property (nonatomic, retain) NSString * lonString;
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation;
- (void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSError *)error;
-(void) start;
+ (Locator *)instance;
@end