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

Unified Diff: ios/chrome/common/physical_web/physical_web_device.h

Issue 2023833002: [iOS] Upstream physical web classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/common/physical_web/physical_web_device.h
diff --git a/ios/chrome/common/physical_web/physical_web_device.h b/ios/chrome/common/physical_web/physical_web_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..b54d5de16f960c5f4464c8411e4327268413aff3
--- /dev/null
+++ b/ios/chrome/common/physical_web/physical_web_device.h
@@ -0,0 +1,52 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_DEVICE_H_
+#define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_DEVICE_H_
+
+#import <Foundation/Foundation.h>
+
+@interface PhysicalWebDevice : NSObject
+
+// Initializes a physical web device. See below for the description of the
+// properties.
+- (instancetype)initWithURL:(NSURL*)url
+ requestURL:(NSURL*)requestURL
+ icon:(NSURL*)icon
+ title:(NSString*)title
+ description:(NSString*)description
+ transmitPower:(int)transmitPower
+ rssi:(int)rssi
+ rank:(double)rank NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// |url| is the expanded URL.
+@property(nonatomic, readonly, retain) NSURL* url;
+
+// |requestUrl| is the broadcast URL.
+@property(nonatomic, readonly, retain) NSURL* requestURL;
+
+// |icon| is the URL of the favicon.
+@property(nonatomic, readonly, retain) NSURL* icon;
+
+// |title| is the title of the webpage.
+@property(nonatomic, readonly, retain) NSString* title;
+
+// |description| is a short text description of the webpage content.
+@property(nonatomic, readonly, retain) NSString* description;
+
+// |transmitPower| is the UriBeacon Tx Power Level.
+@property(nonatomic, readonly) int transmitPower;
+
+// |rssi| is the received signal strength indicator (RSSI) of the peripheral, in
+// decibels.
+@property(nonatomic, readonly) int rssi;
+
+// |rank| of the physical web device returned by the server.
+@property(nonatomic, readonly) double rank;
+
+@end
+
+#endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_DEVICE_H_

Powered by Google App Engine
This is Rietveld 408576698