From ff14b5214f47d8892e08506defd0ae6117c2aa6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Tue, 19 Aug 2025 11:23:05 +0800 Subject: [PATCH] udmf add transfer convert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 木子李 --- base_sdk/BUILD.gn | 1 + .../transfer/kitRegister/registerMain.ets | 2 ++ base_sdk/transfer/kitRegister/udmf.ets | 32 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 base_sdk/transfer/kitRegister/udmf.ets diff --git a/base_sdk/BUILD.gn b/base_sdk/BUILD.gn index 2e2a75e3..558a7bb9 100644 --- a/base_sdk/BUILD.gn +++ b/base_sdk/BUILD.gn @@ -50,6 +50,7 @@ generate_static_abc("base_transfer") { "./transfer/kitRegister/imageKit.ets", "./transfer/kitRegister/pasteboard.ets", "./transfer/kitRegister/cameraKit.ets", + "./transfer/kitRegister/udmf.ets", ] is_boot_abc = "True" device_dst_file = "/system/framework/base_transfer.abc" diff --git a/base_sdk/transfer/kitRegister/registerMain.ets b/base_sdk/transfer/kitRegister/registerMain.ets index 61bd1dcb..1233d595 100644 --- a/base_sdk/transfer/kitRegister/registerMain.ets +++ b/base_sdk/transfer/kitRegister/registerMain.ets @@ -26,6 +26,7 @@ import { registerScene3D } from './scene3d.ets'; import { registerImageKit } from './imageKit.ets'; import { registerPasteboard } from './pasteboard.ets'; import { registerCameraKit } from './cameraKit.ets'; +import { registerUDMF } from './udmf.ets'; export function registerMain(){ registerArkTS(); @@ -41,4 +42,5 @@ export function registerMain(){ registerImageKit(); registerPasteboard(); registerCameraKit(); + registerUDMF(); } \ No newline at end of file diff --git a/base_sdk/transfer/kitRegister/udmf.ets b/base_sdk/transfer/kitRegister/udmf.ets new file mode 100644 index 00000000..7c9ad6a1 --- /dev/null +++ b/base_sdk/transfer/kitRegister/udmf.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 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 { registerStaticCB, registerDynamicCB } from '../register.ets'; + +export function registerPasteboard() { + registerStaticCB('ArkData.SystemDefinedRecord', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedRecordTransferStatic'); + registerDynamicCB('ArkData.SystemDefinedRecord', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedRecordTransferDynamic'); + + registerStaticCB('ArkData.SystemDefinedForm', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedFormTransferStatic'); + registerDynamicCB('ArkData.SystemDefinedForm', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedFormTransferDynamic'); + + registerStaticCB('ArkData.SystemDefinedAppItem', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedAppItemTransferStatic'); + registerDynamicCB('ArkData.SystemDefinedAppItem', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedAppItemTransferDynamic'); + + registerStaticCB('ArkData.SystemDefinedPixelMap', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedPixelMapTransferStatic'); + registerDynamicCB('ArkData.SystemDefinedPixelMap', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'systemDefinedPixelMapTransferDynamic'); + + registerStaticCB('ArkData.ApplicationDefinedRecord', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'applicationDefinedRecordTransferStatic'); + registerDynamicCB('ArkData.ApplicationDefinedRecord', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'applicationDefinedRecordTransferDynamic'); +} -- Gitee