diff --git a/base_sdk/BUILD.gn b/base_sdk/BUILD.gn index 2e2a75e3a4767539940839357befa7a2a13f331b..558a7bb96e93091e236923e45a208a83f931e468 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 61bd1dcb0a7641b256ccba02a4b6e8e7c1606610..1233d595dcb8231bbbfce0419265be920176fbaa 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 0000000000000000000000000000000000000000..7c9ad6a13fe89d5802b57d894dab108b8f0af42e --- /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'); +}