microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.5.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/extension/networkInspector/devices/baseClientDevice.ts

55lines · modeblame

4bb0956eRedMickey5 years ago1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import { DeviceType } from "../../launchArgs";
5import { ClientOS } from "../clientUtils";
6import { IVirtualDevice } from "../../VirtualDeviceManager";
7
8export enum DeviceStatus {
9Prepared,
10NotPrepared,
11}
12
13export class BaseClientDevice implements IVirtualDevice {
14// operating system of this device
15private _os: ClientOS;
16// human readable name for this device
17private _name?: string;
18// type of this device
19private _deviceType: DeviceType;
20// serial number for this device
21private _id: string;
22private _deviceStatus: DeviceStatus;
23
24constructor(id: string, deviceType: DeviceType, os: ClientOS, name?: string) {
25this._id = id;
26this._name = name;
27this._deviceType = deviceType;
28this._os = os;
29this._deviceStatus = DeviceStatus.NotPrepared;
30}
31
32get id(): string {
33return this._id;
34}
35
36get os(): ClientOS {
37return this._os;
38}
39
40get name(): string | undefined {
41return this._name;
42}
43
44get deviceType(): DeviceType {
45return this._deviceType;
46}
47
48get deviceStatus(): DeviceStatus {
49return this._deviceStatus;
50}
51
52set deviceStatus(deviceStatus: DeviceStatus) {
53this._deviceStatus = deviceStatus;
54}
55}