2016-07-28 14:52:55 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-08-30 09:30:29 +02:00
|
|
|
#import "UIDevice+RTCDevice.h"
|
2016-07-28 14:52:55 -07:00
|
|
|
|
2017-10-05 13:18:14 +02:00
|
|
|
#import <sys/utsname.h>
|
2018-08-30 09:30:29 +02:00
|
|
|
#include <memory>
|
2016-07-28 14:52:55 -07:00
|
|
|
|
|
|
|
|
@implementation UIDevice (RTCDevice)
|
|
|
|
|
|
2017-10-05 13:18:14 +02:00
|
|
|
+ (NSString *)machineName {
|
|
|
|
|
struct utsname systemInfo;
|
|
|
|
|
uname(&systemInfo);
|
|
|
|
|
return [[NSString alloc] initWithCString:systemInfo.machine
|
|
|
|
|
encoding:NSUTF8StringEncoding];
|
2016-07-28 14:52:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|