emulator-index
Version:
Handles emulator index releated operations
40 lines (38 loc) • 1.74 kB
JavaScript
/**
* Creates a new Device instace from device info
* @class
* @param {DeviceOptions} options - Device infor provided as parameter
*/
function Device(options) {
this.deviceID = options.deviceID;
this.deviceName = options.deviceName;
this.os = options.os;
this.osVersion = options.osVersion;
this.smartfaceVersion = options.smartfaceVersion;
this.screen = options.screen;
this.brandName = options.brandName;
this.brandModel = options.brandModel;
this.resourceFolderOrder = options.resourceFolderOrder;
}
/**
* Device info provided as device options
* @typedef {Object} DeviceOptions
* @property {string} deviceID - Random GUID generated by Emulator once
* @property {string} deviceName - Name of the Device
* @property {string} brandName - Name of the device manifacturer
* @property {string} os - Operating System name of the device (iOS | Android)
* @property {string} osVersion - OS version of the device
* @property {string} smartfaceVersion - Smartface runtime version such as: 4.4.0.1
* @property {Object} screen - Device screen info
* @proerty {Object} screen.px - Sceen pixel values
* @proerty {number} screen.px.height - Sceen height pixel value
* @proerty {number} screen.px.width - Sceen width pixel value
* @proerty {Object} screen.dp - Sceen dp values
* @proerty {number} screen.dp.height - Sceen height dp value
* @proerty {number} screen.dp.width - Sceen width dp value
* @proerty {Object} screen.pt - Sceen pt values
* @proerty {number} screen.pt.height - Sceen height pt value
* @proerty {number} screen.pt.width - Sceen width pt value
* @proerty {Array.string} resourceFolderOrder - Density based resource folder names given in order
*/
module.exports = Device;