1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export const HANDSHAKE_MESSAGE: string = 'OHOS HDC'; // sep not char '-', not more than 11 bytes 17export const PACKET_FLAG = 'HW'; 18export const USB_PACKET_FLAG: string = 'UB'; 19export const MAX_PACKET_SIZE_HISPEED: number = 512; // uint16_t 20export const MAX_USBFFS_BULK: number = 16384; 21export const ERR_IO_FAIL = -14000; 22 23export const CMDSTR_SHELL: string = 'shell'; 24export const CMDSTR_FILE_SEND: string = 'file send'; 25export const CMDSTR_FILE_RECV: string = 'file recv'; 26// @ts-ignore 27export const HDC_DEVICE_FILTER = { classCode: 255, subclassCode: 80, protocolCode: 1 } as USBDeviceFilter; 28 29export const HDC_DEVICE_FILTERS = [HDC_DEVICE_FILTER]; 30