WearEngineHostApiImpl.ets
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { Result, WearEngineHostApi, WearDeviceInfo, WatchTransformTheme } from '../pigeon/WearEngineApi';
/**
* WearEngine host implementation for HarmonyOS.
*
* Currently a stub – replace with HarmonyOS distributed communication /
* BLE / HiWear ArkTS API calls once integration is ready.
*/
export class WearEngineHostApiImpl extends WearEngineHostApi {
addWatchSurface(result: Result<boolean>): void {
result.success(false);
}
syncWatchTheme(theme: WatchTransformTheme, result: Result<boolean>): void {
result.success(false);
}
removeBackground(originImagePath: string, result: Result<string>): void {
result.error(new Error('Background removal is not implemented on HarmonyOS.'));
}
hasInstalledWatchSurface(result: Result<boolean>): void {
result.success(false);
}
hasAvailableDevices(): boolean {
return false;
}
checkConnectedDevice(result: Result<WearDeviceInfo>): void {
result.success(new WearDeviceInfo());
}
registerMessageReceiver(): boolean {
return false;
}
sendTextMessage(_message: string): boolean {
return false;
}
sendWatchSyncPayload(jsonPayload: string): boolean {
return this.sendTextMessage(jsonPayload);
}
}