#import #import typedef enum { NotReachable = 0, ReachableViaWiFi, ReachableViaWWAN } NetworkStatus; #define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification" @interface Reachability: NSObject { BOOL localWiFiRef; SCNetworkReachabilityRef reachabilityRef; } + (Reachability*) reachabilityWithHostName: (NSString*) hostName; + (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress; + (Reachability*) reachabilityForInternetConnection; + (Reachability*) reachabilityForLocalWiFi; - (BOOL) startNotifier; - (void) stopNotifier; - (NetworkStatus) currentReachabilityStatus; //WWAN may be available, but not active until a connection has been established. //WiFi may require a connection for VPN on Demand. - (BOOL) connectionRequired; @end