Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: ios/chrome/common/physical_web/physical_web_scanner.h

Issue 2023833002: [iOS] Upstream physical web classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about limiting the dependencies Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_
6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_
7
8 #import <Foundation/Foundation.h>
9
10 @class PhysicalWebDevice;
11
12 @protocol PhysicalWebScannerDelegate;
13
14 // This class will scan for physical web devices.
15
16 @interface PhysicalWebScanner : NSObject
17
18 // When networkRequest is NO, no network request will be sent.
19 @property(nonatomic, assign) BOOL networkRequestEnabled;
20
21 // When networkRequest is NO, it returns the number of discovered beacons.
22 @property(nonatomic, readonly) int unresolvedBeaconsCount;
23
24 // Whether bluetooth is enabled. Must not be read before the first call of
25 // scannerBluetoothStatusUpdated.
26 @property(nonatomic, readonly) BOOL bluetoothEnabled;
27
28 // Initializes a physical web device scanner.
29 - (instancetype)initWithDelegate:(id<PhysicalWebScannerDelegate>)delegate
30 NS_DESIGNATED_INITIALIZER;
31
32 - (instancetype)init NS_UNAVAILABLE;
33
34 // Start scanning and clear the list of discovered devices. The scanning might
35 // not start effectively immediately.
36 // It can happen when the bluetooth is turned off. In this case, scanning will
37 // start as soon as the bluetooth is turned on.
38 - (void)start;
39
40 // Stop scanning.
41 - (void)stop;
42
43 // Returns a list of physical web devices (PhysicalWebDevice).
44 - (NSArray*)devices;
45
46 @end
47
48 @protocol PhysicalWebScannerDelegate<NSObject>
49
50 // This delegate method is called when the list of discovered devices is updated
51 // by the scanner.
52 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner;
53
54 // This delegate method is called when the bluetooth status is updated.
55 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner;
56
57 @end
58
59 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_
OLDNEW
« no previous file with comments | « ios/chrome/common/physical_web/physical_web_request.mm ('k') | ios/chrome/common/physical_web/physical_web_scanner.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698