单军华
2018-05-04 25f409185a53e5e7beb17518a684298d92d31b3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
//  MCWiFiManager.h
//  MCDownloadManager
//
//  Created by 马超 on 16/9/14.
//  Copyright © 2016年 qikeyun. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
NS_ASSUME_NONNULL_BEGIN
 
@interface MCWiFi : NSObject
@property (nonatomic, copy, readonly, nullable)NSString *wifiName;
@property (nonatomic, copy, readonly, nullable)NSString *wifiBSSID;
 
- (instancetype)initWithName:(NSString *)name BSSID:(NSString *)bssid;
@end
 
 
@interface MCWiFiManager : NSObject
 
/**
 The shared default instance of `MCWiFiManager` initialized with default values.
 */
+ (instancetype)defaultInstance;
 
/**
 Default initializer
 
 @return An instance of `MCWiFiManager` initialized with default values.
 */
- (instancetype)init;
 
 
- (void)scanNetworksWithCompletionHandler:(void(^_Nullable)(NSArray <MCWiFi *>* _Nullable networks, MCWiFi *_Nullable currentWiFi, NSError *_Nullable error))handler;
 
 
- (NSString *)getGatewayIpForCurrentWiFi;
 
/**
 *  Get the local info for currentWifi except for GatewayIp
 *
 *  @return NSDictionary
 *  {
     broadcast = "192.168.8.233";
     interface = en0;
     localIp = "192.168.5.140";
     netmask = "255.255.255.0";
     }
 */
- (NSDictionary *)getLocalInfoForCurrentWiFi;
@end
 
NS_ASSUME_NONNULL_END