From b6cc44e97e08a55534c980d42a4aea98b1b67d44 Mon Sep 17 00:00:00 2001 From: wangyu Date: Mon, 27 Jun 2022 18:00:52 +0800 Subject: [PATCH] add mtp manager dts Signed-off-by: wangyu --- api/@ohos.mtpManager.d.ts | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 api/@ohos.mtpManager.d.ts diff --git a/api/@ohos.mtpManager.d.ts b/api/@ohos.mtpManager.d.ts new file mode 100755 index 0000000000..aca3e30302 --- /dev/null +++ b/api/@ohos.mtpManager.d.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AsyncCallback,Callback} from "./basic"; + +/** + * Provides mtp device manager APIs + * + * @since 9 + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @systemapi + */ +declare namespace mtpManager { + + /** + * Mtp device info + * + * @since 9 + * @systemapi + */ + export interface MtpDev { + id: string; + path: string; + } + + /** + * Get all mtp device list + * + * @since 9 + * @syscap SystemCapability.FileManagement.StorageService.Volume + * @permission ohos.permission.STORAGE_MANAGER + * @systemapi + */ + function getAllMtpDevs(callback: AsyncCallback>): void; + function getAllMtpDevs(): Promise>; +} + +export default mtpManager; \ No newline at end of file -- Gitee