OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 5 #ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class ListValue; | 13 class ListValue; |
14 } | 14 } |
15 | 15 |
16 @protocol PhysicalWebScannerDelegate; | 16 @protocol PhysicalWebScannerDelegate; |
17 | 17 |
18 // This class will scan for physical web devices. | 18 // This class will scan for physical web devices. |
19 | 19 |
20 @interface PhysicalWebScanner : NSObject | 20 @interface PhysicalWebScanner : NSObject |
21 | 21 |
| 22 // When onLostDetectionEnabled is YES, the delegate will be notified if a URL |
| 23 // that was previously nearby is no longer detected. Changing this value while |
| 24 // scanning is active will reset the list of nearby URLs. |
| 25 @property(nonatomic, assign) BOOL onLostDetectionEnabled; |
| 26 |
22 // When networkRequest is NO, no network request will be sent. | 27 // When networkRequest is NO, no network request will be sent. |
23 @property(nonatomic, assign) BOOL networkRequestEnabled; | 28 @property(nonatomic, assign) BOOL networkRequestEnabled; |
24 | 29 |
25 // When networkRequest is NO, it returns the number of discovered beacons. | 30 // When networkRequest is NO, it returns the number of discovered beacons. |
26 @property(nonatomic, readonly) int unresolvedBeaconsCount; | 31 @property(nonatomic, readonly) int unresolvedBeaconsCount; |
27 | 32 |
28 // Whether bluetooth is enabled. Must not be read before the first call of | 33 // Whether bluetooth is enabled. Must not be read before the first call of |
29 // scannerBluetoothStatusUpdated. | 34 // scannerBluetoothStatusUpdated. |
30 @property(nonatomic, readonly) BOOL bluetoothEnabled; | 35 @property(nonatomic, readonly) BOOL bluetoothEnabled; |
31 | 36 |
(...skipping 27 matching lines...) Expand all Loading... |
59 // This delegate method is called when the list of discovered devices is updated | 64 // This delegate method is called when the list of discovered devices is updated |
60 // by the scanner. | 65 // by the scanner. |
61 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; | 66 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; |
62 | 67 |
63 // This delegate method is called when the bluetooth status is updated. | 68 // This delegate method is called when the bluetooth status is updated. |
64 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; | 69 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; |
65 | 70 |
66 @end | 71 @end |
67 | 72 |
68 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 73 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
OLD | NEW |