Revision 2, 1.0 KB
(checked in by jon, 16 years ago)
|
Initial commit of skeletal project.
|
Line | |
---|
1 | // |
---|
2 | // AIHostReachabilityMonitor.h |
---|
3 | // AIUtilities.framework |
---|
4 | // |
---|
5 | // Created by Mac-arena the Bored Zo on 2005-02-11. |
---|
6 | // |
---|
7 | |
---|
8 | #import <Cocoa/Cocoa.h> |
---|
9 | |
---|
10 | @class AIHostReachabilityMonitor; |
---|
11 | |
---|
12 | @protocol AIHostReachabilityObserver <NSObject> |
---|
13 | |
---|
14 | - (void)hostReachabilityMonitor:(AIHostReachabilityMonitor *)monitor hostIsReachable:(NSString *)host; |
---|
15 | - (void)hostReachabilityMonitor:(AIHostReachabilityMonitor *)monitor hostIsNotReachable:(NSString *)host; |
---|
16 | |
---|
17 | @end |
---|
18 | |
---|
19 | @interface AIHostReachabilityMonitor: NSObject |
---|
20 | { |
---|
21 | NSMutableArray *hosts; |
---|
22 | NSMutableArray *observers; |
---|
23 | NSMutableArray *reachabilities; |
---|
24 | |
---|
25 | NSMutableSet *unconfiguredHostsAndObservers; |
---|
26 | |
---|
27 | NSLock *hostAndObserverListLock; |
---|
28 | |
---|
29 | CFRunLoopSourceRef ipChangesRunLoopSourceRef; |
---|
30 | } |
---|
31 | |
---|
32 | |
---|
33 | + (id)defaultMonitor; |
---|
34 | |
---|
35 | #pragma mark - |
---|
36 | |
---|
37 | - (void)addObserver:(id <AIHostReachabilityObserver>)newObserver forHost:(NSString *)host; |
---|
38 | - (void)removeObserver:(id <AIHostReachabilityObserver>)observer forHost:(NSString *)host; |
---|
39 | - (BOOL)observer:(id)observer isObservingHost:(NSString *)host; |
---|
40 | |
---|
41 | @end |
---|