Chromium Code Reviews| 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 #include "components/physical_web/data_source/physical_web_data_source.h" | |
|
Olivier
2017/01/12 08:47:46
Can you forward declare needed classes?
| |
| 13 | |
| 12 namespace base { | 14 namespace base { |
| 13 class ListValue; | 15 class ListValue; |
| 14 } | 16 } |
| 15 | 17 |
| 16 @protocol PhysicalWebScannerDelegate; | 18 @protocol PhysicalWebScannerDelegate; |
| 17 | 19 |
| 18 // This class will scan for physical web devices. | 20 // This class will scan for physical web devices. |
| 19 | 21 |
| 20 @interface PhysicalWebScanner : NSObject | 22 @interface PhysicalWebScanner : NSObject |
| 21 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 50 - (void)stop; | 52 - (void)stop; |
| 51 | 53 |
| 52 // Returns a list of physical web devices (PhysicalWebDevice). | 54 // Returns a list of physical web devices (PhysicalWebDevice). |
| 53 - (NSArray*)devices; | 55 - (NSArray*)devices; |
| 54 | 56 |
| 55 // Returns the metadata for all resolved physical web URLs. The returned value | 57 // Returns the metadata for all resolved physical web URLs. The returned value |
| 56 // will never be nil; if no metadata has been received then an empty list is | 58 // will never be nil; if no metadata has been received then an empty list is |
| 57 // returned. | 59 // returned. |
| 58 - (std::unique_ptr<base::ListValue>)metadata; | 60 - (std::unique_ptr<base::ListValue>)metadata; |
| 59 | 61 |
| 62 // Returns the metadata for all resolved physical web URLs. The returned value | |
| 63 // will never be nil; if no metadata has been received then an empty list is | |
| 64 // returned. | |
| 65 - (std::unique_ptr<physical_web::MetadataList>)metadataList; | |
| 66 | |
| 60 @end | 67 @end |
| 61 | 68 |
| 62 @protocol PhysicalWebScannerDelegate<NSObject> | 69 @protocol PhysicalWebScannerDelegate<NSObject> |
| 63 | 70 |
| 64 // This delegate method is called when the list of discovered devices is updated | 71 // This delegate method is called when the list of discovered devices is updated |
| 65 // by the scanner. | 72 // by the scanner. |
| 66 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; | 73 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; |
| 67 | 74 |
| 68 // This delegate method is called when the bluetooth status is updated. | 75 // This delegate method is called when the bluetooth status is updated. |
| 69 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; | 76 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; |
| 70 | 77 |
| 71 @end | 78 @end |
| 72 | 79 |
| 73 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 80 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
| OLD | NEW |