1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | #import <Foundation/Foundation.h>
|
9 | #import <SystemConfiguration/SystemConfiguration.h>
|
10 |
|
11 | NS_ASSUME_NONNULL_BEGIN
|
12 |
|
13 |
|
14 |
|
15 | static NSString *const RNCConnectionTypeUnknown = @"unknown";
|
16 | static NSString *const RNCConnectionTypeNone = @"none";
|
17 | static NSString *const RNCConnectionTypeWifi = @"wifi";
|
18 | static NSString *const RNCConnectionTypeCellular = @"cellular";
|
19 | static NSString *const RNCConnectionTypeEthernet = @"ethernet";
|
20 |
|
21 |
|
22 |
|
23 | static NSString *const RNCCellularGeneration2g = @"2g";
|
24 | static NSString *const RNCCellularGeneration3g = @"3g";
|
25 | static NSString *const RNCCellularGeneration4g = @"4g";
|
26 | static NSString *const RNCCellularGeneration5g = @"5g";
|
27 |
|
28 | @interface RNCConnectionState : NSObject
|
29 |
|
30 | - (instancetype)init;
|
31 | - (instancetype)initWithReachabilityFlags:(SCNetworkReachabilityFlags)flags;
|
32 | - (BOOL)isEqualToConnectionState:(RNCConnectionState *)otherState;
|
33 |
|
34 | @property (nonatomic, strong, readonly) NSString *type;
|
35 | @property (nullable, nonatomic, strong, readonly) NSString *cellularGeneration;
|
36 | @property (nonatomic, readonly) BOOL connected;
|
37 | @property (nonatomic, readonly) BOOL expensive;
|
38 |
|
39 | @end
|
40 |
|
41 | NS_ASSUME_NONNULL_END
|