From 28468042347efb6ec8910c1ce9b47907cf1579a1 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 21 Jan 2022 02:12:38 +0800 Subject: [PATCH] update protobuf --- src/message.ts | 16 ++-------------- src/rendezvous.ts | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/message.ts b/src/message.ts index b85556fea..44405e14b 100644 --- a/src/message.ts +++ b/src/message.ts @@ -496,8 +496,7 @@ export function controlKeyToJSON(object: ControlKey): string { } export enum FileType { - UnknownFileType = 0, - Dir = 1, + Dir = 0, DirLink = 2, DirDrive = 3, File = 4, @@ -508,9 +507,6 @@ export enum FileType { export function fileTypeFromJSON(object: any): FileType { switch (object) { case 0: - case "UnknownFileType": - return FileType.UnknownFileType; - case 1: case "Dir": return FileType.Dir; case 2: @@ -534,8 +530,6 @@ export function fileTypeFromJSON(object: any): FileType { export function fileTypeToJSON(object: FileType): string { switch (object) { - case FileType.UnknownFileType: - return "UnknownFileType"; case FileType.Dir: return "Dir"; case FileType.DirLink: @@ -819,8 +813,7 @@ export interface PermissionInfo { } export enum PermissionInfo_Permission { - Unknown = 0, - Keyboard = 1, + Keyboard = 0, Clipboard = 2, Audio = 3, UNRECOGNIZED = -1, @@ -831,9 +824,6 @@ export function permissionInfo_PermissionFromJSON( ): PermissionInfo_Permission { switch (object) { case 0: - case "Unknown": - return PermissionInfo_Permission.Unknown; - case 1: case "Keyboard": return PermissionInfo_Permission.Keyboard; case 2: @@ -853,8 +843,6 @@ export function permissionInfo_PermissionToJSON( object: PermissionInfo_Permission ): string { switch (object) { - case PermissionInfo_Permission.Unknown: - return "Unknown"; case PermissionInfo_Permission.Keyboard: return "Keyboard"; case PermissionInfo_Permission.Clipboard: diff --git a/src/rendezvous.ts b/src/rendezvous.ts index 0ac3b1542..33fab950b 100644 --- a/src/rendezvous.ts +++ b/src/rendezvous.ts @@ -139,8 +139,7 @@ export interface RegisterPkResponse { } export enum RegisterPkResponse_Result { - UNKNOWN = 0, - OK = 1, + OK = 0, UUID_MISMATCH = 2, ID_EXISTS = 3, TOO_FREQUENT = 4, @@ -155,9 +154,6 @@ export function registerPkResponse_ResultFromJSON( ): RegisterPkResponse_Result { switch (object) { case 0: - case "UNKNOWN": - return RegisterPkResponse_Result.UNKNOWN; - case 1: case "OK": return RegisterPkResponse_Result.OK; case 2: @@ -189,8 +185,6 @@ export function registerPkResponse_ResultToJSON( object: RegisterPkResponse_Result ): string { switch (object) { - case RegisterPkResponse_Result.UNKNOWN: - return "UNKNOWN"; case RegisterPkResponse_Result.OK: return "OK"; case RegisterPkResponse_Result.UUID_MISMATCH: @@ -221,8 +215,7 @@ export interface PunchHoleResponse { } export enum PunchHoleResponse_Failure { - UNKNOWN = 0, - ID_NOT_EXIST = 1, + ID_NOT_EXIST = 0, OFFLINE = 2, LICENSE_MISMATCH = 3, LICENSE_OVERUSE = 4, @@ -234,9 +227,6 @@ export function punchHoleResponse_FailureFromJSON( ): PunchHoleResponse_Failure { switch (object) { case 0: - case "UNKNOWN": - return PunchHoleResponse_Failure.UNKNOWN; - case 1: case "ID_NOT_EXIST": return PunchHoleResponse_Failure.ID_NOT_EXIST; case 2: @@ -259,8 +249,6 @@ export function punchHoleResponse_FailureToJSON( object: PunchHoleResponse_Failure ): string { switch (object) { - case PunchHoleResponse_Failure.UNKNOWN: - return "UNKNOWN"; case PunchHoleResponse_Failure.ID_NOT_EXIST: return "ID_NOT_EXIST"; case PunchHoleResponse_Failure.OFFLINE: