microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fix-ts-error1

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/extension/networkInspector/devices/baseClientDevice.ts

54lines · 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
4cd25962JiglioNero4 years ago4import { ITarget } from "../../mobileTarget";
4bb0956eRedMickey5 years ago5import { ClientOS } from "../clientUtils";
6
7export enum DeviceStatus {
8Prepared,
9NotPrepared,
10}
11
4cd25962JiglioNero4 years ago12export class BaseClientDevice implements ITarget {
4bb0956eRedMickey5 years ago13// operating system of this device
4cd25962JiglioNero4 years ago14protected _os: ClientOS;
4bb0956eRedMickey5 years ago15// human readable name for this device
4cd25962JiglioNero4 years ago16protected _name?: string;
4bb0956eRedMickey5 years ago17// type of this device
4cd25962JiglioNero4 years ago18protected _isVirtualTarget: boolean;
4bb0956eRedMickey5 years ago19// serial number for this device
4cd25962JiglioNero4 years ago20protected _id: string;
21protected _deviceStatus: DeviceStatus;
4bb0956eRedMickey5 years ago22
4cd25962JiglioNero4 years ago23constructor(id: string, isVirtualTarget: boolean, os: ClientOS, name?: string) {
4bb0956eRedMickey5 years ago24this._id = id;
25this._name = name;
4cd25962JiglioNero4 years ago26this._isVirtualTarget = isVirtualTarget;
4bb0956eRedMickey5 years ago27this._os = os;
28this._deviceStatus = DeviceStatus.NotPrepared;
29}
30
31get id(): string {
32return this._id;
33}
34
35get os(): ClientOS {
36return this._os;
37}
38
39get name(): string | undefined {
40return this._name;
41}
42
4cd25962JiglioNero4 years ago43get isVirtualTarget(): boolean {
44return this._isVirtualTarget;
4bb0956eRedMickey5 years ago45}
46
47get deviceStatus(): DeviceStatus {
48return this._deviceStatus;
49}
50
51set deviceStatus(deviceStatus: DeviceStatus) {
52this._deviceStatus = deviceStatus;
53}
54}