From 9cec1147384f7e56edf89a29fa699e797298d6be Mon Sep 17 00:00:00 2001 From: BrainL Date: Fri, 4 Jul 2025 17:53:27 +0800 Subject: [PATCH 1/2] taihe bug fix Signed-off-by: BrainL --- .../idl/ohos.distributedDeviceManager.taihe | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe b/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe index 7bebee0b1..e296260bd 100644 --- a/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe +++ b/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe @@ -16,7 +16,7 @@ @!namespace("@ohos.distributedDeviceManager", "distributedDeviceManager") @!sts_inject(""" -static { loadLibrary("device_manager_ani_taihe");} +static { loadLibrary("device_manager_ani_taihe.z");} """) struct DeviceBasicInfo { @@ -76,17 +76,17 @@ interface DeviceManager { @!sts_inject_into_interface("on(type: string, callback: (data: object) => void): void;") @!sts_inject_into_class("""on(type: string, callback: object): void { if (type === "discoverSuccess") { - this.OnDiscoverSuccess_inner(callback as (data: DeviceStateChangeAction) => void); + this.OnDiscoverSuccess(callback as (data: DeviceStateChangeAction) => void); } else if (type === "deviceStateChange") { - this.OnDeviceStateChange_inner(callback as (data: DeviceStateChangeData) => void); + this.OnDeviceStateChange(callback as (data: DeviceStateChangeData) => void); } else if (type === "replyResult") { - this.OnreplyResult_inner(callback as (data: DeviceResult) => void); + this.OnreplyResult(callback as (data: DeviceResult) => void); } else if (type === "deviceNameChange") { - this.OnDeviceNameChange_inner(callback as (data: DeviceResult) => void); + this.OnDeviceNameChange(callback as (data: DeviceResult) => void); } else if (type === "discoverFailure") { - this.OnDiscoverFailure_inner(callback as (data: DeviceResultNumber) => void); + this.OnDiscoverFailure(callback as (data: DeviceResultNumber) => void); } else if (type ==="serviceDie") { - this.OnServiceDie_inner(callback as () => void); + this.OnServiceDie(callback as () => void); } else { throw new Error(`Unknown type: ${type}`); } @@ -96,17 +96,17 @@ interface DeviceManager { @!sts_inject_into_interface("off(type: string, callback?: (data: object) => void): void;") @!sts_inject_into_class("""off(type: string, callback?: object): void { if (type === "discoverSuccess") { - this.OffDiscoverSuccess_inner(callback as (((data: DeviceStateChangeAction) => void) | undefined)); + this.OffDiscoverSuccess(callback as (((data: DeviceStateChangeAction) => void) | undefined)); } else if (type === "deviceStateChange") { - this.OffDeviceStateChange_inner(callback as (((data: DeviceStateChangeData) => void) | undefined)); + this.OffDeviceStateChange(callback as (((data: DeviceStateChangeData) => void) | undefined)); } else if (type === "replyResult") { - this.OffreplyResult_inner(callback as (((data: DeviceResult) => void) | undefined)); + this.OffreplyResult(callback as (((data: DeviceResult) => void) | undefined)); } else if (type === "deviceNameChange") { - this.OffDeviceNameChange_inner(callback as (((data: DeviceResult) => void) | undefined)); + this.OffDeviceNameChange(callback as (((data: DeviceResult) => void) | undefined)); } else if (type === "discoverFailure"){ - this.OffDiscoverFailure_inner(callback as (((data: DeviceResultNumber) => void) | undefined)); + this.OffDiscoverFailure(callback as (((data: DeviceResultNumber) => void) | undefined)); } else if (type ==="serviceDie") { - this.OffServiceDie_inner(callback as () => void); + this.OffServiceDie(callback as () => void); }else { throw new Error(`Unknown type: ${type}`); } -- Gitee From 6843728e7e99d9734dd43775035b8e9cd31f8ac2 Mon Sep 17 00:00:00 2001 From: BrainL Date: Fri, 4 Jul 2025 20:55:10 +0800 Subject: [PATCH 2/2] taihe bug fix Signed-off-by: BrainL --- .../idl/ohos.distributedDeviceManager.taihe | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe b/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe index e296260bd..3eddeb7a9 100644 --- a/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe +++ b/interfaces/kits/taihe/idl/ohos.distributedDeviceManager.taihe @@ -76,17 +76,17 @@ interface DeviceManager { @!sts_inject_into_interface("on(type: string, callback: (data: object) => void): void;") @!sts_inject_into_class("""on(type: string, callback: object): void { if (type === "discoverSuccess") { - this.OnDiscoverSuccess(callback as (data: DeviceStateChangeAction) => void); + this.onDiscoverSuccess(callback as (data: DeviceStateChangeAction) => void); } else if (type === "deviceStateChange") { - this.OnDeviceStateChange(callback as (data: DeviceStateChangeData) => void); + this.onDeviceStateChange(callback as (data: DeviceStateChangeData) => void); } else if (type === "replyResult") { - this.OnreplyResult(callback as (data: DeviceResult) => void); + this.onreplyResult(callback as (data: DeviceResult) => void); } else if (type === "deviceNameChange") { - this.OnDeviceNameChange(callback as (data: DeviceResult) => void); + this.onDeviceNameChange(callback as (data: DeviceResult) => void); } else if (type === "discoverFailure") { - this.OnDiscoverFailure(callback as (data: DeviceResultNumber) => void); + this.onDiscoverFailure(callback as (data: DeviceResultNumber) => void); } else if (type ==="serviceDie") { - this.OnServiceDie(callback as () => void); + this.onServiceDie(callback as () => void); } else { throw new Error(`Unknown type: ${type}`); } @@ -96,17 +96,17 @@ interface DeviceManager { @!sts_inject_into_interface("off(type: string, callback?: (data: object) => void): void;") @!sts_inject_into_class("""off(type: string, callback?: object): void { if (type === "discoverSuccess") { - this.OffDiscoverSuccess(callback as (((data: DeviceStateChangeAction) => void) | undefined)); + this.offDiscoverSuccess(callback as (((data: DeviceStateChangeAction) => void) | undefined)); } else if (type === "deviceStateChange") { - this.OffDeviceStateChange(callback as (((data: DeviceStateChangeData) => void) | undefined)); + this.offDeviceStateChange(callback as (((data: DeviceStateChangeData) => void) | undefined)); } else if (type === "replyResult") { - this.OffreplyResult(callback as (((data: DeviceResult) => void) | undefined)); + this.offreplyResult(callback as (((data: DeviceResult) => void) | undefined)); } else if (type === "deviceNameChange") { - this.OffDeviceNameChange(callback as (((data: DeviceResult) => void) | undefined)); + this.offDeviceNameChange(callback as (((data: DeviceResult) => void) | undefined)); } else if (type === "discoverFailure"){ - this.OffDiscoverFailure(callback as (((data: DeviceResultNumber) => void) | undefined)); + this.offDiscoverFailure(callback as (((data: DeviceResultNumber) => void) | undefined)); } else if (type ==="serviceDie") { - this.OffServiceDie(callback as () => void); + this.offServiceDie(callback as () => void); }else { throw new Error(`Unknown type: ${type}`); } -- Gitee