From e62a9c4b091e7682eeb74bcda1560b5f8689e5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E?= Date: Sat, 23 Aug 2025 16:57:46 +0800 Subject: [PATCH] udmf add transfer 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 | 35 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 base_sdk/transfer/kitRegister/udmf.ets diff --git a/base_sdk/BUILD.gn b/base_sdk/BUILD.gn index d50ad8e8..698bed61 100644 --- a/base_sdk/BUILD.gn +++ b/base_sdk/BUILD.gn @@ -53,6 +53,7 @@ generate_static_abc("base_transfer") { "./transfer/kitRegister/display.ets", "./transfer/kitRegister/screen.ets", "./transfer/kitRegister/mediaLibraryKit.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 a8d7cb2c..ba97bc51 100644 --- a/base_sdk/transfer/kitRegister/registerMain.ets +++ b/base_sdk/transfer/kitRegister/registerMain.ets @@ -29,6 +29,7 @@ import { registerCameraKit } from './cameraKit.ets'; import { registerDisplay } from './display.ets'; import { registerScreen } from './screen.ets'; import { registerMediaLibraryKit } from './mediaLibraryKit.ets' +import { registerUDMF } from './udmf.ets'; export function registerMain(){ registerArkTS(); @@ -47,4 +48,5 @@ export function registerMain(){ registerDisplay(); registerScreen(); registerMediaLibraryKit(); + 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..754944e9 --- /dev/null +++ b/base_sdk/transfer/kitRegister/udmf.ets @@ -0,0 +1,35 @@ +/* + * 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 registerUDMF() { + 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'); + + registerStaticCB('ArkData.Summary', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'summaryTransferStatic'); + registerDynamicCB('ArkData.Summary', '@ohos.data.unifiedDataChannel', 'unifiedDataChannel', 'summaryTransferDynamic'); +} \ No newline at end of file -- Gitee