OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ | 11 #ifndef WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ |
12 #define WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ | 12 #define WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ |
13 | 13 |
14 #if defined(WEBRTC_IOS) | 14 #if defined(WEBRTC_IOS) |
15 | 15 |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 namespace ios { | 19 namespace ios { |
20 | 20 |
21 bool CheckAndLogError(BOOL success, NSError* error); | 21 bool CheckAndLogError(BOOL success, NSError* error); |
22 | 22 |
| 23 std::string StdStringFromNSString(NSString* nsString); |
| 24 |
23 // Return thread ID as a string. | 25 // Return thread ID as a string. |
24 std::string GetThreadId(); | 26 std::string GetThreadId(); |
25 | 27 |
26 // Return thread ID as string suitable for debug logging. | 28 // Return thread ID as string suitable for debug logging. |
27 std::string GetThreadInfo(); | 29 std::string GetThreadInfo(); |
28 | 30 |
29 // Returns [NSThread currentThread] description as string. | 31 // Returns [NSThread currentThread] description as string. |
30 // Example: <NSThread: 0x170066d80>{number = 1, name = main} | 32 // Example: <NSThread: 0x170066d80>{number = 1, name = main} |
31 std::string GetCurrentThreadDescription(); | 33 std::string GetCurrentThreadDescription(); |
32 | 34 |
| 35 std::string GetAudioSessionCategory(); |
| 36 |
33 // Returns the current name of the operating system. | 37 // Returns the current name of the operating system. |
34 std::string GetSystemName(); | 38 std::string GetSystemName(); |
35 | 39 |
36 // Returns the current version of the operating system. | 40 // Returns the current version of the operating system. |
37 std::string GetSystemVersion(); | 41 std::string GetSystemVersion(); |
38 | 42 |
39 // Returns the version of the operating system as a floating point value. | 43 // Returns the version of the operating system as a floating point value. |
40 float GetSystemVersionAsFloat(); | 44 float GetSystemVersionAsFloat(); |
41 | 45 |
42 // Returns the device type. | 46 // Returns the device type. |
43 // Examples: ”iPhone” and ”iPod touch”. | 47 // Examples: ”iPhone” and ”iPod touch”. |
44 std::string GetDeviceType(); | 48 std::string GetDeviceType(); |
45 | 49 |
46 // Returns a more detailed device name. | 50 // Returns a more detailed device name. |
47 // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". | 51 // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". |
48 std::string GetDeviceName(); | 52 std::string GetDeviceName(); |
49 | 53 |
50 } // namespace ios | 54 } // namespace ios |
51 } // namespace webrtc | 55 } // namespace webrtc |
52 | 56 |
53 #endif // defined(WEBRTC_IOS) | 57 #endif // defined(WEBRTC_IOS) |
54 | 58 |
55 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ | 59 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_HELPERS_IOS_H_ |
OLD | NEW |