OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 BASE_IOS_DEVICE_UTIL_H_ | |
6 #define BASE_IOS_DEVICE_UTIL_H_ | |
7 | |
8 #include <string> | |
9 | |
10 namespace ios { | |
11 namespace device_util { | |
stuartmorgan
2012/07/24 13:38:49
Add a blank line after this.
Chen Yu
2012/07/24 14:34:20
Done.
| |
12 // This methods returns the hardware version of the device the app is running | |
13 // on. | |
14 // Possible (known) values are: | |
stuartmorgan
2012/07/24 13:38:49
s/are/include/ since we know this list isn't exhau
Chen Yu
2012/07/24 14:34:20
Done.
| |
15 // iPhone1,1 -> iPhone 1G | |
16 // iPhone1,2 -> iPhone 3G | |
17 // iPhone2,1 -> iPhone 3GS | |
18 // iPhone3,1 -> iPhone 4/AT&T | |
19 // iPhone3,2 -> iPhone 4/Other Carrier? | |
20 // iPhone3,3 -> iPhone 4/Other Carrier? | |
21 // iPhone4,1 -> ??iPhone 5 | |
22 // | |
23 // iPod1,1 -> iPod touch 1G | |
24 // iPod2,1 -> iPod touch 2G | |
25 // iPod2,2 -> ??iPod touch 2.5G | |
26 // iPod3,1 -> iPod touch 3G | |
27 // iPod4,1 -> iPod touch 4G | |
28 // iPod5,1 -> ??iPod touch 5G | |
29 // | |
30 // iPad1,1 -> iPad 1G, WiFi | |
31 // iPad1,? -> iPad 1G, 3G <- needs 3G owner to test | |
32 // iPad2,1 -> iPad 2G (iProd 2,1) | |
33 // | |
34 // AppleTV2,1 -> AppleTV 2 | |
35 // | |
36 // (The returned string is the string returned by sysctlbyname() with name | |
37 // "hw.machine".) | |
38 std::string platform(); | |
stuartmorgan
2012/07/24 13:38:49
All of these methods need to be converted to Funct
Chen Yu
2012/07/24 14:34:20
Done.
| |
39 | |
40 // Returns if the application is running on a high-ram device. (>=250M). | |
stuartmorgan
2012/07/24 13:38:49
s/if/true if/
Chen Yu
2012/07/24 14:34:20
Done.
| |
41 bool isRunningOnHighRamDevice(); | |
42 | |
43 // Some features are restricted on supported single core devices. "iPhone2,1" is | |
44 // an iPhone 3GS, "iPad1,1" is an iPad 1, and "iPhone3,1" is an iPhone 4. | |
stuartmorgan
2012/07/24 13:38:49
Replace this whole comment with "Returns true if t
Chen Yu
2012/07/24 14:34:20
Done.
| |
45 bool isSingleCoreDevice(); | |
46 | |
47 // Returns the first mac address. | |
stuartmorgan
2012/07/24 13:38:49
MAC address
Chen Yu
2012/07/24 14:34:20
Done.
| |
48 std::string macAddress(std::string ifName); | |
49 | |
50 // Returns a random UUID. | |
51 std::string randomId(); | |
52 | |
53 // Returns an identifier for the device, using the given |salt|. A global | |
54 // identifier is generated the first time this method is called, and the salt | |
55 // is used to be able to generate distinct identifiers for the same device. If | |
56 // |salt| is NULL, a default value is used. Unless you are using this value for | |
57 // something that should be anonymous, you should probably pass NULL. | |
58 std::string deviceIdentifier(const char* const salt); | |
59 | |
60 } // namespace device_util | |
61 } // namespace ios | |
62 | |
63 #endif // BASE_IOS_DEVICE_UTIL_H_ | |
OLD | NEW |