UIDevice-Reachability.h 726 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // UIDevice-Reachability.h
  3. // CpcProject
  4. //
  5. // Created by by Jason Lee on 13. 6. 28..
  6. // Copyright (c) jasondevelop. All rights reserved.
  7. //
  8. @import UIKit;
  9. #define SUPPORTS_UNDOCUMENTED_API 1
  10. @protocol ReachabilityWatcher <NSObject>
  11. - (void) reachabilityChanged;
  12. @end
  13. @interface UIDevice (Reachability)
  14. + (BOOL) scheduleReachabilityWatcher: (id) watcher;
  15. + (void) unscheduleReachabilityWatcher;
  16. + (NSString *) localWiFiIPAddress;
  17. + (BOOL) networkAvailable;
  18. + (BOOL) activeWWAN;
  19. + (BOOL) activeWLAN;
  20. #ifdef SUPPORTS_UNDOCUMENTED_API
  21. // Don't use this code in real life, boys and girls. It is not App Store friendly.
  22. // It is, however, really nice for testing callbacks
  23. + (void) setAPMode: (BOOL) yorn;
  24. #endif
  25. @end