old mode 100755
new mode 100644
|  |  |  | 
|---|
|  |  |  | // AFNetworkReachabilityManager.h | 
|---|
|  |  |  | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) | 
|---|
|  |  |  | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // Permission is hereby granted, free of charge, to any person obtaining a copy | 
|---|
|  |  |  | // of this software and associated documentation files (the "Software"), to deal | 
|---|
|  |  |  | 
|---|
|  |  |  | #if !TARGET_OS_WATCH | 
|---|
|  |  |  | #import <SystemConfiguration/SystemConfiguration.h> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #ifndef NS_DESIGNATED_INITIALIZER | 
|---|
|  |  |  | #if __has_attribute(objc_designated_initializer) | 
|---|
|  |  |  | #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | 
|---|
|  |  |  | #else | 
|---|
|  |  |  | #define NS_DESIGNATED_INITIALIZER | 
|---|
|  |  |  | #endif | 
|---|
|  |  |  | #endif | 
|---|
|  |  |  |  | 
|---|
|  |  |  | typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { | 
|---|
|  |  |  | AFNetworkReachabilityStatusUnknown          = -1, | 
|---|
|  |  |  | AFNetworkReachabilityStatusNotReachable     = 0, | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/) | 
|---|
|  |  |  | See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ ) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | + (instancetype)sharedManager; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | Creates and returns a network reachability manager with the default socket address. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @return An initialized network reachability manager, actively monitoring the default socket address. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | + (instancetype)manager; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | Creates and returns a network reachability manager for the specified domain. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @param domain The domain used to evaluate network reachability. | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | Creates and returns a network reachability manager for the socket address. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @param address The socket address (`sockaddr_in`) used to evaluate network reachability. | 
|---|
|  |  |  | @param address The socket address (`sockaddr_in6`) used to evaluate network reachability. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @return An initialized network reachability manager, actively monitoring the specified socket address. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | @return An initialized network reachability manager, actively monitoring the specified reachability. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *  Unavailable initializer | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | + (instancetype)new NS_UNAVAILABLE; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *  Unavailable initializer | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | - (instancetype)init NS_UNAVAILABLE; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ///-------------------------------------------------- | 
|---|
|  |  |  | /// @name Starting & Stopping Reachability Monitoring | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`). | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | extern NSString * const AFNetworkingReachabilityDidChangeNotification; | 
|---|
|  |  |  | extern NSString * const AFNetworkingReachabilityNotificationStatusItem; | 
|---|
|  |  |  | FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification; | 
|---|
|  |  |  | FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ///-------------------- | 
|---|
|  |  |  | /// @name Functions | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | Returns a localized string representation of an `AFNetworkReachabilityStatus` value. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | extern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); | 
|---|
|  |  |  | FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | NS_ASSUME_NONNULL_END | 
|---|
|  |  |  | #endif | 
|---|