| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ | |
| 12 #define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ | |
| 13 | |
| 14 #if defined(WEBRTC_IOS) | |
| 15 | |
| 16 #include <string> | |
| 17 | |
| 18 namespace webrtc { | |
| 19 namespace ios { | |
| 20 | |
| 21 bool CheckAndLogError(BOOL success, NSError* error); | |
| 22 | |
| 23 NSString *NSStringFromStdString(const std::string& stdString); | |
| 24 std::string StdStringFromNSString(NSString* nsString); | |
| 25 | |
| 26 // Return thread ID as a string. | |
| 27 std::string GetThreadId(); | |
| 28 | |
| 29 // Return thread ID as string suitable for debug logging. | |
| 30 std::string GetThreadInfo(); | |
| 31 | |
| 32 // Returns [NSThread currentThread] description as string. | |
| 33 // Example: <NSThread: 0x170066d80>{number = 1, name = main} | |
| 34 std::string GetCurrentThreadDescription(); | |
| 35 | |
| 36 std::string GetAudioSessionCategory(); | |
| 37 | |
| 38 // Returns the current name of the operating system. | |
| 39 std::string GetSystemName(); | |
| 40 | |
| 41 // Returns the current version of the operating system as a string. | |
| 42 std::string GetSystemVersionAsString(); | |
| 43 | |
| 44 // Returns the version of the operating system in double representation. | |
| 45 // Uses a cached value of the system version. | |
| 46 double GetSystemVersion(); | |
| 47 | |
| 48 // Returns the device type. | |
| 49 // Examples: ”iPhone” and ”iPod touch”. | |
| 50 std::string GetDeviceType(); | |
| 51 | |
| 52 // Returns a more detailed device name. | |
| 53 // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". | |
| 54 std::string GetDeviceName(); | |
| 55 | |
| 56 // Returns the name of the process. Does not uniquely identify the process. | |
| 57 std::string GetProcessName(); | |
| 58 | |
| 59 // Returns the identifier of the process (often called process ID). | |
| 60 int GetProcessID(); | |
| 61 | |
| 62 // Returns a string containing the version of the operating system on which the | |
| 63 // process is executing. The string is string is human readable, localized, and | |
| 64 // is appropriate for displaying to the user. | |
| 65 std::string GetOSVersionString(); | |
| 66 | |
| 67 // Returns the number of processing cores available on the device. | |
| 68 int GetProcessorCount(); | |
| 69 | |
| 70 // Indicates whether Low Power Mode is enabled on the iOS device. | |
| 71 bool GetLowPowerModeEnabled(); | |
| 72 | |
| 73 } // namespace ios | |
| 74 } // namespace webrtc | |
| 75 | |
| 76 #endif // defined(WEBRTC_IOS) | |
| 77 | |
| 78 #endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_ | |
| OLD | NEW |