/*
 Erica Sadun, http://ericasadun.com
 iPhone Developer's Cookbook, 6.x Edition
 BSD License, Use at your own risk
 */
// 2015/09/05 AIG-Soft
// ここにある最新版に対し、古いバージョンの内容を追加したもの
// https://github.com/erichoracek/UIDevice-Hardware/blob/master/UIDevice-Hardware.m

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, UIDeviceFamily) {
	UIDeviceFamilyiPhone,
    UIDeviceFamilyiPod,
    UIDeviceFamilyiPad,
    UIDeviceFamilyAppleTV,
    UIDeviceFamilyUnknown,
};

@interface UIDevice (Hardware)
- (NSString *) platform;
- (NSString *) hwmodel;

- (NSUInteger) cpuFrequency;
- (NSUInteger) busFrequency;
- (NSUInteger) cpuCount;
- (NSUInteger) totalMemory;
- (NSUInteger) userMemory;

- (NSNumber *) totalDiskSpace;
- (NSNumber *) freeDiskSpace;

- (BOOL) hasRetinaDisplay;

/// Returns a machine-readable model name in the format of "iPhone4,1"
- (NSString *)modelIdentifier;	// = platform

/// Returns a human-readable model name in the format of "iPhone 4S". Fallback of the the `modelIdentifier` value.
- (NSString *)modelName;

/// Returns the device family as a `UIDeviceFamily`
- (UIDeviceFamily) deviceFamily;

@end